62 m_CopySoundset = ButtonWidget.Cast(root.FindAnyWidget(
"SoundsetCopy"));
63 m_PlaySoundset = ButtonWidget.Cast(root.FindAnyWidget(
"PlaySoundset"));
65 m_StopSoundset = ButtonWidget.Cast(root.FindAnyWidget(
"StopSoundset"));
96 if (lastSelection.
Contains(
"shoulder"))
112 super.OnChange(w,
x,
y, finished);
128 vector mousePos, worldPos;
132 vector playerPos =
g_Game.GetPlayer().GetWorldPosition();
135 worldPos[1] =
g_Game.SurfaceY(worldPos[0], worldPos[2]);
139 m_MouseCurPos.SetText(
"Mouse: "+ MiscGameplayFunctions.TruncateToS(worldPos[0]) +
", "+ MiscGameplayFunctions.TruncateToS(worldPos[1]) +
", "+ MiscGameplayFunctions.TruncateToS(worldPos[2]));
143 float dst = (worldPos - playerPos).Length();
145 m_MapDistWidget.SetText(
"Distance: " + MiscGameplayFunctions.TruncateToS(dst));
149 vector playerCamDir =
g_Game.GetCurrentCameraDirection();
162 filter.
Split(
" ", rawFilters);
164 foreach (
int i,
string f:rawFilters)
183 for (
int i = 0; i < classes.Count(); i++)
185 string config_path = classes.Get(i);
187 int objects_count =
g_Game.ConfigGetChildrenCount(config_path);
188 for (
int j = 0; j < objects_count; j++)
192 g_Game.ConfigGetChildName(config_path, j, child_name);
194 if (!filters.Count())
200 foreach (
int indx,
string filter:filters)
202 string child_name_lower = child_name;
205 if (child_name_lower.
Contains(filter))
213 itemsArray.Insert(child_name);
220 foreach (
string it:itemsArray)
222 widget.AddItem(it, NULL, 0);
232 foreach (
string f:filters)
238 foreach (
string itm: arr2)
240 int row = widget.AddItem(itm, NULL, 0);
251 super.Update(timeslice);
260 vector playerPos = player.GetWorldPosition();
278 if (selected_row_index != -1)
315 string attachments =
string.Empty;
317 attachments +=
"shoulder,";
319 attachments +=
"body,";
321 attachments +=
"back";
338 super.OnMouseButtonDown(w,
x,
y,button);
347 vector mousePos, worldPos;
348 mousePos[0] = mouseX;
349 mousePos[1] = mouseY;
351 worldPos[1] =
g_Game.SurfaceY(worldPos[0], worldPos[2]);
355 else if (button == 1 &&
g_Game.GetPlayer())
365 super.OnClick(w,
x,
y,button);
378 if (selected_row_index != -1)
439 super.OnDoubleClick(w,
x,
y, button);
Wrapper class for managing sound through SEffectManager.
static EffectSound PlaySoundEnviroment(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound, updating environment variables.
Manager class for managing Effect (EffectParticle, EffectSound)
TextWidget m_MapHeadingWidget
ref Timer m_RefreshFilterTimer
override bool OnChange(Widget w, int x, int y, bool finished)
ImageWidget m_BBackgroundSoundVoice
MapWidget m_DebugMapWidget
ButtonWidget m_PlaySoundsetLooped
void UpdateAttachmentSelection()
ButtonWidget m_SetETSoundVoiceButton
ButtonWidget m_PlaySoundEventButton
void ~ScriptConsoleSoundsTab(Widget root)
ButtonWidget m_SetETSoundButton
ButtonWidget m_CopySoundset
override bool OnMouseButtonDown(Widget w, int x, int y, int button)
void ChangeFilter(TStringArray classes, TextListboxWidget widget, EditBoxWidget filterWidget, int categoryMask=-1, bool ignoreScope=false)
ImageWidget m_BBackgroundSound
EditBoxWidget m_SoundEventIDBox
static EffectSound m_SoundSet
CheckBoxWidget m_CheckBoxBodyAtt
EditBoxWidget m_SoundFilter
ImageWidget m_BBackgroundSoundWeapon
void UpdateSelectedColor(ImageWidget buttonBackground)
static string m_SelectedSoundEventType
ButtonWidget m_SetETSoundWeaponButton
CheckBoxWidget m_CheckBoxBackAtt
override bool OnClick(Widget w, int x, int y, int button)
ImageWidget m_SelectedBackground
void SetMapPos(vector pos)
CheckBoxWidget m_CheckBoxShoulderAtt
TextListboxWidget m_SoundsTextListbox
TStringArray GetSoundClasses()
ButtonWidget m_StopSoundset
static string m_SelectedAttachments
TextWidget m_MapDistWidget
override void Update(float timeslice)
static float DEBUG_MAP_ZOOM
override bool OnDoubleClick(Widget w, int x, int y, int button)
bool m_PlayerPosRefreshBlocked
void PrepareFilters(string filter, out TStringArray filters)
void ScriptConsoleSoundsTab(Widget root, ScriptConsole console, Widget button, ScriptConsoleTabBase parent=null)
ButtonWidget m_PlaySoundset
ImageWidget m_BBackgroundSoundAttachment
ButtonWidget m_SetETSoundAttachmentButton
PluginConfigDebugProfile m_ConfigDebugProfile
void ScriptConsoleTabBase(Widget root, ScriptConsole console, Widget button, ScriptConsoleTabBase parent=null)
void AddItemToClipboard(TextListboxWidget text_listbox_widget)
proto string ToString(bool simple=true)
array< string > TStringArray
proto native int KeyState(KeyCode key)
static proto float AngleFromPosition(vector origin, vector originDir, vector target)
Angle that a target is from the direction of an origin.
static const float RAD2DEG
proto void GetMousePos(out int x, out int y)
proto string Trim()
Returns trimmed string with removed leading and trailing whitespaces.
bool Contains(string sample)
Returns true if sample is substring of string.
void Split(string sample, out array< string > output)
Splits string into array of strings separated by 'sample'.
proto int ToLower()
Changes string to lowercase. Returns length.