DayZ Scripts
v1.21.156300 ยท Jun 20, 2023
 
Loading...
Searching...
No Matches
EnWidgets.c
Go to the documentation of this file.
6#ifdef DOXYGEN
11
13 TextWidgetTypeID,
15 MultilineTextWidgetTypeID,
17 MultilineEditBoxWidgetTypeID,
19 RichTextWidgetTypeID,
21 RenderTargetWidgetTypeID,
23 ImageWidgetTypeID,
25 ConsoleWidgetTypeID,
27 VideoWidgetTypeID,
29 RTTextureWidgetTypeID,
31 FrameWidgetTypeID,
33 EmbededWidgetTypeID,
34 ButtonWidgetTypeID,
35 CheckBoxWidgetTypeID,
36 WindowWidgetTypeID,
37 ComboBoxWidgetTypeID,
38 SimpleProgressBarWidgetTypeID,
39 ProgressBarWidgetTypeID,
40 SliderWidgetTypeID,
41 BaseListboxWidgetTypeID,
42 TextListboxWidgetTypeID,
43 GenericListboxWidgetTypeID,
44 EditBoxWidgetTypeID,
45 WorkspaceWidgetTypeID,
46 GridSpacerWidgetTypeID,
47 WrapSpacerWidgetTypeID,
48 ScrollWidgetTypeID,
50#else
52#endif
53
55
57{
58 SOURCEALPHA, //< takes alpha from texture * alpha from color. If not set, considers texture as non-transparent and transparency is set only by color
59 BLEND, //< texture is blended with a surface base on alpha
60 ADDITIVE, //< texture is added to a surface based on alpha
61 VISIBLE, //<Widget is visible - ShowWidget(w, true)
62 NOWRAP, //< Do not do texture wrapping
63 CENTER, //< Centers TextWidgetTypeID
64 VCENTER, //< Centers TextWidgetTypeID verticaly
67 EXACTPOS, //< Uses physical resolution (g_iWidth, h_iHeight)
68 HEXACTSIZE, //< Uses physical resolution (g_iWidth)
69 VEXACTSIZE, //< Uses physical resolution (h_iHeight)
70 EXACTSIZE, //< Uses physical resolution
71 NOFILTER, //< no texture filtering (no blur)
72 RALIGN, //< Right alignment TextWidgetTypeID
73 STRETCH, //< Stretch texture to a full size
74 FLIPU, //< Flips texture in U axis
75 FLIPV, //< Flips texture in V axis
76 CUSTOMUV, //< ignores STRETCH/FLIPU/FLIPV and take custom UV set by SetWidgetUV()
84};
85
86//------------------------------------------
88{
89 WA_LEFT = 0,
90 WA_RIGHT = 1,
91 WA_CENTER = 2,
92 WA_TOP = 0,
93 WA_BOTTOM = 1,
94}
95
96//------------------------------------------
98/*enum LinebreakOverrideMode
99{
100 LINEBREAK_DEFAULT,
101 LINEBREAK_WESTERN,
102 LINEBREAK_ASIAN
103};*/
104
105//------------------------------------------
106class Widget: Managed
107{
108 proto void ~Widget();
109 proto private void Widget();
110
111 proto static string TranslateString(string stringId);
112
114 proto static void SetLV(float lv);
116 proto static void SetTextLV(float lv);
118 proto static void SetObjectLighting(float lighting);
119
120 proto native owned string GetName();
121 proto native void SetName(string name);
122 proto native owned string GetTypeName();
123 proto native WidgetType GetTypeID();
124 proto native void Show(bool show, bool immedUpdate = true);
125 proto native void Enable(bool enable);
126 proto native int GetFlags();
127 proto native int SetFlags(int flags, bool immedUpdate = true);
128 proto native int GetSort();
129 proto native void SetSort(int sort, bool immedUpdate = true);
130 proto native int ClearFlags(int flags, bool immedUpdate = true);
131 proto native bool IsControlClass();
132 proto native owned string GetStyleName();
133 proto void GetUserData(out Class data);
134 proto native void SetUserData(Class data);
135 proto native int GetUserID();
136 proto native void SetUserID(int id);
137 proto native bool IsVisible();
138 proto native bool IsVisibleHierarchy();
139 proto native void SetPos(float x, float y, bool immedUpdate = true);
140 proto native void SetSize(float w, float h, bool immedUpdate = true);
141 proto native void SetScreenPos(float x, float y, bool immedUpdate = true);
142 proto native void SetScreenSize(float w, float h, bool immedUpdate = true);
143 proto native void SetColor(int color);
144 proto native int GetColor();
145 proto native void SetRotation(float roll, float pitch, float yaw, bool immedUpdate = true);
147 proto native vector GetRotation();
148 proto native void SetAlpha(float alpha);
149 proto native float GetAlpha();
150 proto void GetPos(out float x, out float y);
151 proto void GetSize(out float width, out float height);
152 proto void GetScreenPos(out float x, out float y);
153 proto void GetScreenSize(out float width, out float height);
154
155 proto native void SetTransform(vector mat[4], bool immedUpdate = true);
156
157 proto native Widget GetParent();
158 proto native Widget GetChildren();
159 proto native Widget GetSibling();
160 proto native void AddChild(Widget child, bool immedUpdate = true);
161 proto native void RemoveChild(Widget child);
162
163 proto native volatile void Update();
164
165 proto void GetScript(out Class data);
166
167 proto native Widget FindWidget(string pathname); //find Widget by path. e.g FindWidget("widget1.widget2.widget3.mywidget")
168 proto native Widget FindAnyWidget(string pathname); //find Widget by name e.g. FindWidget("widget1")
169 proto native Widget FindAnyWidgetById(int user_id); //find Widget by userID
170
171 proto native void SetHandler(ScriptedWidgetEventHandler eventHandler);
172 proto native void Unlink(); //destroys widget and all its children
173};
174
176{
178 proto native external Widget CreateWidget(WidgetType type, int left, int top, int width, int height, WidgetFlags flags, int color, int sort, Widget parentWidget = NULL);
180 proto native external Widget CreateWidgets(string layout, Widget parentWidget = NULL, bool immedUpdate = true);
182
185proto native Widget GetDragWidget();
186proto native void ReportMouse(int mousex, int mousey, Widget rootWidget);
187
188class TextWidget extends Widget
189{
190 proto native void SetTextSpacing(int horiz, int vert);
192 proto native void SetTextExactSize(int size);
193 proto native void SetTextOffset(int left, int top);
194 proto native void SetText(string text, bool immedUpdate = true);
195 proto native void SetOutline(int outlineSize, int argb = 0xFF000000);
196 proto native int GetOutlineSize();
197 proto native int GetOutlineColor();
198 proto native void SetShadow(int shadowSize, int shadowARGB = 0xFF000000, float shadowOpacity = 1, float shadowOffsetX = 0, float shadowOffsetY = 0);
199 proto native int GetShadowSize();
200 proto native int GetShadowColor();
201 proto native float GetShadowOpacity();
202 proto void GetShadowOffset(out float sx, out float sy);
203 proto native void SetItalic(bool italic);
204 proto native bool GetItalic();
205 proto native void SetBold(bool bold);
206 proto native bool GetBold();
207
209 proto void GetTextSize(out int sx, out int sy);
210 proto void SetTextFormat(string text, void param1 = NULL, void param2 = NULL, void param3 = NULL, void param4 = NULL, void param5 = NULL, void param6 = NULL, void param7 = NULL, void param8 = NULL, void param9 = NULL);
211
213 proto native float GetTextProportion();
215 proto native void SetTextProportion(float val);
216};
217
218class MultilineTextWidget extends TextWidget
219{
220 proto native float SetLineBreakingOverride(int mode);
221};
222
223class RichTextWidget extends TextWidget
224{
225 proto native float GetContentHeight();
226 proto native float GetContentOffset();
227 proto native void SetContentOffset(float offset, bool snapToLine = false);
228 proto native void ElideText(int line, float maxWidth, string str);
229 proto native int GetNumLines();
230 proto native void SetLinesVisibility(int lineFrom, int lineTo, bool visible);
231 proto native float GetLineWidth(int line);
232 proto native float SetLineBreakingOverride(int mode);
233};
234
235class RenderTargetWidget extends Widget
236{
238 proto native void SetRefresh(int period, int offset);
239 proto native void SetResolutionScale(float xscale, float ycale);
240};
241
242class RTTextureWidget extends Widget
243{
244};
245
246class ImageWidget extends Widget
247{
256 proto native bool LoadImageFile(int num, string name, bool noCache = false);
257 proto native void SetImageTexture(int image, RTTextureWidget texture);
259 proto void GetImageSize(int image, out int sx, out int sy);
260
266 proto native bool SetImage(int num);
268 proto native int GetImage();
274 proto native void SetUV(float uv[4][2]);
275
281 proto native bool LoadMaskTexture(string resource);
282
289 proto native float GetMaskProgress();
290
295 proto native void SetMaskProgress(float value);
296
303 proto native float GetMaskTransitionWidth();
304
309 proto native void SetMaskTransitionWidth(float value);
310};
311
312class MultilineEditBoxWidget extends TextWidget
313{
314 proto native int GetLinesCount();
315 proto native int GetCarriageLine();
316 proto native int GetCarriagePos();
317 proto void GetText(out string text);
318 proto native void SetLine(int line, string text);
319 proto void GetLine(int line, out string text);
320};
321
322class UIWidget extends Widget
323{
324 proto native void SetTextColor(int color);
325 proto native void SetTextOutline(int outlineSize, int argb = 0xFF000000);
326 proto native int GetTextOutlineSize();
327 proto native int GetTextOutlineColor();
328 proto native void SetTextShadow(int shadowSize, int shadowARGB = 0xFF000000, float shadowOpacity = 1.0, float shadowOffsetX = 0.0, float shadowOffsetY = 0.0);
329 proto native int GetTextShadowSize();
330 proto native int GetTextShadowColor();
331 proto native float GetTextShadowOpacity();
332 proto native float GetTextShadowOffsetX();
333 proto native float GetTextShadowOffsetY();
334 proto native void SetTextItalic(bool italic);
335 proto native bool GetTextItalic();
336 proto native void SetTextBold(bool bold);
337 proto native bool GetTextBold();
338};
339
340class CanvasWidget extends Widget
341{
342 proto native void DrawLine(float x1, float y1, float x2, float y2, float width, int color);
343 proto native void Clear();
344};
345
346class EditBoxWidget extends UIWidget
347{
348 proto string GetText();
349 proto native void SetText(string str);
350};
351
352class SliderWidget extends UIWidget
353{
354 proto native void SetMinMax(float minimum, float maximum);
355 proto native float GetMin();
356 proto native float GetMax();
357 proto native float GetCurrent();
358 proto native void SetCurrent(float curr);
359 proto native float GetStep();
360 proto native void SetStep(float step);
361};
362
364{
365 proto native float GetMin();
366 proto native float GetMax();
367 proto native float GetCurrent();
368 proto native void SetCurrent(float curr);
369};
370
371class ProgressBarWidget extends SimpleProgressBarWidget
372{
373};
374
375class ButtonWidget extends UIWidget
376{
377 proto native bool GetState();
378
379 proto native bool SetState(bool state);
380
381 proto native void SetText(string text);
382
383 proto native void SetTextOffset(float xoffset, float yoffset);
387 proto native void SetTextHorizontalAlignment(int align);
391 proto native void SetTextVerticalAlignment(int align);
392
394 proto native float GetTextProportion();
396 proto native void SetTextProportion(float val);
397};
398
399class XComboBoxWidget extends UIWidget
400{
401 proto native int AddItem(string item);
402 proto native void ClearAll();
403 proto native void SetItem(int item, string value);
404 proto native void RemoveItem(int item);
405 proto native int GetNumItems();
406 proto native int SetCurrentItem(int n);
407 proto native int GetCurrentItem();
408};
409
410class CheckBoxWidget extends UIWidget
411{
412 proto native void SetText(string str);
413 proto native bool IsChecked();
414 proto native void SetChecked(bool checked);
415};
416
417class BaseListboxWidget extends UIWidget
418{
419 proto native void ClearItems();
420 proto native int GetNumItems();
421 proto native void SelectRow(int row);
422 proto native int GetSelectedRow();
423 proto native void RemoveRow(int row);
424 proto native void EnsureVisible(int row);
425};
426
428{
429};
430
431class TextListboxWidget extends SimpleListboxWidget
432{
434 proto native int AddItem(string text, Class userData, int column, int row = -1);
435 proto native void SetItem(int position, string text, Class userData, int column);
446 proto bool GetItemText(int row, int column, out string text);
447 proto void GetItemData(int row, int column, out Class data);
448
449 proto native void SetItemColor(int row, int column, int color );
450};
451
452class SpacerBaseWidget extends UIWidget
453{
454 proto native void AddChildAfter(Widget child,Widget after, bool immedUpdate = true);
455}
456
457class SpacerWidget extends SpacerBaseWidget
458{
460 proto native void SetContentAlignmentH(WidgetAlignment alignment);
462 proto native void SetContentAlignmentV(WidgetAlignment alignment);
463}
464
465class GridSpacerWidget extends SpacerWidget
466{
467}
468
469class WrapSpacerWidget extends SpacerWidget
470{
471}
472
473class ScrollWidget extends SpacerBaseWidget
474{
475 proto native float GetScrollbarWidth();
476 proto native bool IsScrollbarVisible(); //reflects native C++ side scrollbar state
477
478 proto native float GetContentWidth();
479 proto native float GetContentHeight();
480
481 proto native float GetHScrollPos();
482 proto native float GetHScrollPos01();
483 proto native bool HScrollStep(int steps);
484 proto native void HScrollToPos(float pos);
485 proto native void HScrollToPos01(float pos01);
486 proto native void HScrollToWidget(Widget child);
487
488 proto native float GetVScrollPos();
489 proto native float GetVScrollPos01();
490 proto native bool VScrollStep(int steps);
491 proto native void VScrollToPos(float pos);
492 proto native void VScrollToPos01(float pos01);
493 proto native void VScrollToWidget(Widget child);
494};
495
496//VideoWidget
498{
505 KILL
507
508class VideoWidget extends Widget
509{
510 proto native int Play(VideoCommand cmd);
511 proto native bool LoadVideo(string name, int soundScene);
512 proto native void DisableSubtitles(bool disable);
513};
514
518proto native void SetGUIWidget(IEntity ent, int index, RTTextureWidget w);
519
521{
523 CID_SELECT = 1,//select/use focused
525 CID_LEFT, //navigation
529 CID_MENU, //get to main menu
530 CID_DRAG, //probably needed only for consoles
536
538{
539 bool OnClick(Widget w, int x, int y, int button);
540 bool OnModalResult(Widget w, int x, int y, int code, int result);
541 bool OnDoubleClick(Widget w, int x, int y, int button);
542 bool OnSelect(Widget w, int x, int y);
543 bool OnItemSelected(Widget w, int x, int y, int row, int column, int oldRow, int oldColumn);
544 bool OnFocus(Widget w, int x, int y);
545 bool OnFocusLost(Widget w, int x, int y);
546 bool OnMouseEnter(Widget w, int x, int y);
547 bool OnMouseLeave(Widget w, Widget enterW, int x, int y);
548 bool OnMouseWheel(Widget w, int x, int y, int wheel);
549 bool OnMouseButtonDown(Widget w, int x, int y, int button);
550 bool OnMouseButtonUp(Widget w, int x, int y, int button);
552 bool OnController(Widget w, int control, int value);
553 bool OnKeyDown(Widget w, int x, int y, int key);
554 bool OnKeyUp(Widget w, int x, int y, int key);
555 bool OnKeyPress(Widget w, int x, int y, int key);
556 bool OnChange(Widget w, int x, int y, bool finished);
557 bool OnDrag(Widget w, int x, int y);
558 bool OnDragging(Widget w, int x, int y, Widget reciever);
559 bool OnDraggingOver(Widget w, int x, int y, Widget reciever);
560 bool OnDrop(Widget w, int x, int y, Widget reciever);
561 bool OnDropReceived(Widget w, int x, int y, Widget reciever);
562 bool OnResize(Widget w, int x, int y);
563 bool OnChildAdd(Widget w, Widget child);
566 bool OnEvent(EventType eventType, Widget target, int parameter0, int parameter1);
567};
568
569//Common Widget API
570proto native void SetCursorWidget(Widget cursor);
571proto native void ShowCursorWidget(bool show);
572proto native bool LoadWidgetImageSet(string filename);
573proto native void LoadWidgetStyles(string filename);
574// sets active window (widget which owns some control inputs like buttons, listboxes etc.). Necessary for controlling the focus by keyboard/joypad. In case when setFocus is set to true, it sets focus on a first child Widget, which may receive the focus (is not disabled, set as NoFocus etc.)
575proto native bool SetActiveWindow(Widget w, bool resetFocus);
576
577// sets focus (necessary when using keyboard/joyped) to a particular widget. Widget must have some inputs like button, listbox, checkbox, combobox etc.
578proto native void SetFocus(Widget w);
579
580proto native void SetModal(Widget w);
581
582proto native Widget GetFocus();
583
584//RenderTargetWidgetTypeID
585proto native void SetWidgetWorld(RenderTargetWidget w, IEntity wrldEntity, int camera);
586
587
588#ifdef PS3
592 proto native bool IsCircleToCrossSwapped();
593#endif
594
595proto native bool ReloadTexture(string path);
596
597
proto native vector GetPos()
void Show()
Definition DayZGame.c:157
Icon x
Icon y
string name
int GetSize()
Super root of all classes in Enforce script.
Definition EnScript.c:11
TODO doc.
Definition EnScript.c:118
map: item x vector(index, width, height)
Definition EnWidgets.c:538
proto native float SetLineBreakingOverride(int mode)
proto native float GetMin()
proto native void SetText(string text)
proto native void SetCurrent(float curr)
proto native float GetMax()
proto native float GetCurrent()
proto native int GetNumItems()
int[] TypeID
script representation for C++ RTTI types
Definition EnScript.c:127
proto native int GetShadowSize()
proto native Widget FindAnyWidgetById(int user_id)
proto native void SetTextShadow(int shadowSize, int shadowARGB=0xFF000000, float shadowOpacity=1.0, float shadowOffsetX=0.0, float shadowOffsetY=0.0)
proto native float GetMaskTransitionWidth()
proto native int GetColor()
proto native void VScrollToPos01(float pos01)
VideoCommand
Definition EnWidgets.c:498
proto native float GetMin()
proto native float SetLineBreakingOverride(int mode)
proto native void SetItem(int position, string text, Class userData, int column)
proto native Widget GetSibling()
proto native void SetImageTexture(int image, RTTextureWidget texture)
proto native void SetAlpha(float alpha)
proto native owned string GetTypeName()
ControlID
Definition EnWidgets.c:521
static proto void SetObjectLighting(float lighting)
Set global lighting of objects in widgets, value between [0, 1], default: 1, lower value is less brig...
proto void GetLine(int line, out string text)
proto native float GetTextShadowOffsetX()
proto native void SetTextBold(bool bold)
proto native void SetItem(int item, string value)
proto native void SetWidgetWorld(RenderTargetWidget w, IEntity wrldEntity, int camera)
proto native Widget GetParent()
Get parent of the Effect.
Definition Effect.c:396
proto native void SetContentAlignmentH(WidgetAlignment alignment)
proto native bool IsScrollbarVisible()
proto native void VScrollToWidget(Widget child)
WidgetFlags
Definition EnWidgets.c:57
bool OnMouseWheel(Widget w, int x, int y, int wheel)
proto native void SetTextProportion(float val)
Set text proportion - ratio between button height and button text height in interval <0,...
proto native Widget GetFocus()
proto void GetScreenSize(out float width, out float height)
proto native int GetOutlineColor()
proto native void SetText(string str)
proto native void SetName(string name)
proto native float GetContentWidth()
proto native void SetSize(float w, float h, bool immedUpdate=true)
proto native float GetVScrollPos()
proto native void ReportMouse(int mousex, int mousey, Widget rootWidget)
proto native int AddItem(string item)
proto native void SetFocus(Widget w)
proto native void SetTextVerticalAlignment(int align)
proto native void SetItemColor(int row, int column, int color)
proto native void SetPos(float x, float y, bool immedUpdate=true)
proto native void AddChild(Widget child, bool immedUpdate=true)
proto native void SetContentOffset(float offset, bool snapToLine=false)
proto native int GetTextShadowColor()
proto native int GetTextOutlineSize()
proto native void Unlink()
TypeID WidgetType
Definition EnWidgets.c:51
proto native void SetOutline(int outlineSize, int argb=0xFF000000)
proto native void ElideText(int line, float maxWidth, string str)
proto native int Play(VideoCommand cmd)
proto native void SetTextOffset(float xoffset, float yoffset)
proto void GetItemData(int row, int column, out Class data)
proto native void SetCurrent(float curr)
proto native float GetVScrollPos01()
bool OnEvent(EventType eventType, Widget target, int parameter0, int parameter1)
proto native float GetShadowOpacity()
proto native Widget FindAnyWidget(string pathname)
proto native float GetMax()
bool OnDragging(Widget w, int x, int y, Widget reciever)
class SpacerBaseWidget extends UIWidget GetContentAlignmentH()
WA_BOTTOM
Definition EnWidgets.c:4
proto native void SetHandler(ScriptedWidgetEventHandler eventHandler)
proto void GetShadowOffset(out float sx, out float sy)
proto native int GetUserID()
enum VideoCommand GetScrollbarWidth
proto native void SetTextHorizontalAlignment(int align)
proto native void SetLinesVisibility(int lineFrom, int lineTo, bool visible)
proto native float GetHScrollPos()
static proto void SetTextLV(float lv)
Set global LV of the text in widgets, value between [-15, 0], default: 0, lower value is less bright.
proto native external Widget CreateWidgets(string layout, Widget parentWidget=NULL, bool immedUpdate=true)
Create widgets from *.layout file.
bool OnFocusLost(Widget w, int x, int y)
proto native int GetTextOutlineColor()
proto native void SetRefresh(int period, int offset)
when period > 1 then every n-th frame will be rendered. Offset is initial counter.
proto native bool GetState()
static proto string TranslateString(string stringId)
proto native bool GetTextBold()
proto native void RemoveRow(int row)
bool OnChildRemove(Widget w, Widget child)
proto native float GetHScrollPos01()
proto native float GetTextShadowOpacity()
proto native bool SetImage(int num)
proto native float GetStep()
proto native void SetTextOutline(int outlineSize, int argb=0xFF000000)
WA_LEFT
Definition EnWidgets.c:0
proto native float GetContentHeight()
proto native void SetColor(int color)
proto void GetScript(out Class data)
proto native int SetCurrentItem(int n)
bool OnModalResult(Widget w, int x, int y, int code, int result)
proto native volatile void Update()
proto native bool GetTextItalic()
proto native bool SetState(bool state)
proto native void SetRotation(float roll, float pitch, float yaw, bool immedUpdate=true)
proto void GetText(out string text)
proto native int GetLinesCount()
bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
proto native WidgetType GetTypeID()
proto native bool HScrollStep(int steps)
bool OnSelect(Widget w, int x, int y)
proto native void HScrollToPos01(float pos01)
proto native float GetTextShadowOffsetY()
proto native int GetCarriagePos()
proto native void ShowCursorWidget(bool show)
bool OnResize(Widget w, int x, int y)
bool OnChildAdd(Widget w, Widget child)
proto void GetUserData(out Class data)
proto native external Widget CreateWidget(WidgetType type, int left, int top, int width, int height, WidgetFlags flags, int color, int sort, Widget parentWidget=NULL)
Create widgets by WidgetType.
bool OnKeyUp(Widget w, int x, int y, int key)
proto native void Enable(bool enable)
proto native int GetOutlineSize()
proto native owned string GetStyleName()
proto native void Clear()
proto native bool LoadVideo(string name, int soundScene)
proto native Widget FindWidget(string pathname)
bool OnController(Widget w, int control, int value)
control is one of ControlID
TypeID EventType
Definition EnWidgets.c:54
proto native void SetMaskTransitionWidth(float value)
proto native int GetCurrentItem()
proto native void SetTransform(vector mat[4], bool immedUpdate=true)
bool OnKeyPress(Widget w, int x, int y, int key)
bool OnKeyDown(Widget w, int x, int y, int key)
proto native void SetScreenSize(float w, float h, bool immedUpdate=true)
proto native void DrawLine(float x1, float y1, float x2, float y2, float width, int color)
proto void SetTextFormat(string text, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
proto native void SetScreenPos(float x, float y, bool immedUpdate=true)
proto native float GetMaskProgress()
proto native int GetFlags()
proto native bool ReloadTexture(string path)
proto native bool IsControlClass()
proto native float GetContentOffset()
proto bool GetItemText(int row, int column, out string text)
Get item.
proto native void SetShadow(int shadowSize, int shadowARGB=0xFF000000, float shadowOpacity=1, float shadowOffsetX=0, float shadowOffsetY=0)
proto native void SetTextSpacing(int horiz, int vert)
proto void GetImageSize(int image, out int sx, out int sy)
returns size of image
proto native void SetText(string text, bool immedUpdate=true)
bool OnDropReceived(Widget w, int x, int y, Widget reciever)
bool OnDraggingOver(Widget w, int x, int y, Widget reciever)
proto native void HScrollToWidget(Widget child)
proto native bool VScrollStep(int steps)
proto native bool LoadMaskTexture(string resource)
bool OnClick(Widget w, int x, int y, int button)
proto native void LoadWidgetStyles(string filename)
proto string GetText()
static proto void SetLV(float lv)
Set global LV of widgets, value between [-15, 0], default: 0, lower value is less bright.
proto native Widget GetWidgetUnderCursor()
proto native void SetBold(bool bold)
proto native int GetShadowColor()
bool OnDrag(Widget w, int x, int y)
proto native void HScrollToPos(float pos)
proto native int GetTextShadowSize()
proto native void SetMinMax(float minimum, float maximum)
proto native void SetTextItalic(bool italic)
proto native bool IsVisibleHierarchy()
proto native float GetTextProportion()
Get text proportion - ratio between button height and button text height in interval <0,...
proto native void RemoveItem(int item)
proto native bool IsVisible()
WA_TOP
Definition EnWidgets.c:3
proto native void EnsureVisible(int row)
proto native bool IsChecked()
proto native void SetResolutionScale(float xscale, float ycale)
bool OnDoubleClick(Widget w, int x, int y, int button)
proto native float GetAlpha()
WA_CENTER
Definition EnWidgets.c:2
proto native int SetFlags(int flags, bool immedUpdate=true)
proto native owned string GetName()
proto native int GetSelectedRow()
proto native void RemoveChild(Widget child)
proto native void VScrollToPos(float pos)
proto native void SetUserData(Class data)
proto native void SetChecked(bool checked)
WidgetAlignment
Definition EnWidgets.c:88
proto native int GetImage()
Returns active image.
proto native vector GetRotation()
returns rotation of widget in order roll, pitch, yaw
proto native void SetTextColor(int color)
proto native int GetSort()
proto native void SetUV(float uv[4][2])
proto native float GetCurrent()
proto native void SetContentAlignmentV(WidgetAlignment alignment)
proto native void SetUserID(int id)
proto native Widget CancelWidgetDragging()
proto native void DisableSubtitles(bool disable)
proto native bool GetItalic()
proto void GetTextSize(out int sx, out int sy)
Returns text size in pixels.
bool OnItemSelected(Widget w, int x, int y, int row, int column, int oldRow, int oldColumn)
proto native bool LoadImageFile(int num, string name, bool noCache=false)
proto native void SelectRow(int row)
proto native void SetTextExactSize(int size)
set text exact size. Exact Text flag must be enabled. 0 equals original size.
bool OnMouseEnter(Widget w, int x, int y)
bool OnMouseButtonUp(Widget w, int x, int y, int button)
bool OnFocus(Widget w, int x, int y)
proto native int GetCarriageLine()
proto native void SetTextOffset(int left, int top)
bool OnDrop(Widget w, int x, int y, Widget reciever)
WA_RIGHT
Definition EnWidgets.c:1
proto native Widget GetDragWidget()
proto native float GetLineWidth(int line)
proto native void SetStep(float step)
proto native void SetGUIWidget(IEntity ent, int index, RTTextureWidget w)
bool OnChange(Widget w, int x, int y, bool finished)
proto native void SetMaskProgress(float value)
proto native WidgetAlignment GetContentAlignmentV()
proto native int ClearFlags(int flags, bool immedUpdate=true)
proto native void SetModal(Widget w)
proto native void SetSort(int sort, bool immedUpdate=true)
proto void GetScreenPos(out float x, out float y)
proto native void ClearAll()
proto native void SetCursorWidget(Widget cursor)
proto native void SetLine(int line, string text)
proto native void SetItalic(bool italic)
proto native bool LoadWidgetImageSet(string filename)
proto native bool GetBold()
proto native int GetNumItems()
proto native bool SetActiveWindow(Widget w, bool resetFocus)
bool OnMouseButtonDown(Widget w, int x, int y, int button)
proto native Widget GetChildren()
proto native int GetNumLines()
proto native void ClearItems()
proto native void AddChildAfter(Widget child, Widget after, bool immedUpdate=true)
proto native int AddItem(string text, Class userData, int column, int row=-1)
Insert new Row, if row = -1, new Row is inserted at the end otherwise at row index.
@ PLAY
Definition EnWidgets.c:499
@ REWIND
Definition EnWidgets.c:501
@ STOP
Definition EnWidgets.c:500
@ KILL
Definition EnWidgets.c:505
@ ISPLAYING
Definition EnWidgets.c:504
@ REPEAT
Definition EnWidgets.c:503
@ POSITION
Definition EnWidgets.c:502
@ CID_RADIALMENU
Definition EnWidgets.c:533
@ CID_SELECT
Definition EnWidgets.c:523
@ CID_NONE
Definition EnWidgets.c:522
@ CID_TABLEFT
Definition EnWidgets.c:531
@ CID_TABRIGHT
Definition EnWidgets.c:532
@ CID_LEFT
Definition EnWidgets.c:525
@ CID_RIGHT
Definition EnWidgets.c:526
@ CID_UP
Definition EnWidgets.c:527
@ CID_DRAG
Definition EnWidgets.c:530
@ CID_BACK
Definition EnWidgets.c:524
@ CID_COUNT
Definition EnWidgets.c:534
@ CID_MENU
Definition EnWidgets.c:529
@ CID_DOWN
Definition EnWidgets.c:528
@ FLIPU
Definition EnWidgets.c:74
@ CLIPCHILDREN
Definition EnWidgets.c:80
@ EXACTSIZE
Definition EnWidgets.c:70
@ CENTER
Definition EnWidgets.c:63
@ CUSTOMUV
Definition EnWidgets.c:76
@ RALIGN
Definition EnWidgets.c:72
@ EXACTPOS
Definition EnWidgets.c:67
@ FLIPV
Definition EnWidgets.c:75
@ BLEND
Definition EnWidgets.c:59
@ DRAGGABLE
Definition EnWidgets.c:83
@ HEXACTSIZE
Definition EnWidgets.c:68
@ IGNOREPOINTER
Definition EnWidgets.c:77
@ NOFOCUS
Definition EnWidgets.c:79
@ HEXACTPOS
Definition EnWidgets.c:65
@ VCENTER
Definition EnWidgets.c:64
@ STRETCH
Definition EnWidgets.c:73
@ VEXACTSIZE
Definition EnWidgets.c:69
@ NOCLEAR
Definition EnWidgets.c:82
@ SOURCEALPHA
Definition EnWidgets.c:58
@ VEXACTPOS
Definition EnWidgets.c:66
@ RENDER_ALWAYS
Definition EnWidgets.c:81
@ VISIBLE
Definition EnWidgets.c:61
@ ADDITIVE
Definition EnWidgets.c:60
@ NOFILTER
Definition EnWidgets.c:71
@ DISABLED
Definition EnWidgets.c:78
@ NOWRAP
Definition EnWidgets.c:62