DayZ 1.24
Loading...
Searching...
No Matches
ScriptConsoleItemsTab Class Reference
Inheritance diagram for ScriptConsoleItemsTab:
[legend]
Collaboration diagram for ScriptConsoleItemsTab:
[legend]

Protected Member Functions

void ScriptConsoleItemsTab (Widget root, ScriptConsole console, Widget button, ScriptConsoleTabBase parent=null)
 
void ~ScriptConsoleItemsTab ()
 
void Init ()
 
override bool OnKeyDown (Widget w, int x, int y, int key)
 
void SelectObject (bool hide_presets=true)
 
void SelectPreset ()
 
int GetCurrentPresetIndex ()
 
int GetCurrentItemIndex ()
 
bool IsCurrentPresetFixed ()
 
bool IsPresetFixed (string preset_name)
 
int GetPresetIndexByName (string preset_name)
 
void ShowItemButtons ()
 
void HideItemButtons ()
 
void ShowItemTransferButtons ()
 
void ItemMoveUp ()
 
void ItemMoveDown ()
 
void SaveProfileSpawnDistance ()
 
void RenamePreset (string new_preset_name)
 
void SpawnPreset (EntityAI target, bool clear_inventory, string preset_name, InventoryLocationType location=InventoryLocationType.ATTACHMENT, float distance=0)
 
void SetDefaultPreset (int preset_index)
 
void SetObject (string object)
 
void SetPreviewObject (string object)
 
void AddItemToPreset ()
 
void ShowPresetButtons ()
 
void RemoveItemFromPreset ()
 
string GetCurrentPresetName ()
 
string GetCurrentItemName ()
 
string GetCurrentObjectName ()
 
void RefreshLists ()
 
void RenderPresets ()
 
void RenderPresetItems ()
 
void NewPreset (string preset_name)
 
void DeletePreset ()
 
int GetFilterColor (string color)
 
void PrepareFilters (string filter, out TStringArray filters, out TIntArray colors)
 
void ChangeFilter (TStringArray classes, TextListboxWidget widget, MultilineEditBoxWidget filterWidget, int categoryMask=-1, bool ignoreScope=false)
 
void SetFilterOrder (bool reversed)
 
override bool OnChange (Widget w, int x, int y, bool finished)
 
override bool OnItemSelected (Widget w, int x, int y, int row, int column, int oldRow, int oldColumn)
 
override bool OnClick (Widget w, int x, int y, int button)
 
override bool OnDoubleClick (Widget w, int x, int y, int button)
 
override void Update (float timeslice)
 
void SetTextSpawnButton (ButtonWidget w, bool special, string suffix=" Special")
 
void UpdateButtonNames ()
 
TStringArray GetItemsClasses ()
 
string PreprocessFilterText (MultilineEditBoxWidget w)
 
void ChangeFilterItems (bool forced=false)
 

Static Protected Member Functions

static void DrawItems (string type, float distance=0)
 
static void DrawItemsClear ()
 
static string GetLastSelectedObject ()
 

Protected Attributes

const string CONST_DEFAULT_PRESET_PREFIX = "[Default]"
 
ref array< Widgetm_CategoryButtonsWidgets = new array<Widget>
 
ref array< stringm_CategoryButtonsNames = {"FIREARMS", "MELEE", "ATTACHMENTS", "MAGAZINES", "AMMO", "FOOD", "MEDICAL", "CARS", "BACKPACKS", "B-BUILDING"}
 
ref map< Widget, stringm_SpawnButtonsOriginalText = new map<Widget, string>()
 
int m_CategoryMask
 
MissionGameplay m_MissionGameplay
 
ref Timer m_RefreshFilterTimer = new Timer()
 
PluginDeveloper m_Developer
 
bool m_FilterOrderReversed
 
string m_SelectedObject
 
bool m_IsShiftDown
 
string m_FilterTextPrev
 
CheckBoxWidget m_CategoryMergeType
 
CheckBoxWidget m_ItemPreviewCheckbox
 
CheckBoxWidget m_ShowProtected
 
CheckBoxWidget m_ClearInventory
 
TextListboxWidget m_ObjectsTextListbox
 
TextListboxWidget m_PresetsTextListbox
 
TextListboxWidget m_PresetItemsTextListbox
 
ButtonWidget m_DrawInWorld
 
ButtonWidget m_DrawInWorldClear
 
ButtonWidget m_PresetNewButton
 
ButtonWidget m_PresetDeleteButton
 
ButtonWidget m_PresetRenameButton
 
ButtonWidget m_PresetSetDefaultButton
 
ButtonWidget m_PresetAddItemtButton
 
ButtonWidget m_ItemNameCopy
 
ButtonWidget m_PresetRemoveItemButton
 
ButtonWidget m_ItemMoveUpButton
 
ButtonWidget m_ItemMoveDownButton
 
ButtonWidget m_FilterOrderButton
 
ButtonWidget m_SpawnInInvButton
 
ButtonWidget m_SpawnGroundButton
 
ButtonWidget m_SpawnGroundPatternGrid
 
ButtonWidget m_SpawnOnTarget
 
ButtonWidget m_SpawnOnCursor
 
ButtonWidget m_SpawnInHands
 
ButtonWidget m_SpawnBatchButton
 
ButtonWidget m_ListActions
 
MultilineEditBoxWidget m_ObjectFilter
 
EditBoxWidget m_SpawnDistanceEditBox
 
EditBoxWidget m_RectSpawnRow
 
EditBoxWidget m_RectSpawnColumn
 
EditBoxWidget m_RectSpawnRowStep
 
EditBoxWidget m_RectSpawnColumnStep
 
EditBoxWidget m_DrawDistanceWidget
 
EditBoxWidget m_QuantityEditBox
 
EditBoxWidget m_DamageEditBox
 
EditBoxWidget m_BatchSpawnQuantity
 
CheckBoxWidget m_WithPhysicsCheckbox
 
TextWidget m_ItemDamageLabel
 
TextWidget m_ItemQuantityLabel
 
TextWidget m_SelectedObjectText
 
ItemPreviewWidget m_ItemPreviewWidget
 
ImageWidget m_FilterOrderImage
 

Static Protected Attributes

static int ITEMS_SELECTED_ROW = -1
 
static int PRESETS_SELECTED_ROW = 0
 
static int ITEMS_IN_PRESET_SELECTED_ROW
 
static float DRAW_DISTANCE = 1000
 
static bool CLEAR_IVN
 
static int m_ObjectsScope = 2
 
static string m_LastSelectedObject
 
static int m_SelectedObjectIsPreset = -1
 
static ref array< Shapem_DebugShapes = new array<Shape>
 
static EntityAI m_PreviewEntity
 
static float m_ItemQuantity = 1
 
static bool m_WithPhysics = false
 

Private Member Functions

bool ListItemRelatedActions ()
 
- Private Member Functions inherited from ScriptConsoleTabBase
void ScriptConsoleTabBase (Widget root, ScriptConsole console, Widget button, ScriptConsoleTabBase parent=null)
 
void Init (int id)
 
int GetID ()
 
Widget GetRoot ()
 
bool IsSelected ()
 
void Select (bool select, ScriptConsoleTabBase selectedHandler)
 
void OnSelected ()
 
void Show (bool show, ScriptConsoleTabBase selectedHandler)
 
Widget GetButton ()
 
void Update (float timeslice)
 
bool OnChange (Widget w, int x, int y, bool finished)
 
bool OnClick (Widget w, int x, int y, int button)
 
bool OnItemSelected (Widget w, int x, int y, int row, int column, int oldRow, int oldColumn)
 
bool OnKeyDown (Widget w, int x, int y, int key)
 
bool OnDoubleClick (Widget w, int x, int y, int button)
 
void OnRPCEx (int rpc_type, ParamsReadContext ctx)
 
bool OnMouseButtonDown (Widget w, int x, int y, int button)
 
bool OnKeyPress (Widget w, int x, int y, int key)
 
void AddItemToClipboard (TextListboxWidget text_listbox_widget)
 

Additional Inherited Members

- Private Attributes inherited from ScriptConsoleTabBase
int m_Id
 
bool m_IsSelected
 
Widget m_ParentRoot
 
Widget m_Root
 
Widget m_Button
 
ScriptConsole m_ScriptConsole
 
ScriptConsoleTabBase m_Parent
 
PluginConfigDebugProfile m_ConfigDebugProfile
 
PluginConfigDebugProfileFixed m_ConfigDebugProfileFixed
 

Detailed Description

Definition at line 3 of file ScriptConsoleItemsTab.c.

Constructor & Destructor Documentation

◆ ScriptConsoleItemsTab()

void ScriptConsoleItemsTab::ScriptConsoleItemsTab ( Widget root,
ScriptConsole console,
Widget button,
ScriptConsoleTabBase parent = null )
inlineprotected

Definition at line 77 of file ScriptConsoleItemsTab.c.

