DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ OnChange()

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

См. определение в файле ScriptConsoleItemsTab.c строка 1061

1062 {
1063 super.OnChange(w, x, y, finished);
1064 if (w == m_ShowProtected)
1065 {
1066 if (m_ShowProtected.IsChecked())
1067 {
1068 OBJECT_SCOPE = 1;
1069 }
1070 else
1071 {
1072 OBJECT_SCOPE = 2;
1073 }
1074 ChangeFilterItems(true);
1075 return true;
1076 }
1077 else if (w == m_ClearInventory)
1078 {
1079 CLEAR_IVN = m_ClearInventory.IsChecked();
1080 return true;
1081 }
1082 else if (m_CategoryButtonsWidgets.Find(w) >= 0)
1083 {
1084
1085 int pos = m_CategoryButtonsWidgets.Find(w);
1086 int bit = Math.Pow(2,pos);
1087 CheckBoxWidget cbw = CheckBoxWidget.Cast(w);
1088 if (cbw.IsChecked())
1089 {
1091 cbw.SetTextColor(ARGB(255, 255, 0, 0));
1092 }
1093 else
1094 {
1095 m_CategoryMask = (m_CategoryMask & ~bit);
1096 cbw.SetTextColor(ARGB(255, 255, 255,255));
1097 }
1098
1099 ChangeFilterItems(true);
1100 return true;
1101 }
1102
1103 /*
1104 if (w == m_ObjectFilter)
1105 {
1106 m_RefreshFilterTimer.Run(0.85, this, "ChangeFilterItems", null, false);
1107 return true;
1108 }*/
1109 if (w == m_QuantityEditBox && (GetCurrentItemIndex() >= 0 || GetCurrentPresetName() != ""))
1110 {
1111 m_ConfigDebugProfile.SetItemQuantity(GetCurrentPresetName(), GetCurrentItemIndex(), m_QuantityEditBox.GetText().ToFloat());
1112 return true;
1113 }
1114 else if (w == m_DrawDistanceWidget)
1115 {
1116 DRAW_DISTANCE = m_DrawDistanceWidget.GetText().ToFloat();
1117 return true;
1118 }
1119 else if (w == m_DamageEditBox && (GetCurrentItemIndex() >= 0 || GetCurrentPresetName() != ""))
1120 {
1121 m_ConfigDebugProfile.SetItemHealth(GetCurrentPresetName(), GetCurrentItemIndex(), m_DamageEditBox.GetText().ToFloat());
1122 return true;
1123 }
1124 else if (w == m_WithPhysicsCheckbox && (GetCurrentItemIndex() >= 0 || GetCurrentPresetName() != ""))
1125 {
1127 return true;
1128 }
1129 else if (w == m_BatchSpawnQuantity)
1130 {
1131 m_ConfigDebugProfile.SetBatchSpawnQuantity(m_BatchSpawnQuantity.GetText().ToInt());
1132 return true;
1133 }
1134 else if ((w == m_RectSpawnRow || w == m_RectSpawnColumn || w == m_RectSpawnRowStep || w == m_RectSpawnColumnStep))
1135 {
1136 if (w == m_RectSpawnRow || w == m_RectSpawnColumn)
1137 {
1138 int rowQ = m_RectSpawnRow.GetText().ToInt();
1139 int columnQ = m_RectSpawnColumn.GetText().ToInt();
1140 int result = columnQ * rowQ;
1141 m_BatchSpawnQuantity.SetText(result.ToString());
1142 m_ConfigDebugProfile.SetBatchSpawnQuantity(m_BatchSpawnQuantity.GetText().ToInt());
1143 }
1144
1146 {
1147 m_ConfigDebugProfile.SetBatchSpawnRectangle(m_RectSpawnRow.GetText().ToInt(),m_RectSpawnColumn.GetText().ToInt(), m_RectSpawnRowStep.GetText().ToFloat(),m_RectSpawnColumnStep.GetText().ToFloat());
1148 }
1149 return true;
1150 }
1151 return false;
1152 }
Icon x
Icon y
CheckBoxWidget m_WithPhysicsCheckbox
Определения ScriptConsoleItemsTab.c:68
CheckBoxWidget m_ClearInventory
Определения ScriptConsoleItemsTab.c:34
EditBoxWidget m_QuantityEditBox
Определения ScriptConsoleItemsTab.c:65
CheckBoxWidget m_ShowProtected
Определения ScriptConsoleItemsTab.c:33
int GetCurrentItemIndex()
Определения ScriptConsoleItemsTab.c:398
EditBoxWidget m_DamageEditBox
Определения ScriptConsoleItemsTab.c:66
EditBoxWidget m_BatchSpawnQuantity
Определения ScriptConsoleItemsTab.c:67
EditBoxWidget m_DrawDistanceWidget
Определения ScriptConsoleItemsTab.c:64
EditBoxWidget m_RectSpawnRow
Определения ScriptConsoleItemsTab.c:60
EditBoxWidget m_RectSpawnRowStep
Определения ScriptConsoleItemsTab.c:62
EditBoxWidget m_RectSpawnColumnStep
Определения ScriptConsoleItemsTab.c:63
static bool CLEAR_IVN
Определения ScriptConsoleItemsTab.c:10
ref array< Widget > m_CategoryButtonsWidgets
Определения ScriptConsoleItemsTab.c:20
static float DRAW_DISTANCE
Определения ScriptConsoleItemsTab.c:9
static int OBJECT_SCOPE
Определения ScriptConsoleItemsTab.c:11
string GetCurrentPresetName()
Определения ScriptConsoleItemsTab.c:753
EditBoxWidget m_RectSpawnColumn
Определения ScriptConsoleItemsTab.c:61
void ChangeFilterItems(bool forced=false)
Определения ScriptConsoleItemsTab.c:1564
PluginConfigDebugProfile m_ConfigDebugProfile
Определения ScriptConsoleTabBase.c:11
int ARGB(int a, int r, int g, int b)
Определения proto.c:322

Перекрестные ссылки ARGB(), ChangeFilterItems(), CLEAR_IVN, DRAW_DISTANCE, GetCurrentItemIndex(), GetCurrentPresetName(), m_BatchSpawnQuantity, m_CategoryButtonsWidgets, m_CategoryMask, m_ClearInventory, ScriptConsoleTabBase::m_ConfigDebugProfile, m_DamageEditBox, m_DrawDistanceWidget, m_QuantityEditBox, m_RectSpawnColumn, m_RectSpawnColumnStep, m_RectSpawnRow, m_RectSpawnRowStep, m_ShowProtected, m_WithPhysicsCheckbox, OBJECT_SCOPE, Math::Pow(), x и y.