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

◆ GetCurrentObjectName()

string ScriptConsoleItemsTab::GetCurrentObjectName ( )
inlineprotected

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

778 {
779 int selected_row_index = m_ObjectsTextListbox.GetSelectedRow();
780 if (selected_row_index != -1)
781 {
782 string item_name;
783 m_ObjectsTextListbox.GetItemText(selected_row_index, 0, item_name);
784
785 array<string> tokens = new array<string>();
786 int index = item_name.IndexOf(" - [");
787 if (index > -1)
788 {
789 item_name.Split(" - [", tokens);
790 }
791
792 return tokens[0];
793 }
794 return "";
795 }
TextListboxWidget m_ObjectsTextListbox
Определения ScriptConsoleItemsTab.c:35
void Split(string sample, out array< string > output)
Splits string into array of strings separated by 'sample'.
Определения EnString.c:396
proto native int IndexOf(string sample)
Finds 'sample' in 'str'. Returns -1 when not found.

Перекрестные ссылки string::IndexOf(), m_ObjectsTextListbox и string::Split().

Используется в AddItemToClipboard(), AddItemToPreset(), Init(), OnDoubleClick() и SelectObject().