29 protected static const string HINTS_PATH_DEFAULT =
"scripts/data/internal/script_console_hints.json";
48 plugin.OnScriptMenuOpened(
true);
64 plugin.OnScriptMenuOpened(
false);
95 if (!JsonFileLoader<JsonHintsData>.LoadFile(
path, data, errorMessage))
106 m_JsonData.WidgetHintBindings.Set(hash, text);
107 Print(
"setting: " + text);
138 RegisterTab(
new ScriptConsoleEnfScriptServerTab(layoutRoot.FindAnyWidget(
"EnScriptPanel"),
this,ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"EnScriptButtonWidgetServer"))));
165 string nameThis = w.GetName();
166 string nameParent =
"";
170 nameParent = w.GetParent().GetName();
173 string namesCombined = nameThis + nameParent;
174 return namesCombined.
Hash();
183 if (
m_JsonData.WidgetHintBindings.Contains(hash))
185 return m_JsonData.WidgetHintBindings.Get(hash);
210 super.OnKeyPress(w,
x,
y, key);
220 super.OnKeyDown(w,
x,
y, key);
230 super.Update(timeslice);
269 if (handler.IsSelected())
271 handler.Update(timeslice);
278 super.OnMouseButtonDown(w,
x,
y,button);
289 super.OnClick(w,
x,
y, button);
325 super.OnDoubleClick(w,
x,
y, button);
335 super.OnMouseLeave(w, enterW,
x,
y);
348 super.OnMouseEnter(w,
x,
y);
355 #ifdef PLATFORM_CONSOLE
363 super.OnChange(w,
x,
y, finished);
373 super.OnItemSelected(w,
x,
y, row, column, oldRow, oldColumn);
385 if (tabType == handler.Type())
411 handler.Select(handler == selectedHandler, selectedHandler);
435 GetLayoutRoot().FindAnyWidget(
"MenuWindow").SetColor(
ARGB(0, 0, 0, 0));
439 GetLayoutRoot().FindAnyWidget(
"MenuWindow").SetColor(
ARGB(128, 0, 0, 0));
457 int screenW, screenH;
463 float relativeX = mouseX / screenW;
464 float relativeY = mouseY / screenH;
469 offsetX = -width - offsetX;
471 offsetY = -height - offsetY;
481 super.OnRPCEx(rpc_type, ctx);
482 #ifdef DIAG_DEVELOPER
486 handler.OnRPCEx(rpc_type,ctx);
508 "UAVoiceModifierHelper",
510 "UAVoiceDistanceDown",
512 "UAVoiceOverNetToggle",
513 "UAVoiceOverNetMute",
524 "UABuldSelectToggle",
527 "UABuldSelectAddMod",
528 "UABuldSelectRemoveMod",
529 "UABuldModifySelected",
531 "UABuldRotationXAxisMod",
532 "UABuldRotationZAxisMod",
533 "UABuldCoordModCycle",
534 "UABuldSampleTerrainHeight",
535 "UABuldSetTerrainHeight",
540 "UABuldBrushRatioUp",
541 "UABuldBrushRatioDown",
542 "UABuldBrushOuterUp",
543 "UABuldBrushOuterDown",
544 "UABuldBrushStrengthUp",
545 "UABuldBrushStrengthDown",
546 "UABuldToggleNearestObjectArrow",
547 "UABuldCycleBrushMod",
548 "UABuldSelectionType",
549 "UABuldCreateLastSelectedObject",
550 "UABuldDuplicateSelection",
551 "UABuldDeleteSelection",
571 "UABuldViewerMoveForward",
572 "UABuldViewerMoveBack",
573 "UABuldViewerMoveLeft",
574 "UABuldViewerMoveRight",
575 "UABuldViewerMoveUp",
576 "UABuldViewerMoveDown",
577 "UABuldObjectRotateLeft",
578 "UABuldObjectRotateRight",
579 "UABuldObjectRotateForward",
580 "UABuldObjectRotateBack",
581 "UABuldPreviousAnimation",
582 "UABuldNextAnimation",
583 "UABuldRecedeAnimation",
584 "UABuldAdvanceAnimation"
589 inputExcludes.Remove(0);
624 m_Timer.Run(0.1,
this,
"Tick", NULL,
true);
638 if (!
m_Root.IsVisibleHierarchy())
665 int screenW, screenH;
671 float relativeX = mouseX / screenW;
672 float relativeY = mouseY / screenH;
677 offsetX = -width - offsetX;
679 offsetY = -height - offsetY;
PluginConfigDebugProfile m_ConfigDebugProfile
void PluginItemDiagnostic()
PluginBase GetPlugin(typename plugin_type)
ImageWidget m_HintWidgetBackground
Widget m_CurrentHoverWidget
RichTextWidget m_HintWidget
class ScriptConsole extends UIScriptedMenu HintMessage
bool m_HoverSuccessTriggered
void DisplayHint(string message)
void ScriptConsoleEnfScriptTab(Widget root, ScriptConsole console, Widget button, ScriptConsoleTabBase parent=null)
void ScriptConsoleWeatherTab(Widget root, ScriptConsole console, Widget button, ScriptConsoleTabBase parent=null)
proto native UIManager GetUIManager()
proto native WorkspaceWidget GetWorkspace()
proto native Mission GetMission()
void ShowQuickbarPlayer(bool show)
void ShowHudPlayer(bool show)
ref map< int, string > WidgetHintBindings
void AddActiveInputExcludes(array< string > excludes)
void EnableAllInputs(bool bForceSupress=false)
void RemoveActiveInputExcludes(array< string > excludes, bool bForceSupress=false)
deprecated
bool Back()
Close top window on windows stack, returns true when any window is closed.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Serializer ParamsReadContext
proto native CGame GetGame()
proto void Print(void var)
Prints content of variable to console/log.
proto bool FileExist(string name)
Check existence of file.
proto native void ClearKey(KeyCode key)
proto native int KeyState(KeyCode key)
static proto float Sqrt(float val)
Returns square root.
static proto float AbsFloat(float f)
Returns absolute value.
proto void GetScreenSize(out int x, out int y)
proto void GetMousePos(out int x, out int y)
proto native int Hash()
Returns hash of string.
int ARGB(int a, int r, int g, int b)