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

◆ OnChange()

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

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

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