DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Файл OptionSelectorMultistate.c

См. исходные тексты.

Структуры данных

class  OptionSelector
 

Функции

void OptionSelectorMultistateCharacterMenu (Widget parent, int current_index, ScriptedWidgetEventHandler parent_c, bool disabled, notnull array< string > options)
 
void SetDisplayNameText (string value, string appendix)
 
void SetTextSmart (string value)
 
bool InheritsFrom (string value, string baseclass)
 
override void SetNextOption ()
 
override void SetPrevOption ()
 
override void SetValue (int value, bool fire_event=true)
 
override void SetValue (string value, bool fire_event=true)
 
override void SetRandomValue ()
 
override void SetStringOption (string option, bool fire_event=true)
 

Переменные

class OptionSelectorMultistate extends OptionSelector class_name
 
string path = "cfgVehicles " + class_name + " displayName"
 
string displayname
 

Функции

◆ InheritsFrom()

bool InheritsFrom ( string value,
string baseclass )
207 {
208 string child = value;
209 string parent;
210 while (GetGame().ConfigGetBaseName("cfgVehicles " + child, parent))
211 {
212 if (parent == baseclass)
213 {
214 return true;
215 }
216 child = parent;
217 }
218 return false;
219 }
Definition EntityAI.c:95
proto native CGame GetGame()

Перекрестные ссылки GetGame().

Используется в SetTextSmart().

◆ OptionSelectorMultistateCharacterMenu()

void OptionSelectorMultistateCharacterMenu ( Widget parent,
int current_index,
ScriptedWidgetEventHandler parent_c,
bool disabled,
notnull array< string > options )
146 {
147 SetTextSmart(m_Options.Get(m_SelectedOptionIndex));
148 }
void SetTextSmart(string value)
Definition OptionSelectorMultistate.c:175

Перекрестные ссылки SetTextSmart().

Используется в UIScriptedMenu::Init().

◆ SetDisplayNameText()

void SetDisplayNameText ( string value,
string appendix )
151 {
152 path = "cfgVehicles " + class_name + " displayName";
153 GetGame().ConfigGetText(path, displayname);
154 if (value == "Male")
155 {
156 m_SelectedOption.SetText("#str_cfgvehicles_survivorM0");
157 }
158 else if (value == "Female")
159 {
160 m_SelectedOption.SetText("#str_cfgvehicles_survivorF0");
161 }
162 else if (appendix != "")
163 {
164 if (value == "")
165 m_SelectedOption.SetText("NO ITEM - localization needed!");
166 else
167 m_SelectedOption.SetText("" + displayname + " " + appendix); //characters
168 }
169 else
170 {
171 m_SelectedOption.SetText(displayname);
172 }
173 }
string displayname
Definition OptionSelectorMultistate.c:143
string path
Definition OptionSelectorMultistate.c:142
class OptionSelectorMultistate extends OptionSelector class_name

Перекрестные ссылки class_name, displayname, GetGame() и path.

Используется в SetTextSmart().

◆ SetNextOption()

override void SetNextOption ( )
222 {
223 super.SetNextOption();
224 SetTextSmart(m_Options.Get(m_SelectedOptionIndex));
225 }

Перекрестные ссылки SetTextSmart().

◆ SetPrevOption()

override void SetPrevOption ( )
228 {
229 super.SetPrevOption();
230 SetTextSmart(m_Options.Get(m_SelectedOptionIndex));
231 }

Перекрестные ссылки SetTextSmart().

◆ SetRandomValue()

override void SetRandomValue ( )
246 {
247 super.SetRandomValue();
248 SetTextSmart(m_Options.Get(m_SelectedOptionIndex));
249 }

Перекрестные ссылки SetTextSmart().

◆ SetStringOption()

override void SetStringOption ( string option,
bool fire_event = true )
252 {
253 super.SetStringOption(option, fire_event);
254 SetTextSmart(m_Options.Get(m_SelectedOptionIndex));
255 }

Перекрестные ссылки SetTextSmart().

◆ SetTextSmart()

void SetTextSmart ( string value)
176 {
177 if (value == "Male" || value == "Female")
178 {
180 return;
181 }
182
184 int index = m_Options.Find(value);
185 if (InheritsFrom(class_name, "Clothing_Base"))
186 {
188 }
189 else if (InheritsFrom(class_name,"SurvivorBase"))
190 {
191 if (InheritsFrom(class_name,"SurvivorMale_Base"))
192 {
193 SetDisplayNameText("#str_cfgvehicles_survivorM0",(m_SelectedOptionIndex + 1).ToString());
194 }
195 else if (InheritsFrom(class_name,"SurvivorFemale_Base"))
196 {
197 SetDisplayNameText("#str_cfgvehicles_survivorF0",(m_SelectedOptionIndex + 1).ToString());
198 }
199 }
200 else
201 {
203 }
204 }
proto string ToString()
bool InheritsFrom(string value, string baseclass)
Definition OptionSelectorMultistate.c:206
void SetDisplayNameText(string value, string appendix)
Definition OptionSelectorMultistate.c:150

