O temacie
Autor Siemekk
Zaczęty 9.05.2016 roku
Wyświetleń 9619
Odpowiedzi 50
Bogdan Zwei
Siemekk Złote Wrota
class UIMsg { var int TextMove; // Anim8(h) move msg var int MsgView;// Open View var int Text; // Print(h) Create Text /***************************************\ When text have 31 >= charsInline \***************************************/ var int FirstLine;//Print Str_Len var int SecondLine;//Print Str_Len /***************************************\ When text have 31 >= charsInline \***************************************/};instance UIMsg@(UIMsg);var int UIMsg_Act;var int UIMsg_COff;func void UIMsg_Delete(var UIMsg this) { Anim8_Delete(this.TextMove); Print_DeleteText(this.Text);}; func void UIMsg_Position(var int hndl, var int value) { var UIMsg ptr; ptr = get(hndl); var zCViewText text; text = get(ptr.Text); text.posY = value; if(text.PosY==3700) { Print_DeleteText(ptr.Text); };};func void UIMsg_Box(var int hndl , var int value){var UIMsg ptr; ptr = get(hndl);var zCView box; box=get(ptr.MsgView);box.pposy = value;}; //========================================// Softprint//========================================func void Msger(var string txt, var int color, var int time) { /******************************************/ var int hndl; hndl = new(UIMsg@); var UIMsg ptr; ptr = get(hndl); /******************************************/ var int x; x = CalcPixelPosX(MsgBox_SizeX); var int y; y = CalcPixelPosY(MsgBox_SizeY); /******************************************/ var int Mover_Box; var int Box; Box = View_CreateCenter(x-150,Msg_PosY-y, x, y);//150 //View_CreateCenter(700,2870,1150,450); View_SetTexture(Box,"UI_MSG_BG.TGA"); View_AddText(box,800,2870,txt,PF_Font); Mover_Box = Anim8_NewExt(2870, UIMsg_Box, box, false); Anim8 (Mover_Box, 3300, time*15, A8_SlowStart);//50 Anim8q (Mover_Box, 3300, time*120, A8_Wait); Anim8q(Mover_Box,3700,time*15,A8_SlowStart); View_Open(Box); /***************Delete Box*****************/ Anim8_RemoveIfEmpty (Mover_Box, true); Anim8_RemoveDataIfEmpty(Mover_Box, true); /******************************************/ var int Mover; Anim8_RemoveIfEmpty (Mover, true); Anim8_RemoveDataIfEmpty(Mover, true); ptr.Text = Print_Ext(150, 2870, txt, PF_Font, color, -1); /******************************************/ Mover = Anim8_NewExt(2870, UIMsg_Position, hndl, false); Anim8 (Mover, 3300, time*15, A8_SlowStart);//50 Anim8q (Mover, 3300, time*120, A8_Wait); Anim8q(Mover,3700,time*15,A8_SlowStart); ptr.TextMove = Mover; ptr.MsgView=Box;};
var int list; list = List_Create(Ptr);List_Add(list, ptr.msgView);//Odniesienie do klasy UiMsg jest to zmienna od box'a
var int List; List=List_Create(box); List_Add(List,box);