78 {
79 m_Developer = PluginDeveloper.Cast(GetPlugin(PluginDeveloper));
80
81 m_DrawInWorld = ButtonWidget.Cast(root.FindAnyWidget("ButtonDrawItem"));
82 m_DrawInWorldClear = ButtonWidget.Cast(root.FindAnyWidget("ButtonDrawItemClear"));
83
84 m_CategoryMergeType = CheckBoxWidget.Cast(root.FindAnyWidget("CategoryMergeType"));
85 m_ItemPreviewCheckbox = CheckBoxWidget.Cast(root.FindAnyWidget("ItemPreviewCheckbox"));
86 m_ShowProtected = CheckBoxWidget.Cast(root.FindAnyWidget("ShowProtectedCheckbox"));
87 m_FilterOrderImage = ImageWidget.Cast(root.FindAnyWidget("ObjectFilterSortPic"));
88 m_ClearInventory = CheckBoxWidget.Cast(root.FindAnyWidget("ForceClearCheckbox"));
89 m_DrawDistanceWidget = EditBoxWidget.Cast(root.FindAnyWidget("DrawItemDistance"));
90 m_ObjectFilter = MultilineEditBoxWidget.Cast(root.FindAnyWidget("ObjectFilter"));
91 m_SpawnDistanceEditBox = EditBoxWidget.Cast(root.FindAnyWidget("SpawnDistance"));
92 m_SelectedObjectText = TextWidget.Cast(root.FindAnyWidget("SelectedObject"));
93 m_ObjectsTextListbox = TextListboxWidget.Cast(root.FindAnyWidget("ObjectsList"));
94 m_PresetsTextListbox = TextListboxWidget.Cast(root.FindAnyWidget("PresetList"));
95 m_PresetItemsTextListbox = TextListboxWidget.Cast(root.FindAnyWidget("PresetItemsList"));
96 m_PresetNewButton = ButtonWidget.Cast(root.FindAnyWidget("NewPresetButton"));
97 m_PresetDeleteButton = ButtonWidget.Cast(root.FindAnyWidget("DeletePresetButton"));
98 m_PresetRenameButton = ButtonWidget.Cast(root.FindAnyWidget("RenamePresetButton"));
99 m_PresetSetDefaultButton = ButtonWidget.Cast(root.FindAnyWidget("SetDefaultPresetButton"));
100 m_PresetAddItemtButton = ButtonWidget.Cast(root.FindAnyWidget("AddToPresetButton"));
101 m_ItemNameCopy = ButtonWidget.Cast(root.FindAnyWidget("ItemNameCopy"));
102 m_PresetRemoveItemButton = ButtonWidget.Cast(root.FindAnyWidget("RemoveFromPresetButton"));
103 m_ItemMoveUpButton = ButtonWidget.Cast(root.FindAnyWidget("ItemMoveUpButton"));
104 m_ItemMoveDownButton = ButtonWidget.Cast(root.FindAnyWidget("ItemMoveDownButton"));
105 m_ItemPreviewWidget = ItemPreviewWidget.Cast(root.FindAnyWidget("ItemPreviewWidget"));
106
107 m_QuantityEditBox = EditBoxWidget.Cast(root.FindAnyWidget("QuantityValue"));
108 m_DamageEditBox = EditBoxWidget.Cast(root.FindAnyWidget("DamageValue"));
109 m_ItemDamageLabel = TextWidget.Cast(root.FindAnyWidget("DamageLabel"));
110 m_ItemQuantityLabel = TextWidget.Cast(root.FindAnyWidget("QuantityLabel"));
111 m_WithPhysicsCheckbox = CheckBoxWidget.Cast(root.FindAnyWidget("WithPhysicsCheckbox"));
112
113 m_SpawnInInvButton = ButtonWidget.Cast(root.FindAnyWidget("ButtonSpawnInInv"));
114 m_SpawnGroundButton = ButtonWidget.Cast(root.FindAnyWidget("ButtonSpawnInGround"));
115 m_SpawnOnTarget = ButtonWidget.Cast(root.FindAnyWidget("ButtonSpawnInTarget"));
116 m_SpawnOnCursor = ButtonWidget.Cast(root.FindAnyWidget("ButtonSpawnCursor"));
117 m_SpawnInHands = ButtonWidget.Cast(root.FindAnyWidget("ButtonSpawnHands"));
118 m_SpawnBatchButton = ButtonWidget.Cast(root.FindAnyWidget("ButtonSpawnBatch"));
119
120 string text;
121 m_SpawnInInvButton.GetText(text);
123 m_SpawnGroundButton.GetText(text);
125 m_SpawnOnTarget.GetText(text);
127 m_SpawnOnCursor.GetText(text);
129 m_SpawnInHands.GetText(text);
131 m_SpawnBatchButton.GetText(text);
133
134 m_ListActions = ButtonWidget.Cast(root.FindAnyWidget("ListActions"));
135
136
137 m_RectSpawnColumn = EditBoxWidget.Cast(root.FindAnyWidget("RectangleColumnValue"));
138 m_RectSpawnRow = EditBoxWidget.Cast(root.FindAnyWidget("RectangleRowValue"));
139 m_BatchSpawnQuantity = EditBoxWidget.Cast(root.FindAnyWidget("BatchCount"));
140
141 m_RectSpawnColumnStep = EditBoxWidget.Cast(root.FindAnyWidget("RectangleStepXValue"));
142 m_RectSpawnRowStep = EditBoxWidget.Cast(root.FindAnyWidget("RectangleStepYValue"));
143
144 m_FilterOrderButton = ButtonWidget.Cast(root.FindAnyWidget("ObjectFilterSortButton"));
145 Init();
146 }
PluginBase GetPlugin(typename plugin_type)
CheckBoxWidget m_WithPhysicsCheckbox
ref map< Widget, string > m_SpawnButtonsOriginalText
TextListboxWidget m_PresetItemsTextListbox
MultilineEditBoxWidget m_ObjectFilter
CheckBoxWidget m_ItemPreviewCheckbox
TextListboxWidget m_ObjectsTextListbox
ItemPreviewWidget m_ItemPreviewWidget
TextListboxWidget m_PresetsTextListbox

References GetPlugin(), Init(), m_BatchSpawnQuantity, m_CategoryMergeType, m_ClearInventory, m_DamageEditBox, m_Developer, m_DrawDistanceWidget, m_DrawInWorld, m_DrawInWorldClear, m_FilterOrderButton, m_FilterOrderImage, m_ItemDamageLabel, m_ItemMoveDownButton, m_ItemMoveUpButton, m_ItemNameCopy, m_ItemPreviewCheckbox, m_ItemPreviewWidget, m_ItemQuantityLabel, m_ListActions, m_ObjectFilter, m_ObjectsTextListbox, m_PresetAddItemtButton, m_PresetDeleteButton, m_PresetItemsTextListbox, m_PresetNewButton, m_PresetRemoveItemButton, m_PresetRenameButton, m_PresetSetDefaultButton, m_PresetsTextListbox, m_QuantityEditBox, m_RectSpawnColumn, m_RectSpawnColumnStep, m_RectSpawnRow, m_RectSpawnRowStep, m_SelectedObjectText, m_ShowProtected, m_SpawnBatchButton, m_SpawnButtonsOriginalText, m_SpawnDistanceEditBox, m_SpawnGroundButton, m_SpawnInHands, m_SpawnInInvButton, m_SpawnOnCursor, m_SpawnOnTarget, and m_WithPhysicsCheckbox.

◆ ~ScriptConsoleItemsTab()

void ScriptConsoleItemsTab::~ScriptConsoleItemsTab ( )
inlineprotected

Definition at line 148 of file ScriptConsoleItemsTab.c.

149 {
150 ITEMS_SELECTED_ROW = m_ObjectsTextListbox.GetSelectedRow();
153
154 m_PresetsTextListbox.ClearItems();
155
156 if (m_PreviewEntity)
157 m_PreviewEntity.Delete();
158
160
162 m_ConfigDebugProfile.SetItemCategoryFlag(m_CategoryMask);
163
164 m_ItemQuantity = m_QuantityEditBox.GetText().ToFloat();
166 }
PluginConfigDebugProfile m_ConfigDebugProfile

References ITEMS_IN_PRESET_SELECTED_ROW, ITEMS_SELECTED_ROW, m_CategoryMask, ScriptConsoleTabBase::m_ConfigDebugProfile, m_ItemQuantity, m_ObjectsTextListbox, m_PresetItemsTextListbox, m_PresetsTextListbox, m_PreviewEntity, m_QuantityEditBox, m_RefreshFilterTimer, m_WithPhysics, m_WithPhysicsCheckbox, and PRESETS_SELECTED_ROW.

Member Function Documentation

◆ AddItemToPreset()

void ScriptConsoleItemsTab::AddItemToPreset ( )
inlineprotected

◆ ChangeFilter()

void ScriptConsoleItemsTab::ChangeFilter ( TStringArray classes,
TextListboxWidget widget,
MultilineEditBoxWidget filterWidget,
int categoryMask = -1,
bool ignoreScope = false )
inlineprotected

Definition at line 868 of file ScriptConsoleItemsTab.c.

869 {
870 widget.ClearItems();
871
874
875 string widgetText;
876 filterWidget.GetText(widgetText);
878
881
883
884 for (int i = 0; i < classes.Count(); i++)
885 {
886 string config_path = classes.Get(i);
887
888 int objects_count = GetGame().ConfigGetChildrenCount(config_path);
889 for (int j = 0; j < objects_count; j++)
890 {
891 string child_name;
892
893 GetGame().ConfigGetChildName(config_path, j, child_name);
894
895 int scope = GetGame().ConfigGetInt(config_path + " " + child_name + " scope");
896
898 {
899 int category_bit = GetGame().ConfigGetInt(config_path + " " + child_name + " debug_ItemCategory") - 1;
900 category_bit = (1 << category_bit);
901
902 bool display = false;
903 int color = 0;
905 display = true;
906 else if ((!m_ConfigDebugProfile.GetMergeType() || categoryMask == 0) && filters.Count() > 0)
907 {
909 child_name_lower.ToLower();
910
911 foreach (int indx, string filter: filters)
912 {
913 if (child_name_lower.Contains(filter))
914 {
915 display = false;
916 color = filterColors.Get(indx);
918 if (!arr)
919 {
920 arr = new TStringArray();
922 }
923 arr.Insert(child_name);
925 break;
926 }
927 }
928 }
929 else if (categoryMask == 0)
930 display = true;
931
932 if (display)
933 itemsArray.Insert(child_name);
934
935 }
936 }
937 }
938
939 if (itemsArray)
940 {
941 itemsArray.Sort();
942 foreach (string it: itemsArray)
943 widget.AddItem(it, NULL, 0);
944 }
945
946 if (filters)
947 {
949 filters.Invert();
950
951 foreach (string f: filters)
952 {
954 if (arr2)
955 {
956 arr2.Sort();
957 foreach (string itm: arr2)
958 {
959 int row = widget.AddItem(itm, NULL, 0);
960 int clr = itemsAndColors.Get(itm);
961 if (clr)
962 widget.SetItemColor(row, 0, clr);
963 }
964 }
965 }
966 }
967
968
969 }
void PrepareFilters(string filter, out TStringArray filters, out TIntArray colors)
proto native CGame GetGame()
array< string > TStringArray
Definition EnScript.c:666

References GetGame(), ScriptConsoleTabBase::m_ConfigDebugProfile, m_FilterOrderReversed, m_ObjectsScope, and PrepareFilters().

Referenced by ChangeFilterItems().

◆ ChangeFilterItems()

void ScriptConsoleItemsTab::ChangeFilterItems ( bool forced = false)
inlineprotected

Definition at line 1457 of file ScriptConsoleItemsTab.c.

1458 {
1461 return;
1462
1464 string txt = m_ConfigDebugProfile.GetItemSearch();
1465
1466 m_ConfigDebugProfile.SetItemSearch(widgetText);
1468 }
string PreprocessFilterText(MultilineEditBoxWidget w)
void ChangeFilter(TStringArray classes, TextListboxWidget widget, MultilineEditBoxWidget filterWidget, int categoryMask=-1, bool ignoreScope=false)

References ChangeFilter(), GetItemsClasses(), m_CategoryMask, ScriptConsoleTabBase::m_ConfigDebugProfile, m_FilterTextPrev, m_ObjectFilter, m_ObjectsTextListbox, and PreprocessFilterText().

Referenced by Init(), OnChange(), OnClick(), and SetFilterOrder().

◆ DeletePreset()

void ScriptConsoleItemsTab::DeletePreset ( )
inlineprotected

◆ DrawItems()

static void ScriptConsoleItemsTab::DrawItems ( string type,
float distance = 0 )
inlinestaticprotected

need better logic for cleaning

Definition at line 283 of file ScriptConsoleItemsTab.c.

284 {
285 if (!distance)
289
290 GetGame().GetObjectsAtPosition(GetGame().GetPlayer().GetPosition(), distance, objects, proxies);
291 int i = 0;
292 foreach (Object o: objects)
293 {
294 if (o.IsKindOf(type))
295 {
296 i++;
297 ScriptConsole.m_MarkedEntities.Insert(new MapMarker(o.GetPosition(), "", COLOR_RED, eMapMarkerTypes.MARKERTYPE_MAP_BORDER_CROSS));
298 Shape shape = Shape.CreateSphere(COLOR_RED, ShapeFlags.TRANSP | ShapeFlags.NOOUTLINE | ShapeFlags.NOZBUFFER, o.GetPosition() + "0 30 0", 1);
299 vector lines[2];
300 lines[0] = o.GetPosition();
301 lines[1] = o.GetPosition() + "0 30 0";
302 Shape line = Shape.CreateLines(COLOR_RED, ShapeFlags.TRANSP | ShapeFlags.NOOUTLINE | ShapeFlags.NOZBUFFER, lines, 2);
303 m_DebugShapes.Insert(shape);
304 m_DebugShapes.Insert(line);
305 }
306 }
307
309 //GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLaterByName(this, "DrawItemsClear", 5000);
310 Debug.Log(string.Format("found %1 instances of type %1", i, type));
311 }
PlayerBase GetPlayer()
class JsonUndergroundAreaTriggerData GetPosition
Definition Debug.c:14
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
Definition Debug.c:133
static ref array< Shape > m_DebugShapes
const int COLOR_RED
Definition constants.c:64
ShapeFlags
Definition EnDebug.c:126
class DiagMenu Shape
don't call destructor directly. Use Destroy() instead

