44 int screen_w, screen_h;
53 float button_height_percent = 0.02;
54 float button_height = screen_h * button_height_percent;
56 for (
int i = 0; i <
m_count; i++)
61 menu_button.SetSize(0.90, button_height);
62 menu_button.Show(
true);
83 int right_edge =
x + w - offset_x;
84 if (right_edge > screen_w)
86 x = screen_w - w - offset_x;
93 int bottom_edge =
y + h - offset_y;
94 if (bottom_edge > screen_h)
142 super.OnMouseLeave(w, enterW,
x,
y);
155 super.OnMouseButtonDown(w,
x,
y, button);
180 AddEx(label, FadeColors.LIGHT_GREY, obj, fn_name, params);
190 menuButton.SetText(label);
191 menuButton.SetTextColor(labelColor);
192 menuButton.Show(
true);
196 menuButton.SetFlags(menuButton.GetFlags() |
WidgetFlags.IGNOREPOINTER);
203 int itemWidth = label.
Length();
219 menu_button.Show(
false );
220 menu_button.SetText(
"" );
243 ButtonWidget button = ButtonWidget.Cast(child);
248 child = child.GetSibling();
260 TSelectableActionInfoArrayEx customActions =
new TSelectableActionInfoArrayEx();
261 entity.GetDebugActions(customActions);
263 int actionsCount = customActions.Count();
264 for (
int i = 0; i < customActions.Count(); i++)
269 int actionId = actionInfo.param2;
270 int textColor = actionInfo.param4;
271 string actionText = actionInfo.param3;
274 AddEx(actionText, textColor, null,
"", null);
Param4< int, int, string, int > TSelectableActionInfoWithColor
proto native UIManager GetUIManager()
override ScriptCallQueue GetCallQueue(int call_category)
proto native WorkspaceWidget GetWorkspace()
Super root of all classes in Enforce script.
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
proto void Call(func fn, 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)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
proto native UIScriptedMenu GetMenu()
Returns most-top open menu.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
string String(string s)
Helper for passing string expression to functions with void parameter. Example: Print(String("Hello "...
proto void GetScreenSize(out int x, out int y)
proto native int Length()
Returns length of string.
proto int ToUpper()
Changes string to uppercase. Returns length.