Перекрестные ссылки class_name, InheritsFrom(), SetDisplayNameText() и ToString().

Используется в OptionSelectorMultistateCharacterMenu(), SetNextOption(), SetPrevOption(), SetRandomValue(), SetStringOption(), SetValue() и SetValue().

◆ SetValue() [1/2]

override void SetValue ( int value,
bool fire_event = true )
234 {
235 super.SetValue(value,fire_event);
236 SetTextSmart(m_Options.Get(m_SelectedOptionIndex));
237 }

Перекрестные ссылки SetTextSmart().

Используется в ScriptedWidgetEventHandler::OnClick(), OptionSelectorSliderSetup::OptionSelectorLevelMarker(), OptionSelectorSliderSetup::OptionSelectorSlider() и DisplayElementBase::SetLevel().

◆ SetValue() [2/2]

override void SetValue ( string value,
bool fire_event = true )
240 {
241 super.SetValue(value,fire_event);
242 SetTextSmart(m_Options.Get(m_SelectedOptionIndex));
243 }

Перекрестные ссылки SetTextSmart().

Переменные

◆ class_name

◆ displayname

string displayname

Используется в SetDisplayNameText().

◆ path

string path = "cfgVehicles " + class_name + " displayName"

Используется в BillboardSet(), PPEClassBase::ChangeMaterialPathUsed(), ChangePPEMaterial(), CGame::ConfigGetTextOut(), CreateMission(), ReplaceItemWithNewLambdaBase::CreateNewEntity(), CreateParticleByPath(), CGame::DayZGame(), ScriptConsoleConfigTab::DumpParam(), ItemBase::EEItemAttached(), ItemBase::EEItemDetached(), PluginBase::GetBaseClasses(), GetComponentNamesFromDamageZone(), PluginBase::GetConfigRecursive(), GetDamageZoneMap(), UIScriptedMenu::GetData(), JsonMissionLoaderData::GetData(), HFSMBase< Class FSMStateBase, Class FSMEventBase, Class FSMActionBase, Class FSMGuardBase >::GetHierarchyPath(), Attachments::GetItemSlots(), GetLiquidSource(), ParticleSource::GetParticle(), ParticleSource::GetParticleID(), ParticleSource::GetParticleIDLegacy(), ParticleList::GetParticlePath(), GetPathFromSlotID(), DayZPlayer::HandleView(), SoundSetMap::Init(), Init(), AttachmentCategoriesRow::Init(), LiquidInfo::Init(), ItemOptics::Init2DPreloadType(), Attachments::InitAttachmentGrid(), ItemOptics::InitCameraOverrideProperties(), Entity::InitDamageZoneDisplayNameMapping(), InitData(), ItemOptics::InitDOFAvailability(), ZombieContainer::InitGhostSlots(), CatchingContextFishingRodAction::InitItemValues(), CatchingContextTrapsBase::InitItemValues(), InventoryItemSuper::InitMapState(), ItemOptics::InitOpticsPP(), ItemOptics::InitReddotData(), SelectionTranslation::InitTranslatedSelections(), ScriptedWidgetEventHandler::InitVideoLoading(), BillboardSetHandler::LoadBillboardConfigs(), LoadConfig(), CfgPlayerRestrictedAreaHandler::LoadData(), PlayerSpawnHandler::LoadData(), SoundLookupTable::LoadTable(), ScriptedWidgetEventHandler::LoadVideo(), ScriptedWidgetEventHandler::LoadVideoFile(), ModStructure::ModStructure(), ScriptConsoleConfigTab::OnClick(), Entity::OnDebugSpawn(), ActionUnpackBox::OnFinishProgressServer(), ItemBase::ParticleTest(), PlayerContainer::PlayerContainer(), ReplaceItemWithNewLambdaBase::PrepareLocations(), GameplayEffectWidgets_base::RegisterLayouts(), MapMarkerTypes::RegisterMarkerType(), ParticleList::RegisterParticle(), UIPopupScript::RenderVariables(), ScriptConsoleConfigTab::RenderVariables(), ActionRepairTent::RepairDamageTransfer(), OpenDirPlugin::Run(), DayZTool::RunDayZBat(), SelectionTranslation::SearchAndTranslate(), SetDisplayNameText(), CGame::SetMissionPath(), ParticleSource::SetParticle(), ObjectSpawnerHandler::SpawnObjects(), ManBase::UpdateCorpseStateVisual() и ObjectSpawnerHandler::ValidatePath().