References COLOR_RED, DRAW_DISTANCE, GetGame(), GetPlayer(), GetPosition, Debug::Log(), m_DebugShapes, and Shape.

Referenced by OnClick(), and OnKeyDown().

◆ DrawItemsClear()

static void ScriptConsoleItemsTab::DrawItemsClear ( )
inlinestaticprotected

Definition at line 314 of file ScriptConsoleItemsTab.c.

315 {
316 ScriptConsole.m_MarkedEntities.Clear();
317 foreach (Shape s: m_DebugShapes)
318 s.Destroy();
319 m_DebugShapes.Clear();
320 }
proto native void Destroy()
Cleans up the Effect, including unregistering if needed.
Definition Effect.c:207

References m_DebugShapes, and Shape.

Referenced by OnClick().

◆ GetCurrentItemIndex()

int ScriptConsoleItemsTab::GetCurrentItemIndex ( )
inlineprotected

◆ GetCurrentItemName()

string ScriptConsoleItemsTab::GetCurrentItemName ( )
inlineprotected

Definition at line 717 of file ScriptConsoleItemsTab.c.

718 {
719 if (GetCurrentItemIndex() != -1)
720 {
721 string item_name;
723 return item_name;
724 }
725 return "";
726 }

References GetCurrentItemIndex(), and m_PresetItemsTextListbox.

Referenced by Init(), OnClick(), and OnItemSelected().

◆ GetCurrentObjectName()

string ScriptConsoleItemsTab::GetCurrentObjectName ( )
inlineprotected

Definition at line 728 of file ScriptConsoleItemsTab.c.

729 {
730 int selected_row_index = m_ObjectsTextListbox.GetSelectedRow();
731 if (selected_row_index != -1)
732 {
733 string item_name;
735 return item_name;
736 }
737 return "";
738 }

References m_ObjectsTextListbox.

Referenced by Init(), OnDoubleClick(), and SelectObject().

◆ GetCurrentPresetIndex()

int ScriptConsoleItemsTab::GetCurrentPresetIndex ( )
inlineprotected

◆ GetCurrentPresetName()

string ScriptConsoleItemsTab::GetCurrentPresetName ( )
inlineprotected

Definition at line 704 of file ScriptConsoleItemsTab.c.

705 {
707 // load preset items list
708 if (index > -1 && index < m_PresetsTextListbox.GetNumItems())
709 {
712 return item_params_array.param1;
713 }
714 return "";
715 }

References GetCurrentPresetIndex(), and m_PresetsTextListbox.

Referenced by AddItemToPreset(), DeletePreset(), ItemMoveDown(), ItemMoveUp(), OnChange(), OnClick(), RemoveItemFromPreset(), RenamePreset(), RenderPresetItems(), SelectPreset(), SetDefaultPreset(), and ShowItemButtons().

◆ GetFilterColor()

int ScriptConsoleItemsTab::GetFilterColor ( string color)
inlineprotected

Definition at line 818 of file ScriptConsoleItemsTab.c.

819 {
820 switch (color)
821 {
822 case "r":
823 return ARGB(255, 255, 0, 0);
824 case "g":
825 return ARGB(255, 0, 255, 0);
826 case "b":
827 return ARGB(255, 130, 130, 255);
828 case "y":
829 return ARGB(255, 255, 255, 0);
830 case "o":
831 return ARGB(255, 255, 169, 0);
832 }
833 return -1;//white
834 }
int ARGB(int a, int r, int g, int b)
Definition proto.c:322

References ARGB().

Referenced by PrepareFilters().

◆ GetItemsClasses()

TStringArray ScriptConsoleItemsTab::GetItemsClasses ( )
inlineprotected

Definition at line 1439 of file ScriptConsoleItemsTab.c.

1440 {
1442 }
const string CFG_AMMO
Definition constants.c:212
const string CFG_VEHICLESPATH
Definition constants.c:209
const string CFG_WEAPONSPATH
Definition constants.c:210
const string CFG_MAGAZINESPATH
Definition constants.c:211

References CFG_AMMO, CFG_MAGAZINESPATH, CFG_VEHICLESPATH, and CFG_WEAPONSPATH.

Referenced by ChangeFilterItems().

◆ GetLastSelectedObject()

static string ScriptConsoleItemsTab::GetLastSelectedObject ( )
inlinestaticprotected

Definition at line 323 of file ScriptConsoleItemsTab.c.

324 {
326 }

References m_LastSelectedObject.

Referenced by Dispatcher::CallMethod().

◆ GetPresetIndexByName()

int ScriptConsoleItemsTab::GetPresetIndexByName ( string preset_name)
inlineprotected

Definition at line 412 of file ScriptConsoleItemsTab.c.

413 {
414 int i;
415 for (i = 0; i < m_PresetsTextListbox.GetNumItems(); i++)
416 {
419
420 if (item_params_array.param1 == preset_name)
421 return i;
422 }
423 return -1;
424 }

References m_PresetsTextListbox.

Referenced by IsPresetFixed(), RenderPresets(), and SetDefaultPreset().

◆ HideItemButtons()

void ScriptConsoleItemsTab::HideItemButtons ( )
inlineprotected

Definition at line 470 of file ScriptConsoleItemsTab.c.

471 {
472 m_ItemMoveUpButton.Show(false);
473 m_ItemMoveDownButton.Show(false);
474 }

References m_ItemMoveDownButton, and m_ItemMoveUpButton.

Referenced by Init(), OnDoubleClick(), SelectObject(), and ShowPresetButtons().

◆ Init()

void ScriptConsoleItemsTab::Init ( )
inlineprotected

Definition at line 169 of file ScriptConsoleItemsTab.c.

170 {
171 m_RefreshFilterTimer.Run(0.85, this, "ChangeFilterItems", null, true);
172 m_PresetDeleteButton.Show(false);
173 m_PresetRenameButton.Show(false);
174 m_DrawDistanceWidget.SetText(DRAW_DISTANCE.ToString());
175
176 m_QuantityEditBox.SetText(m_ItemQuantity.ToString());
178
180 {
181 string txt = (m_ConfigDebugProfile.GetItemSearch());
182 m_ObjectFilter.SetText(m_ConfigDebugProfile.GetItemSearch());
183 m_SpawnDistanceEditBox.SetText(m_ConfigDebugProfile.GetSpawnDistance().ToString());
184
185
186 SetFilterOrder(m_ConfigDebugProfile.GetFilterOrderReversed());
187 //m_ConfigDebugProfile.SetItemCategoryFlag(m_CategoryMask);
188
189 m_BatchSpawnQuantity.SetText(m_ConfigDebugProfile.GetBatchSpawnQuantity().ToString());
190
191 m_CategoryMask = m_ConfigDebugProfile.GetItemCategoryFlag();
193 m_ItemPreviewCheckbox.SetChecked(m_ConfigDebugProfile.GetShowItemPreview());
194
195 array<ref CfgParam> params = m_ConfigDebugProfile.GetBatchSpawnRectangle();
196
197 m_RectSpawnRow.SetText(CfgParamInt.Cast(params.Get(0)).GetValue().ToString());
198 m_RectSpawnColumn.SetText(CfgParamInt.Cast(params.Get(1)).GetValue().ToString());
199 m_RectSpawnRowStep.SetText(CfgParamFloat.Cast(params.Get(2)).GetValue().ToString());
200 m_RectSpawnColumnStep.SetText(CfgParamFloat.Cast(params.Get(3)).GetValue().ToString());
201 }
202
203
204 if (m_ObjectsScope == 1)
205 m_ShowProtected.SetChecked(true);
206 else
207 m_ShowProtected.SetChecked(false);
208
209 int counter = 0;
210 foreach (string name: m_CategoryButtonsNames)
211 {
212 string widget_name = "ItemCategory" + counter;
213
215 if (btw)
216 {
217 btw.SetText(name);
219 int bit = 1 << counter;
220 if (bit & m_CategoryMask)
221 {
222 btw.SetChecked(true);
223 btw.SetTextColor(ARGB(255, 255, 0, 0));
224 }
225 }
226 counter++;
227 }
228
230 {
233
234 m_SelectedObjectText.SetText("Object : " + GetCurrentItemName());
237 }
238
239 ChangeFilterItems(true);
240
242 //RenderPresetItems();
243
244 m_MissionGameplay = MissionGameplay.Cast(GetGame().GetMission());
245
246 if (!m_SelectedObjectIsPreset == 1 && ITEMS_SELECTED_ROW < m_ObjectsTextListbox.GetNumItems() && m_ObjectsTextListbox.GetNumItems() > 0 && ITEMS_SELECTED_ROW > -1)
247 {
250
251
253
254
257 m_PresetItemsTextListbox.SelectRow(-1);
259 }
260
261 if (m_PresetsTextListbox.GetNumItems() >= 0)
262 {
266 SelectPreset();
267 else
269 }
270
271 if (m_ObjectsScope == 1)
272 m_ShowProtected.SetChecked(true);
273 else
274 m_ShowProtected.SetChecked(false);
275
276
277 m_CategoryMergeType.SetChecked(m_ConfigDebugProfile.GetMergeType());
278
281 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
ref array< string > m_CategoryButtonsNames
MissionGameplay m_MissionGameplay
ref array< Widget > m_CategoryButtonsWidgets
void SetObject(string object)
void ChangeFilterItems(bool forced=false)
void SetFilterOrder(bool reversed)

References ARGB(), ChangeFilterItems(), DRAW_DISTANCE, GetCurrentItemName(), GetCurrentObjectName(), GetGame(), HideItemButtons(), ITEMS_IN_PRESET_SELECTED_ROW, ITEMS_SELECTED_ROW, m_BatchSpawnQuantity, m_CategoryButtonsNames, m_CategoryButtonsWidgets, m_CategoryMask, m_CategoryMergeType, ScriptConsoleTabBase::m_ConfigDebugProfile, m_DrawDistanceWidget, m_ItemPreviewCheckbox, m_ItemQuantity, m_LastSelectedObject, m_MissionGameplay, m_ObjectFilter, m_ObjectsScope, m_ObjectsTextListbox, ScriptConsoleTabBase::m_ParentRoot, m_PresetDeleteButton, m_PresetItemsTextListbox, m_PresetRenameButton, m_PresetsTextListbox, m_QuantityEditBox, m_RectSpawnColumn, m_RectSpawnColumnStep, m_RectSpawnRow, m_RectSpawnRowStep, m_RefreshFilterTimer, m_SelectedObject, m_SelectedObjectIsPreset, m_SelectedObjectText, m_ShowProtected, m_SpawnDistanceEditBox, m_WithPhysics, m_WithPhysicsCheckbox, name, PRESETS_SELECTED_ROW, RenderPresetItems(), RenderPresets(), SelectPreset(), SetFilterOrder(), SetObject(), and ShowItemTransferButtons().

Referenced by ScriptConsoleItemsTab().

◆ IsCurrentPresetFixed()

bool ScriptConsoleItemsTab::IsCurrentPresetFixed ( )
inlineprotected

Definition at line 388 of file ScriptConsoleItemsTab.c.

389 {
391 if (index > -1 && index < m_PresetsTextListbox.GetNumItems())
392 {
395 return item_params_array.param2;
396 }
397 return false;
398 }

References GetCurrentPresetIndex(), and m_PresetsTextListbox.

Referenced by RenderPresetItems(), ShowItemButtons(), ShowItemTransferButtons(), ShowPresetButtons(), and SpawnPreset().

◆ IsPresetFixed()

bool ScriptConsoleItemsTab::IsPresetFixed ( string preset_name)
inlineprotected

Definition at line 400 of file ScriptConsoleItemsTab.c.

401 {
404 if (preset_index > -1 && preset_index < m_PresetsTextListbox.GetNumItems())
405 {
407 return item_params_array.param2;
408 }
409 return false;
410 }
int GetPresetIndexByName(string preset_name)

References GetPresetIndexByName(), and m_PresetsTextListbox.

Referenced by RenderPresets(), SelectPreset(), and SetDefaultPreset().

◆ ItemMoveDown()

void ScriptConsoleItemsTab::ItemMoveDown ( )
inlineprotected

◆ ItemMoveUp()

void ScriptConsoleItemsTab::ItemMoveUp ( )
inlineprotected

◆ ListItemRelatedActions()

bool ScriptConsoleItemsTab::ListItemRelatedActions ( )
inlineprivate

Definition at line 1470 of file ScriptConsoleItemsTab.c.

1471 {
1472 string message = "";
1473
1476 if (interactActions)
1477 {
1478 message += "\n== Interact (F)\n\n";
1480 {
1481 if (iaction.Type() == ActionWorldCraft)
1482 continue;
1483
1484 ActionBase ia = ActionBase.Cast(iaction);
1485 message += string.Format("%1 <%2>\n", Widget.TranslateString(ia.GetText()), ia.ClassName());
1486 }
1487 }
1488
1492 {
1493 message += "\n== Continuous Interact (F hold)\n\n";
1495 {
1496 if (ciaction.Type() == ActionWorldCraft)
1497 continue;
1498
1499 ActionBase cia = ActionBase.Cast(ciaction);
1500 message += string.Format("%1 <%2>\n", Widget.TranslateString(cia.GetText()), cia.ClassName());
1501 }
1502 }
1503
1506 if (singleActions)
1507 {
1508 message += "\n== Single (LMB)\n\n";
1510 {
1511 if (saction.Type() == ActionWorldCraft)
1512 continue;
1513
1514 ActionBase sa = ActionBase.Cast(saction);
1515 message += string.Format("%1 <%2>\n", Widget.TranslateString(sa.GetText()), sa.ClassName());
1516 }
1517 }
1518
1520 m_PreviewEntity.GetActions(ContinuousDefaultActionInput, continuousActions);
1522 {
1524 message += "\n== Continuous (LMB hold)\n\n";
1526 {
1527 if (caction.Type() != ActionWorldCraft)
1528 {
1529 ActionBase ca = ActionBase.Cast(caction);
1530 message += string.Format("%1 <%2>\n", Widget.TranslateString(ca.GetText()), ca.ClassName());
1531 }
1532 else
1534 }
1535 message += "\n== Crafting recipes \n\n";
1536 if (craftingAction)
1537 {
1538 PluginRecipesManager pluginRecipesManager = PluginRecipesManager.Cast(GetPlugin(PluginRecipesManager));
1539 array<RecipeBase> recipes = pluginRecipesManager.GetRecipesForItem(m_PreviewEntity.GetType());
1540 foreach (RecipeBase recipe : recipes)
1541 {
1542 if (recipe.IsItemInRecipe("Inventory_Base"))
1543 continue;
1544
1545 message += string.Format("%1 <%2>\n", Widget.TranslateString(recipe.GetName()), recipe.Type());
1546 }
1547 }
1548 }
1549
1550 ScriptConsoleUniversalInfoDialog infoDialog = ScriptConsoleUniversalInfoDialog.Cast(g_Game.GetUIManager().EnterScriptedMenu(MENU_SCRIPTCONSOLE_UNIVERSAL_INFO_DIALOG, m_ScriptConsole));
1551 infoDialog.SetLabel(string.Format("%1 related actions", m_PreviewEntity.GetType()));
1552 infoDialog.SetContent(message);
1553
1554 return true;
1555 }
DayZGame g_Game
Definition DayZGame.c:3528
const int MENU_SCRIPTCONSOLE_UNIVERSAL_INFO_DIALOG
Definition constants.c:203

References g_Game, GetPlugin(), m_PreviewEntity, ScriptConsoleTabBase::m_ScriptConsole, and MENU_SCRIPTCONSOLE_UNIVERSAL_INFO_DIALOG.

Referenced by OnClick().

◆ NewPreset()

void ScriptConsoleItemsTab::NewPreset ( string preset_name)
inlineprotected

Definition at line 803 of file ScriptConsoleItemsTab.c.

804 {
806 RefreshLists();
807 }

References ScriptConsoleTabBase::m_ConfigDebugProfile, and RefreshLists().

◆ OnChange()

override bool ScriptConsoleItemsTab::OnChange ( Widget w,
int x,
int y,
bool finished )
inlineprotected

Definition at line 984 of file ScriptConsoleItemsTab.c.

985 {
986 super.OnChange(w, x, y, finished);
987 if (w == m_ShowProtected)
988 {
989 if (m_ShowProtected.IsChecked())
990 m_ObjectsScope = 1;
991 else
992 m_ObjectsScope = 2;
993 ChangeFilterItems(true);
994 return true;
995 }
996 else if (w == m_ClearInventory)
997 {
998 CLEAR_IVN = m_ClearInventory.IsChecked();
999 return true;
1000 }
1001 else if (m_CategoryButtonsWidgets.Find(w) >= 0)
1002 {
1003
1004 int pos = m_CategoryButtonsWidgets.Find(w);
1005 int bit = Math.Pow(2, pos);
1007 if (cbw.IsChecked())
1008 {
1010 cbw.SetTextColor(ARGB(255, 255, 0, 0));
1011 }
1012 else
1013 {
1015 cbw.SetTextColor(ARGB(255, 255, 255, 255));
1016 }
1017
1018 ChangeFilterItems(true);
1019 return true;
1020 }
1021
1022 /*
1023 if (w == m_ObjectFilter)
1024 {
1025 m_RefreshFilterTimer.Run(0.85, this, "ChangeFilterItems", null, false);
1026 return true;
1027 }*/
1028 if (w == m_QuantityEditBox && (GetCurrentItemIndex() >= 0 || GetCurrentPresetName() != ""))
1029 {
1030 m_ConfigDebugProfile.SetItemQuantity(GetCurrentPresetName(), GetCurrentItemIndex(), m_QuantityEditBox.GetText().ToFloat());
1031 return true;
1032 }
1033 else if (w == m_DrawDistanceWidget)
1034 {
1035 DRAW_DISTANCE = m_DrawDistanceWidget.GetText().ToFloat();
1036 return true;
1037 }
1038 else if (w == m_DamageEditBox && (GetCurrentItemIndex() >= 0 || GetCurrentPresetName() != ""))
1039 {
1040 m_ConfigDebugProfile.SetItemHealth(GetCurrentPresetName(), GetCurrentItemIndex(), m_DamageEditBox.GetText().ToFloat());
1041 return true;
1042 }
1043 else if (w == m_WithPhysicsCheckbox && (GetCurrentItemIndex() >= 0 || GetCurrentPresetName() != ""))
1044 {
1046 return true;
1047 }
1048 else if (w == m_BatchSpawnQuantity)
1049 {
1050 m_ConfigDebugProfile.SetBatchSpawnQuantity(m_BatchSpawnQuantity.GetText().ToInt());
1051 return true;
1052 }
1054 {
1055 if (w == m_RectSpawnRow || w == m_RectSpawnColumn)
1056 {
1057 int rowQ = m_RectSpawnRow.GetText().ToInt();
1058 int columnQ = m_RectSpawnColumn.GetText().ToInt();
1059 int result = columnQ * rowQ;
1060 m_BatchSpawnQuantity.SetText(result.ToString());
1061 m_ConfigDebugProfile.SetBatchSpawnQuantity(m_BatchSpawnQuantity.GetText().ToInt());
1062 }
1063
1065 m_ConfigDebugProfile.SetBatchSpawnRectangle(m_RectSpawnRow.GetText().ToInt(), m_RectSpawnColumn.GetText().ToInt(), m_RectSpawnRowStep.GetText().ToFloat(), m_RectSpawnColumnStep.GetText().ToFloat());
1066 return true;
1067 }
1068 return false;
1069 }
Icon x
Icon y
Definition EnMath.c:7
static proto float Pow(float v, float power)
Return power of v ^ power.

References ARGB(), ChangeFilterItems(), CLEAR_IVN, DRAW_DISTANCE, GetCurrentItemIndex(), GetCurrentPresetName(), m_BatchSpawnQuantity, m_CategoryButtonsWidgets, m_CategoryMask, m_ClearInventory, ScriptConsoleTabBase::m_ConfigDebugProfile, m_DamageEditBox, m_DrawDistanceWidget, m_ObjectsScope, m_QuantityEditBox, m_RectSpawnColumn, m_RectSpawnColumnStep, m_RectSpawnRow, m_RectSpawnRowStep, m_ShowProtected, m_WithPhysicsCheckbox, Math::Pow(), x, and y.

◆ OnClick()

override bool ScriptConsoleItemsTab::OnClick ( Widget w,
int x,
int y,
int button )
inlineprotected

Definition at line 1103 of file ScriptConsoleItemsTab.c.

1104 {
1105 super.OnClick(w, x, y, button);
1108 if (w == m_CategoryMergeType)
1109 {
1111 m_ConfigDebugProfile.SetMergeType(m_CategoryMergeType.IsChecked());
1112 ChangeFilterItems(true);
1113 // Refresh UI by new settings
1114 m_MissionGameplay.GetHudDebug().RefreshByLocalProfile();
1115 return true;
1116 }
1117 else if (w == m_ObjectFilter)
1118 {
1119 ChangeFilterItems(true);
1120 return true;
1121 }
1122 else if (w == m_ItemPreviewCheckbox)
1123 {
1125 {
1126 m_ConfigDebugProfile.SetShowItemPreview(m_ItemPreviewCheckbox.IsChecked());
1127 if (!m_ItemPreviewCheckbox.IsChecked())
1129 }
1130 }
1132 {
1134
1135 objects_row_index = m_ObjectsTextListbox.GetSelectedRow();
1136
1137 vector rayStart = GetGame().GetCurrentCameraPosition();
1138 vector rayEnd = rayStart + GetGame().GetCurrentCameraDirection() * 50;
1139 vector hitPos;
1143 //DayZPhysics.RaycastRV(rayStart, rayEnd, hitPos, hitNormal, hitComponentIndex, hitObjects, NULL, player,);
1145
1147 if (hitObjects.Count())
1148 target = EntityAI.Cast(hitObjects.Get(0));
1149
1150 if (m_SelectedObject != "")
1151 {
1152 // @NOTE: duplicate code in PluginDeveloper.c
1153 float distance = m_SpawnDistanceEditBox.GetText().ToFloat();
1154
1155
1156 if (m_SelectedObjectIsPreset == 1)
1157 {
1158 //------------ PRESETS -------------
1159 switch (w)
1160 {
1161 case m_SpawnOnTarget:
1162 {
1163 if (target && target.IsInherited(EntityAI))
1164 {
1167 }
1168 break;
1169 }
1171 {
1173 break;
1174 }
1175 default:
1176 {
1178 break;
1179 }
1180 }
1181 }
1182 else
1183 {
1184 //------------SINGLE ITEMS ------------
1185
1186
1187 float health = m_DamageEditBox.GetText().ToFloat() * MiscGameplayFunctions.GetTypeMaxGlobalHealth(m_SelectedObject);
1188 float quantity = m_QuantityEditBox.GetText().ToFloat();
1189 bool withPhysics = m_WithPhysicsCheckbox.IsChecked();
1190
1192
1193
1194 switch (w)
1195 {
1197 {
1199 break;
1200 }
1201
1202 case m_SpawnOnTarget:
1203 {
1204 if (target && target.IsInherited(EntityAI))
1205 m_Developer.SpawnEntityInInventory(target, m_SelectedObject, health, quantity, m_IsShiftDown);
1206 break;
1207 }
1208
1209 case m_SpawnInInvButton:
1210 {
1211 m_Developer.SpawnEntityInPlayerInventory(player, m_SelectedObject, -1, quantity, m_IsShiftDown);
1212 break;
1213 }
1214 case m_SpawnInHands:
1215 {
1216 m_Developer.SpawnEntityInPlayerInventory(player, m_SelectedObject, -1, quantity, m_IsShiftDown, "", FindInventoryLocationType.HANDS);
1217 break;
1218 }
1219 case m_SpawnOnCursor:
1221 {
1222 if (spawnOnCrossHair)
1223 m_Developer.SpawnItemOnCrosshair(player, m_SelectedObject, health, quantity, 40, true, m_IsShiftDown, withPhysics);
1224 else
1226 break;
1227 }
1228 }
1229 }
1230 }
1231 return true;
1232 }
1233 else if (w == m_FilterOrderButton)
1234 {
1236 return true;
1237 }
1238 else if (w == m_PresetsTextListbox)
1239 {
1240 SelectPreset();
1241 return true;
1242 }
1243 else if (w == m_PresetItemsTextListbox)
1244 {
1245 m_ObjectsTextListbox.SelectRow(-1);
1248 m_SelectedObjectText.SetText("Object : " + GetCurrentItemName());
1251
1252 return true;
1253 }
1254 else if (w == m_PresetSetDefaultButton)
1255 {
1256 if (GetCurrentPresetName() != "")
1258 return true;
1259 }
1260 else if (w == m_PresetNewButton)
1261 {
1262 g_Game.GetUIManager().EnterScriptedMenu(MENU_SCRIPTCONSOLE_DIALOG_PRESET_NAME, m_ScriptConsole);
1263 return true;
1264 }
1265 else if (w == m_PresetDeleteButton)
1266 {
1267 if (GetCurrentPresetName() != "")
1268 DeletePreset();
1269 return true;
1270 }
1271 else if (w == m_PresetRenameButton)
1272 {
1273 if (GetCurrentPresetName() != "")
1274 g_Game.GetUIManager().EnterScriptedMenu(MENU_SCRIPTCONSOLE_DIALOG_PRESET_RENAME, m_ScriptConsole);
1275 return true;
1276 }
1277 else if (w == m_PresetAddItemtButton)
1278 {
1280 return true;
1281 }
1282 else if (w == m_ItemNameCopy)
1283 {
1285 return true;
1286 }
1287 else if (w == m_PresetRemoveItemButton)
1288 {
1290 return true;
1291 }
1292 else if (w == m_ItemMoveUpButton)
1293 {
1294 ItemMoveUp();
1295 return true;
1296 }
1297 else if (w == m_ItemMoveDownButton)
1298 {
1299 ItemMoveDown();
1300 return true;
1301 }
1302 else if (w == m_SpawnBatchButton)
1303 {
1304 int count = m_BatchSpawnQuantity.GetText().ToInt();
1305 int rows = m_RectSpawnRow.GetText().ToInt();
1306 int columns = m_RectSpawnColumn.GetText().ToInt();
1307 float rowStep = m_RectSpawnRowStep.GetText().ToFloat();
1308 float columnStep = m_RectSpawnColumnStep.GetText().ToFloat();
1309 m_Developer.SpawnEntityOnGroundPatternGrid(player, m_SelectedObject, count, m_DamageEditBox.GetText().ToFloat(), 1, rows, columns, rowStep, columnStep, m_IsShiftDown, m_WithPhysicsCheckbox.IsChecked());
1310 return true;
1311 }
1312 else if (w == m_ListActions)
1313 {
1314 if (!m_PreviewEntity)
1315 return false;
1316
1317 return ListItemRelatedActions();
1318 }
1319 else if (w == m_ObjectsTextListbox)
1320 {
1321 SelectObject();
1322 return true;
1323 }
1324 else if (w == m_DrawInWorld)
1325 {
1327 return true;
1328
1329 }
1330 else if (w == m_DrawInWorldClear)
1331 {
1333 return true;
1334 }
1335
1336 return false;
1337 }
FindInventoryLocationType
flags for searching locations in inventory
InventoryLocationType
types of Inventory Location
static proto bool RaycastRV(vector begPos, vector endPos, out vector contactPos, out vector contactDir, out int contactComponent, set< Object > results=NULL, Object with=NULL, Object ignore=NULL, bool sorted=false, bool ground_only=false, int iType=ObjIntersectView, float radius=0.0, CollisionFlags flags=CollisionFlags.NEARESTCONTACT)
Raycasts world by given parameters.
static bool IsFreeCameraEnabled()
proto native void SetItem(EntityAI object)
void SpawnPreset(EntityAI target, bool clear_inventory, string preset_name, InventoryLocationType location=InventoryLocationType.ATTACHMENT, float distance=0)
void SelectObject(bool hide_presets=true)
void SetDefaultPreset(int preset_index)
static void DrawItems(string type, float distance=0)
void AddItemToClipboard(TextListboxWidget text_listbox_widget)
const int MENU_SCRIPTCONSOLE_DIALOG_PRESET_NAME
Definition constants.c:177
const int MENU_SCRIPTCONSOLE_DIALOG_PRESET_RENAME
Definition constants.c:178

References ScriptConsoleTabBase::AddItemToClipboard(), AddItemToPreset(), ChangeFilterItems(), CLEAR_IVN, DeletePreset(), DrawItems(), DrawItemsClear(), g_Game, GetCurrentItemName(), GetCurrentPresetIndex(), GetCurrentPresetName(), GetGame(), GetPlayer(), DeveloperFreeCamera::IsFreeCameraEnabled(), ItemMoveDown(), ItemMoveUp(), ListItemRelatedActions(), m_BatchSpawnQuantity, m_CategoryMergeType, ScriptConsoleTabBase::m_ConfigDebugProfile, m_DamageEditBox, m_Developer, m_DrawInWorld, m_DrawInWorldClear, m_FilterOrderButton, m_FilterOrderReversed, m_IsShiftDown, m_ItemMoveDownButton, m_ItemMoveUpButton, m_ItemNameCopy, m_ItemPreviewCheckbox, m_ItemPreviewWidget, m_ListActions, m_MissionGameplay, m_ObjectFilter, m_ObjectsTextListbox, m_PresetAddItemtButton, m_PresetDeleteButton, m_PresetItemsTextListbox, m_PresetNewButton, m_PresetRemoveItemButton, m_PresetRenameButton, m_PresetSetDefaultButton, m_PresetsTextListbox, m_PreviewEntity, m_QuantityEditBox, m_RectSpawnColumn, m_RectSpawnColumnStep, m_RectSpawnRow, m_RectSpawnRowStep, ScriptConsoleTabBase::m_ScriptConsole, m_SelectedObject, m_SelectedObjectIsPreset, m_SelectedObjectText, m_SpawnBatchButton, m_SpawnDistanceEditBox, m_SpawnGroundButton, m_SpawnGroundPatternGrid, m_SpawnInHands, m_SpawnInInvButton, m_SpawnOnCursor, m_SpawnOnTarget, m_WithPhysicsCheckbox, MENU_SCRIPTCONSOLE_DIALOG_PRESET_NAME, MENU_SCRIPTCONSOLE_DIALOG_PRESET_RENAME, DayZPhysics::RaycastRV(), RemoveItemFromPreset(), SaveProfileSpawnDistance(), SelectObject(), SelectPreset(), SetDefaultPreset(), SetFilterOrder(), ItemPreviewWidget::SetItem(), SetObject(), ShowItemButtons(), ShowItemTransferButtons(), SpawnPreset(), x, and y.

◆ OnDoubleClick()

override bool ScriptConsoleItemsTab::OnDoubleClick ( Widget w,
int x,
int y,
int button )
inlineprotected

Definition at line 1339 of file ScriptConsoleItemsTab.c.

1340 {
1341 super.OnDoubleClick(w, x, y, button);
1342
1343 int i;
1346
1347 if (w == m_ObjectsTextListbox)
1348 {
1349 //select item
1350 m_PresetItemsTextListbox.SelectRow(-1);
1353 m_SelectedObjectText.SetText("Object : " + GetCurrentObjectName());
1354
1358
1359 //spawn item
1361
1362 objects_row_index = m_ObjectsTextListbox.GetSelectedRow();
1363
1364 vector rayStart = GetGame().GetCurrentCameraPosition();
1365 vector rayEnd = rayStart + GetGame().GetCurrentCameraDirection() * 1.5;
1366 vector hitPos;
1371
1372 Object target = NULL;
1373 if (hitObjects.Count())
1374 target = hitObjects.Get(0);
1375
1376 if (m_SelectedObject != "")
1377 {
1378 float distance = m_SpawnDistanceEditBox.GetText().ToFloat();
1379
1380 if (button == 0) //LMB
1381 {
1382 m_Developer.SpawnEntityOnCursorDir(player, m_SelectedObject, 1, distance);
1383 return true;
1384 }
1385 else if (button == 1) //RMB
1386 {
1387 if (GetGame().IsMultiplayer())
1388 m_Developer.SpawnEntityInPlayerInventory(player, m_SelectedObject, -1, -1);
1389 else
1390 {
1391 EntityAI spawned_entity = m_Developer.SpawnEntityOnCursorDir(player, m_SelectedObject, -1, distance);
1392 player.LocalTakeEntityToHands(spawned_entity);
1393 }
1394 return true;
1395 }
1396 else if (button == 2) //MMB
1397 {
1398 m_Developer.SpawnEntityOnCursorDir(player, m_SelectedObject, 1, distance, -1, true);
1399 return true;
1400 }
1401 }
1402
1403 }
1404 else if (w == m_QuantityEditBox)
1405 {
1406 m_QuantityEditBox.SetText("1.0");
1407 return true;
1408 }
1409 return false;
1410 }

References GetCurrentObjectName(), GetGame(), GetPlayer(), HideItemButtons(), m_Developer, m_LastSelectedObject, m_ObjectsTextListbox, m_PresetItemsTextListbox, m_QuantityEditBox, m_SelectedObject, m_SelectedObjectIsPreset, m_SelectedObjectText, m_SpawnDistanceEditBox, DayZPhysics::RaycastRV(), SaveProfileSpawnDistance(), ShowItemTransferButtons(), x, and y.

◆ OnItemSelected()

override bool ScriptConsoleItemsTab::OnItemSelected ( Widget w,
int x,
int y,
int row,
int column,
int oldRow,
int oldColumn )
inlineprotected

Definition at line 1071 of file ScriptConsoleItemsTab.c.

1072 {
1073 super.OnItemSelected(w, x, y, row, column, oldRow, oldColumn);
1075 {
1076 if (m_PresetsTextListbox.GetSelectedRow() != -1)
1077 {
1078 SelectPreset();
1079 return true;
1080 }
1081 }
1082 else if (w == m_PresetItemsTextListbox)
1083 {
1084 if (m_PresetItemsTextListbox.GetSelectedRow() != -1)
1085 {
1091 }
1092 return true;
1093 }
1094 else if (w == m_ObjectsTextListbox)
1095 {
1096 SelectObject(false);
1097 return true;
1098 }
1099 return false;
1100 }

References GetCurrentItemName(), m_ObjectsTextListbox, m_PresetItemsTextListbox, m_PresetsTextListbox, m_SelectedObjectIsPreset, m_SelectedObjectText, SelectObject(), SelectPreset(), SetObject(), ShowItemButtons(), ShowItemTransferButtons(), x, and y.

◆ OnKeyDown()

override bool ScriptConsoleItemsTab::OnKeyDown ( Widget w,
int x,
int y,
int key )
inlineprotected

Definition at line 328 of file ScriptConsoleItemsTab.c.

329 {
330 if (key == KeyCode.KC_D && m_SelectedObject != "")
331 {
333 return true;
334 }
335 else
336 return super.OnKeyDown(w, x, y, key);
337 }
KeyCode
Definition EnSystem.c:157

References DrawItems(), m_SelectedObject, x, and y.

◆ PrepareFilters()

void ScriptConsoleItemsTab::PrepareFilters ( string filter,
out TStringArray filters,
out TIntArray colors )
inlineprotected

Definition at line 836 of file ScriptConsoleItemsTab.c.

837 {
838 filter.Trim();
839 filter.ToLower();
840
841 filters = new TStringArray;
843 filter.Split(" ", rawFilters);
844
845 colors = new TIntArray;
846
847
848 foreach (int i, string f: rawFilters)
849 {
850 int color = -1;
851 if (f.IndexOf(":") == 1)//detect color prefix
852 {
853 string clr = f.Substring(0, 1);
854 f = f.Substring(2, f.Length() - 2);//crop off color prefix
856 }
857 else//autocolor
858 {
859 if (i % 2 == 1)
860 color = ARGB(200, 255, 255, 255);
861 }
862 filters.Insert(f);
863 colors.Insert(color);
864 }
865 }
int GetFilterColor(string color)
array< int > TIntArray
Definition EnScript.c:668

References ARGB(), and GetFilterColor().

Referenced by ChangeFilter().

◆ PreprocessFilterText()

string ScriptConsoleItemsTab::PreprocessFilterText ( MultilineEditBoxWidget w)
inlineprotected

Definition at line 1444 of file ScriptConsoleItemsTab.c.

1445 {
1446 string widgetText;
1447 w.GetText(widgetText);
1448
1449 if (widgetText.Contains(","))
1450 {
1451 widgetText.Replace(",", " ");
1452 w.SetLine(0, widgetText);
1453 }
1454 return widgetText;
1455 }

Referenced by ChangeFilterItems().

◆ RefreshLists()

void ScriptConsoleItemsTab::RefreshLists ( )
inlineprotected

Definition at line 740 of file ScriptConsoleItemsTab.c.

741 {
744 }

References RenderPresetItems(), and RenderPresets().

Referenced by DeletePreset(), NewPreset(), and RenamePreset().

◆ RemoveItemFromPreset()

void ScriptConsoleItemsTab::RemoveItemFromPreset ( )
inlineprotected

◆ RenamePreset()

void ScriptConsoleItemsTab::RenamePreset ( string new_preset_name)
inlineprotected

◆ RenderPresetItems()

void ScriptConsoleItemsTab::RenderPresetItems ( )
inlineprotected

◆ RenderPresets()

void ScriptConsoleItemsTab::RenderPresets ( )
inlineprotected

Definition at line 747 of file ScriptConsoleItemsTab.c.

748 {
749 m_PresetsTextListbox.ClearItems();
750
751 int i;
753
754 // load custom presets list
756 for (i = custom_presets_array.Count() - 1; i >= 0; i--)
757 m_PresetsTextListbox.AddItem(custom_presets_array.Get(i), new PresetParams(custom_presets_array.Get(i), false, false), 0);
758
759 // load fixed presets list
761 for (i = 0; i < presets_array.Count(); i++)
762 m_PresetsTextListbox.AddItem("[" + presets_array.Get(i) + "]", new PresetParams(presets_array.Get(i), true, false), 0);
763 string default_preset = m_ConfigDebugProfile.GetDefaultPreset();
764 if (default_preset != "")
765 {
766 // if is fixed
769 default_preset = "[" + default_preset + "]";
771 if (index > -1 && index < m_PresetsTextListbox.GetNumItems())
772 {
775 }
776 }
777 }
Param3< string, bool, bool > PresetParams
const string CONST_DEFAULT_PRESET_PREFIX
bool IsPresetFixed(string preset_name)

References CONST_DEFAULT_PRESET_PREFIX, GetPresetIndexByName(), IsPresetFixed(), ScriptConsoleTabBase::m_ConfigDebugProfile, ScriptConsoleTabBase::m_ConfigDebugProfileFixed, and m_PresetsTextListbox.

Referenced by Init(), and RefreshLists().

◆ SaveProfileSpawnDistance()

void ScriptConsoleItemsTab::SaveProfileSpawnDistance ( )
inlineprotected

Definition at line 519 of file ScriptConsoleItemsTab.c.

520 {
522 m_ConfigDebugProfile.SetSpawnDistance(m_SpawnDistanceEditBox.GetText().ToFloat());
523 }

References ScriptConsoleTabBase::m_ConfigDebugProfile, and m_SpawnDistanceEditBox.

Referenced by OnClick(), and OnDoubleClick().

◆ SelectObject()

◆ SelectPreset()

◆ SetDefaultPreset()

void ScriptConsoleItemsTab::SetDefaultPreset ( int preset_index)
inlineprotected

Definition at line 591 of file ScriptConsoleItemsTab.c.

592 {
593 // remove previous default parameter
594 string default_preset = m_ConfigDebugProfile.GetDefaultPreset();
595 if (default_preset != "")
596 {
598 // if is fixed
600 default_preset = "[" + default_preset + "]";
602 if (index > -1 && index < m_PresetsTextListbox.GetNumItems())
603 {
605 prev_preset_params_array.param3 = false; // remove DEFAULT
607 }
608 }
609
610 // set preset on preset_index to default
611 // if is fixed
614 preset_name = "[" + preset_name + "]";
615 // set new default preset
618 if (index > -1 && index < m_PresetsTextListbox.GetNumItems())
619 {
621 preset_params_array.param3 = true; // DEFAULT
623 }
624 // store preset
625 m_ConfigDebugProfile.SetDefaultPreset(GetCurrentPresetName());
626 }

References CONST_DEFAULT_PRESET_PREFIX, GetCurrentPresetIndex(), GetCurrentPresetName(), GetPresetIndexByName(), IsPresetFixed(), ScriptConsoleTabBase::m_ConfigDebugProfile, and m_PresetsTextListbox.

Referenced by OnClick().

◆ SetFilterOrder()

void ScriptConsoleItemsTab::SetFilterOrder ( bool reversed)
inlineprotected

Definition at line 972 of file ScriptConsoleItemsTab.c.

973 {
975 if (reversed)
976 m_FilterOrderImage.SetRotation(0, 0, 180, true);
977 else
978 m_FilterOrderImage.SetRotation(0, 0, 0, true);
979 ChangeFilterItems(true);
981 m_ConfigDebugProfile.SetFilterOrderReversed(reversed);
982 }

References ChangeFilterItems(), ScriptConsoleTabBase::m_ConfigDebugProfile, m_FilterOrderImage, and m_FilterOrderReversed.

Referenced by Init(), and OnClick().

◆ SetObject()

void ScriptConsoleItemsTab::SetObject ( string object)
inlineprotected

Definition at line 628 of file ScriptConsoleItemsTab.c.

629 {
631
632 if (m_ConfigDebugProfile && m_ConfigDebugProfile.GetShowItemPreview())
633 SetPreviewObject(object);
634
635 }
void SetPreviewObject(string object)

References ScriptConsoleTabBase::m_ConfigDebugProfile, m_SelectedObject, and SetPreviewObject().

Referenced by Init(), OnClick(), OnItemSelected(), and SelectObject().

◆ SetPreviewObject()

void ScriptConsoleItemsTab::SetPreviewObject ( string object)
inlineprotected

Definition at line 637 of file ScriptConsoleItemsTab.c.

638 {
639#ifdef DEVELOPER
640 if (m_PreviewEntity)
641 m_PreviewEntity.Delete();
642
643 if (!GetGame().IsKindOf(object, "DZ_LightAI") && !GetGame().IsKindOf(object, "Man"))
644 {
645 DayZGame.m_IsPreviewSpawn = true;
647 m_PreviewEntity = EntityAI.Cast(GetGame().CreateObjectEx(object, "0 0 0", ECE_LOCAL | ECE_CREATEPHYSICS | ECE_TRACE));
648 DayZGame.m_IsPreviewSpawn = false;
649 if (m_PreviewEntity)
650 {
651 dBodyDestroy(m_PreviewEntity);//prevents cars from acting up when spawned this way(we only want the preview pic, no physics required)
652 m_PreviewEntity.DisableSimulation(true);
654 m_PreviewEntity.SetAllowDamage(false);
655 }
656 }
657#endif
658 }
const int ECE_LOCAL
const int ECE_TRACE
const int ECE_CREATEPHYSICS
proto native void dBodyDestroy(notnull IEntity ent)
Destroys attached physics body.

References dBodyDestroy(), ECE_CREATEPHYSICS, ECE_LOCAL, ECE_TRACE, GetGame(), m_ItemPreviewWidget, m_PreviewEntity, and ItemPreviewWidget::SetItem().

Referenced by SetObject().

◆ SetTextSpawnButton()

void ScriptConsoleItemsTab::SetTextSpawnButton ( ButtonWidget w,
bool special,
string suffix = " Special" )
inlineprotected

Definition at line 1421 of file ScriptConsoleItemsTab.c.

1422 {
1423 string text = m_SpawnButtonsOriginalText.Get(w);
1424 if (special)
1425 text += suffix;
1426 w.SetText(text);
1427 }

References m_SpawnButtonsOriginalText.

Referenced by UpdateButtonNames().

◆ ShowItemButtons()

void ScriptConsoleItemsTab::ShowItemButtons ( )
inlineprotected

Definition at line 426 of file ScriptConsoleItemsTab.c.

427 {
429 {
431
434
435 m_ItemMoveUpButton.Show(true);
436 m_ItemMoveDownButton.Show(true);
437
438 m_ItemDamageLabel.Show(true);
439 m_ItemQuantityLabel.Show(true);
440
441 if (preset_name != "" && item_index > -1)
442 {
443 m_DamageEditBox.Show(true);
444 m_QuantityEditBox.Show(true);
445 m_WithPhysicsCheckbox.Show(true);
446
450
451 // damage
452 m_DamageEditBox.SetText(item_health.ToString());
453
454 // quantity
455 m_QuantityEditBox.SetText(item_quantity.ToString());
456
457 // with physics
459 }
460 else
461 {
462 m_DamageEditBox.Show(false);
463 m_QuantityEditBox.Show(false);
464 m_WithPhysicsCheckbox.Show(false);
465
466 }
467 }
468 }

References GetCurrentItemIndex(), GetCurrentPresetName(), IsCurrentPresetFixed(), ScriptConsoleTabBase::m_ConfigDebugProfile, m_DamageEditBox, m_ItemDamageLabel, m_ItemMoveDownButton, m_ItemMoveUpButton, m_ItemQuantityLabel, m_QuantityEditBox, m_WithPhysicsCheckbox, and ShowItemTransferButtons().

Referenced by OnClick(), and OnItemSelected().

◆ ShowItemTransferButtons()

void ScriptConsoleItemsTab::ShowItemTransferButtons ( )
inlineprotected

Definition at line 476 of file ScriptConsoleItemsTab.c.

477 {
478 int object_row = m_ObjectsTextListbox.GetSelectedRow();
480 m_PresetAddItemtButton.Show(true);
481 else
482 m_PresetAddItemtButton.Show(false);
483
485 m_PresetRemoveItemButton.Show(true);
486 else
487 m_PresetRemoveItemButton.Show(false);
488
489 if (object_row > -1)
490 m_ItemNameCopy.Show(true);
491 else
492 m_ItemNameCopy.Show(false);
493
494 }

References GetCurrentItemIndex(), GetCurrentPresetIndex(), IsCurrentPresetFixed(), m_ItemNameCopy, m_ObjectsTextListbox, m_PresetAddItemtButton, and m_PresetRemoveItemButton.

Referenced by Init(), OnClick(), OnDoubleClick(), OnItemSelected(), SelectObject(), SelectPreset(), and ShowItemButtons().

◆ ShowPresetButtons()

void ScriptConsoleItemsTab::ShowPresetButtons ( )
inlineprotected

Definition at line 672 of file ScriptConsoleItemsTab.c.

673 {
674 bool show = true;
676 show = false;
677 m_PresetDeleteButton.Show(show);
678 m_PresetRenameButton.Show(show);
679
681
682 }

References HideItemButtons(), IsCurrentPresetFixed(), m_PresetDeleteButton, and m_PresetRenameButton.

Referenced by SelectPreset().

◆ SpawnPreset()

void ScriptConsoleItemsTab::SpawnPreset ( EntityAI target,
bool clear_inventory,
string preset_name,
InventoryLocationType location = InventoryLocationType.ATTACHMENT,
float distance = 0 )
inlineprotected

Definition at line 535 of file ScriptConsoleItemsTab.c.

536 {
537 // spawn preset items into inventory
539 if (GetCurrentPresetIndex() != -1)
540 {
543
544 if (is_preset_fixed)
546
547 else
549
550 if (clear_inventory)
551 m_Developer.ClearInventory(target);
552
553 for (int i = 0; i < preset_array.Count(); i++)
554 {
555 float health = -1;
556 int quantity = 1;
557 bool with_physics = false;
558 if (is_preset_fixed)
559 {
563 }
564 else
565 {
566 health = m_ConfigDebugProfile.GetItemHealth(preset_name, i);
567 quantity = m_ConfigDebugProfile.GetItemQuantity(preset_name, i);
568 with_physics = m_ConfigDebugProfile.GetItemWithPhysics(preset_name, i);
569 }
570 if (location == InventoryLocationType.ATTACHMENT)
571 EntityAI ent = m_Developer.SpawnEntityInInventory(target, preset_array.Get(i), -1, quantity, false, preset_name);
572 //m_Developer.SpawnEntityAsAttachment(player, target, preset_array.Get(i), -1, quantity, false, preset_name);
573 else if (location == InventoryLocationType.GROUND)
574 m_Developer.SpawnEntityOnCursorDir(player, preset_array.Get(i), quantity, distance, health, false, preset_name, with_physics);
575 }
576 if (GetGame().IsMultiplayer())
577 {
578 ScriptRPC rpc = new ScriptRPC();
579 rpc.Write(preset_name);
580 rpc.Write(target);
581 rpc.Send(player, ERPCs.DEV_RPC_SPAWN_PRESET, true, player.GetIdentity());
582 }
583 else
584 {
585 PluginDeveloper plugin = PluginDeveloper.Cast(GetPlugin(PluginDeveloper));
586 plugin.HandlePresetSpawn(player, preset_name, target);
587 }
588 }
589 }
ERPCs
Definition ERPCs.c:2

References GetCurrentPresetIndex(), GetGame(), GetPlayer(), GetPlugin(), IsCurrentPresetFixed(), ScriptConsoleTabBase::m_ConfigDebugProfile, ScriptConsoleTabBase::m_ConfigDebugProfileFixed, and m_Developer.

Referenced by OnClick().

◆ Update()

override void ScriptConsoleItemsTab::Update ( float timeslice)
inlineprotected

Definition at line 1412 of file ScriptConsoleItemsTab.c.

1413 {
1414 m_IsShiftDown = KeyState(KeyCode.KC_LSHIFT) || KeyState(KeyCode.KC_RSHIFT);
1415
1417
1418 super.Update(timeslice);
1419 }
proto native int KeyState(KeyCode key)

References KeyState(), m_IsShiftDown, and UpdateButtonNames().

◆ UpdateButtonNames()

Member Data Documentation

◆ CLEAR_IVN

bool ScriptConsoleItemsTab::CLEAR_IVN
staticprotected

Definition at line 10 of file ScriptConsoleItemsTab.c.

Referenced by OnChange(), and OnClick().

◆ CONST_DEFAULT_PRESET_PREFIX

const string ScriptConsoleItemsTab::CONST_DEFAULT_PRESET_PREFIX = "[Default]"
protected

Definition at line 5 of file ScriptConsoleItemsTab.c.

Referenced by RenderPresets(), and SetDefaultPreset().

◆ DRAW_DISTANCE

float ScriptConsoleItemsTab::DRAW_DISTANCE = 1000
staticprotected

Definition at line 9 of file ScriptConsoleItemsTab.c.

Referenced by DrawItems(), Init(), and OnChange().

◆ ITEMS_IN_PRESET_SELECTED_ROW

int ScriptConsoleItemsTab::ITEMS_IN_PRESET_SELECTED_ROW
staticprotected

Definition at line 8 of file ScriptConsoleItemsTab.c.

Referenced by Init(), and ~ScriptConsoleItemsTab().

◆ ITEMS_SELECTED_ROW

int ScriptConsoleItemsTab::ITEMS_SELECTED_ROW = -1
staticprotected

Definition at line 6 of file ScriptConsoleItemsTab.c.

Referenced by Init(), and ~ScriptConsoleItemsTab().

◆ m_BatchSpawnQuantity

EditBoxWidget ScriptConsoleItemsTab::m_BatchSpawnQuantity
protected

Definition at line 68 of file ScriptConsoleItemsTab.c.

Referenced by Init(), OnChange(), OnClick(), and ScriptConsoleItemsTab().

◆ m_CategoryButtonsNames

ref array<string> ScriptConsoleItemsTab::m_CategoryButtonsNames = {"FIREARMS", "MELEE", "ATTACHMENTS", "MAGAZINES", "AMMO", "FOOD", "MEDICAL", "CARS", "BACKPACKS", "B-BUILDING"}
protected

Definition at line 21 of file ScriptConsoleItemsTab.c.

21{"FIREARMS", "MELEE", "ATTACHMENTS", "MAGAZINES", "AMMO", "FOOD", "MEDICAL", "CARS", "BACKPACKS", "B-BUILDING"};

Referenced by Init().

◆ m_CategoryButtonsWidgets

ref array<Widget> ScriptConsoleItemsTab::m_CategoryButtonsWidgets = new array<Widget>
protected

Definition at line 20 of file ScriptConsoleItemsTab.c.

Referenced by Init(), and OnChange().

◆ m_CategoryMask

int ScriptConsoleItemsTab::m_CategoryMask
protected

Definition at line 23 of file ScriptConsoleItemsTab.c.

Referenced by ChangeFilterItems(), Init(), OnChange(), and ~ScriptConsoleItemsTab().

◆ m_CategoryMergeType

CheckBoxWidget ScriptConsoleItemsTab::m_CategoryMergeType
protected

Definition at line 32 of file ScriptConsoleItemsTab.c.

Referenced by Init(), OnClick(), and ScriptConsoleItemsTab().

◆ m_ClearInventory

CheckBoxWidget ScriptConsoleItemsTab::m_ClearInventory
protected

Definition at line 35 of file ScriptConsoleItemsTab.c.

Referenced by OnChange(), ScriptConsoleItemsTab(), and SelectPreset().

◆ m_DamageEditBox

EditBoxWidget ScriptConsoleItemsTab::m_DamageEditBox
protected

Definition at line 67 of file ScriptConsoleItemsTab.c.

Referenced by OnChange(), OnClick(), ScriptConsoleItemsTab(), and ShowItemButtons().

◆ m_DebugShapes

ref array<Shape> ScriptConsoleItemsTab::m_DebugShapes = new array<Shape>
staticprotected

Definition at line 14 of file ScriptConsoleItemsTab.c.

Referenced by DrawItems(), and DrawItemsClear().

◆ m_Developer

PluginDeveloper ScriptConsoleItemsTab::m_Developer
protected

Definition at line 26 of file ScriptConsoleItemsTab.c.

Referenced by OnClick(), OnDoubleClick(), ScriptConsoleItemsTab(), and SpawnPreset().

◆ m_DrawDistanceWidget

EditBoxWidget ScriptConsoleItemsTab::m_DrawDistanceWidget
protected

Definition at line 65 of file ScriptConsoleItemsTab.c.

Referenced by Init(), OnChange(), and ScriptConsoleItemsTab().

◆ m_DrawInWorld

ButtonWidget ScriptConsoleItemsTab::m_DrawInWorld
protected

Definition at line 39 of file ScriptConsoleItemsTab.c.

Referenced by OnClick(), and ScriptConsoleItemsTab().

◆ m_DrawInWorldClear

ButtonWidget ScriptConsoleItemsTab::m_DrawInWorldClear
protected

Definition at line 40 of file ScriptConsoleItemsTab.c.

Referenced by OnClick(), and ScriptConsoleItemsTab().

◆ m_FilterOrderButton

ButtonWidget ScriptConsoleItemsTab::m_FilterOrderButton
protected

Definition at line 50 of file ScriptConsoleItemsTab.c.

Referenced by OnClick(), and ScriptConsoleItemsTab().

◆ m_FilterOrderImage

ImageWidget ScriptConsoleItemsTab::m_FilterOrderImage
protected

Definition at line 74 of file ScriptConsoleItemsTab.c.

Referenced by ScriptConsoleItemsTab(), and SetFilterOrder().

◆ m_FilterOrderReversed

bool ScriptConsoleItemsTab::m_FilterOrderReversed
protected

Definition at line 27 of file ScriptConsoleItemsTab.c.

Referenced by ChangeFilter(), OnClick(), and SetFilterOrder().

◆ m_FilterTextPrev

string ScriptConsoleItemsTab::m_FilterTextPrev
protected

Definition at line 30 of file ScriptConsoleItemsTab.c.

Referenced by ChangeFilterItems().

◆ m_IsShiftDown

bool ScriptConsoleItemsTab::m_IsShiftDown
protected

Definition at line 29 of file ScriptConsoleItemsTab.c.

Referenced by OnClick(), Update(), and UpdateButtonNames().

◆ m_ItemDamageLabel

TextWidget ScriptConsoleItemsTab::m_ItemDamageLabel
protected

Definition at line 70 of file ScriptConsoleItemsTab.c.

Referenced by ScriptConsoleItemsTab(), and ShowItemButtons().

◆ m_ItemMoveDownButton

ButtonWidget ScriptConsoleItemsTab::m_ItemMoveDownButton
protected

◆ m_ItemMoveUpButton

ButtonWidget ScriptConsoleItemsTab::m_ItemMoveUpButton
protected

◆ m_ItemNameCopy

ButtonWidget ScriptConsoleItemsTab::m_ItemNameCopy
protected

Definition at line 46 of file ScriptConsoleItemsTab.c.

Referenced by OnClick(), ScriptConsoleItemsTab(), and ShowItemTransferButtons().

◆ m_ItemPreviewCheckbox

CheckBoxWidget ScriptConsoleItemsTab::m_ItemPreviewCheckbox
protected

Definition at line 33 of file ScriptConsoleItemsTab.c.

Referenced by Init(), OnClick(), and ScriptConsoleItemsTab().

◆ m_ItemPreviewWidget

ItemPreviewWidget ScriptConsoleItemsTab::m_ItemPreviewWidget
protected

Definition at line 73 of file ScriptConsoleItemsTab.c.

Referenced by OnClick(), ScriptConsoleItemsTab(), and SetPreviewObject().

◆ m_ItemQuantity

float ScriptConsoleItemsTab::m_ItemQuantity = 1
staticprotected

Definition at line 16 of file ScriptConsoleItemsTab.c.

Referenced by Init(), and ~ScriptConsoleItemsTab().

◆ m_ItemQuantityLabel

TextWidget ScriptConsoleItemsTab::m_ItemQuantityLabel
protected

Definition at line 71 of file ScriptConsoleItemsTab.c.

Referenced by ScriptConsoleItemsTab(), and ShowItemButtons().

◆ m_LastSelectedObject

string ScriptConsoleItemsTab::m_LastSelectedObject
staticprotected

Definition at line 12 of file ScriptConsoleItemsTab.c.

Referenced by GetLastSelectedObject(), Init(), OnDoubleClick(), and SelectObject().

◆ m_ListActions

ButtonWidget ScriptConsoleItemsTab::m_ListActions
protected

Definition at line 58 of file ScriptConsoleItemsTab.c.

Referenced by OnClick(), and ScriptConsoleItemsTab().

◆ m_MissionGameplay

MissionGameplay ScriptConsoleItemsTab::m_MissionGameplay
protected

Definition at line 24 of file ScriptConsoleItemsTab.c.

Referenced by Init(), and OnClick().

◆ m_ObjectFilter

MultilineEditBoxWidget ScriptConsoleItemsTab::m_ObjectFilter
protected

Definition at line 59 of file ScriptConsoleItemsTab.c.

Referenced by ChangeFilterItems(), Init(), OnClick(), and ScriptConsoleItemsTab().

◆ m_ObjectsScope

int ScriptConsoleItemsTab::m_ObjectsScope = 2
staticprotected

Definition at line 11 of file ScriptConsoleItemsTab.c.

Referenced by ChangeFilter(), Init(), and OnChange().

◆ m_ObjectsTextListbox

◆ m_PresetAddItemtButton

ButtonWidget ScriptConsoleItemsTab::m_PresetAddItemtButton
protected

Definition at line 45 of file ScriptConsoleItemsTab.c.

Referenced by OnClick(), ScriptConsoleItemsTab(), and ShowItemTransferButtons().

◆ m_PresetDeleteButton

ButtonWidget ScriptConsoleItemsTab::m_PresetDeleteButton
protected

Definition at line 42 of file ScriptConsoleItemsTab.c.

Referenced by Init(), OnClick(), ScriptConsoleItemsTab(), and ShowPresetButtons().

◆ m_PresetItemsTextListbox

◆ m_PresetNewButton

ButtonWidget ScriptConsoleItemsTab::m_PresetNewButton
protected

Definition at line 41 of file ScriptConsoleItemsTab.c.

Referenced by OnClick(), and ScriptConsoleItemsTab().

◆ m_PresetRemoveItemButton

ButtonWidget ScriptConsoleItemsTab::m_PresetRemoveItemButton
protected

Definition at line 47 of file ScriptConsoleItemsTab.c.

Referenced by OnClick(), ScriptConsoleItemsTab(), and ShowItemTransferButtons().

◆ m_PresetRenameButton

ButtonWidget ScriptConsoleItemsTab::m_PresetRenameButton
protected

Definition at line 43 of file ScriptConsoleItemsTab.c.

Referenced by Init(), OnClick(), ScriptConsoleItemsTab(), and ShowPresetButtons().

◆ m_PresetSetDefaultButton

ButtonWidget ScriptConsoleItemsTab::m_PresetSetDefaultButton
protected

Definition at line 44 of file ScriptConsoleItemsTab.c.

Referenced by OnClick(), and ScriptConsoleItemsTab().

◆ m_PresetsTextListbox

◆ m_PreviewEntity

EntityAI ScriptConsoleItemsTab::m_PreviewEntity
staticprotected

◆ m_QuantityEditBox

EditBoxWidget ScriptConsoleItemsTab::m_QuantityEditBox
protected

◆ m_RectSpawnColumn

EditBoxWidget ScriptConsoleItemsTab::m_RectSpawnColumn
protected

Definition at line 62 of file ScriptConsoleItemsTab.c.

Referenced by Init(), OnChange(), OnClick(), and ScriptConsoleItemsTab().

◆ m_RectSpawnColumnStep

EditBoxWidget ScriptConsoleItemsTab::m_RectSpawnColumnStep
protected

Definition at line 64 of file ScriptConsoleItemsTab.c.

Referenced by Init(), OnChange(), OnClick(), and ScriptConsoleItemsTab().

◆ m_RectSpawnRow

EditBoxWidget ScriptConsoleItemsTab::m_RectSpawnRow
protected

Definition at line 61 of file ScriptConsoleItemsTab.c.

Referenced by Init(), OnChange(), OnClick(), and ScriptConsoleItemsTab().

◆ m_RectSpawnRowStep

EditBoxWidget ScriptConsoleItemsTab::m_RectSpawnRowStep
protected

Definition at line 63 of file ScriptConsoleItemsTab.c.

Referenced by Init(), OnChange(), OnClick(), and ScriptConsoleItemsTab().

◆ m_RefreshFilterTimer

ref Timer ScriptConsoleItemsTab::m_RefreshFilterTimer = new Timer()
protected

Definition at line 25 of file ScriptConsoleItemsTab.c.

Referenced by Init(), and ~ScriptConsoleItemsTab().

◆ m_SelectedObject

string ScriptConsoleItemsTab::m_SelectedObject
protected

◆ m_SelectedObjectIsPreset

int ScriptConsoleItemsTab::m_SelectedObjectIsPreset = -1
staticprotected

◆ m_SelectedObjectText

TextWidget ScriptConsoleItemsTab::m_SelectedObjectText
protected

◆ m_ShowProtected

CheckBoxWidget ScriptConsoleItemsTab::m_ShowProtected
protected

Definition at line 34 of file ScriptConsoleItemsTab.c.

Referenced by Init(), OnChange(), and ScriptConsoleItemsTab().

◆ m_SpawnBatchButton

ButtonWidget ScriptConsoleItemsTab::m_SpawnBatchButton
protected

Definition at line 57 of file ScriptConsoleItemsTab.c.

Referenced by OnClick(), ScriptConsoleItemsTab(), and UpdateButtonNames().

◆ m_SpawnButtonsOriginalText

ref map<Widget, string> ScriptConsoleItemsTab::m_SpawnButtonsOriginalText = new map<Widget, string>()
protected

Definition at line 22 of file ScriptConsoleItemsTab.c.

Referenced by ScriptConsoleItemsTab(), and SetTextSpawnButton().

◆ m_SpawnDistanceEditBox

EditBoxWidget ScriptConsoleItemsTab::m_SpawnDistanceEditBox
protected

◆ m_SpawnGroundButton

ButtonWidget ScriptConsoleItemsTab::m_SpawnGroundButton
protected

Definition at line 52 of file ScriptConsoleItemsTab.c.

Referenced by OnClick(), ScriptConsoleItemsTab(), and UpdateButtonNames().

◆ m_SpawnGroundPatternGrid

ButtonWidget ScriptConsoleItemsTab::m_SpawnGroundPatternGrid
protected

Definition at line 53 of file ScriptConsoleItemsTab.c.

Referenced by OnClick().

◆ m_SpawnInHands

ButtonWidget ScriptConsoleItemsTab::m_SpawnInHands
protected

Definition at line 56 of file ScriptConsoleItemsTab.c.

Referenced by OnClick(), ScriptConsoleItemsTab(), and UpdateButtonNames().

◆ m_SpawnInInvButton

ButtonWidget ScriptConsoleItemsTab::m_SpawnInInvButton
protected

Definition at line 51 of file ScriptConsoleItemsTab.c.

Referenced by OnClick(), ScriptConsoleItemsTab(), and UpdateButtonNames().

◆ m_SpawnOnCursor

ButtonWidget ScriptConsoleItemsTab::m_SpawnOnCursor
protected

Definition at line 55 of file ScriptConsoleItemsTab.c.

Referenced by OnClick(), ScriptConsoleItemsTab(), and UpdateButtonNames().

◆ m_SpawnOnTarget

ButtonWidget ScriptConsoleItemsTab::m_SpawnOnTarget
protected

Definition at line 54 of file ScriptConsoleItemsTab.c.

Referenced by OnClick(), ScriptConsoleItemsTab(), and UpdateButtonNames().

◆ m_WithPhysics

bool ScriptConsoleItemsTab::m_WithPhysics = false
staticprotected

Definition at line 17 of file ScriptConsoleItemsTab.c.

Referenced by Init(), and ~ScriptConsoleItemsTab().

◆ m_WithPhysicsCheckbox

CheckBoxWidget ScriptConsoleItemsTab::m_WithPhysicsCheckbox
protected

◆ PRESETS_SELECTED_ROW

int ScriptConsoleItemsTab::PRESETS_SELECTED_ROW = 0
staticprotected

Definition at line 7 of file ScriptConsoleItemsTab.c.

Referenced by Init(), and ~ScriptConsoleItemsTab().


The documentation for this class was generated from the following file: