44 m_MouseCurPos = TextWidget.Cast(root.FindAnyWidget(
"MapSoundsPos"));
45 m_MapDistWidget = TextWidget.Cast(root.FindAnyWidget(
"MapSoundsDistance"));
62 m_CopySoundset = ButtonWidget.Cast(root.FindAnyWidget(
"SoundsetCopy"));
63 m_PlaySoundset = ButtonWidget.Cast(root.FindAnyWidget(
"PlaySoundset"));
65 m_StopSoundset = ButtonWidget.Cast(root.FindAnyWidget(
"StopSoundset"));
68 m_SoundFilter = EditBoxWidget.Cast(root.FindAnyWidget(
"SoundsFilter"));
96 if (lastSelection.Contains(
"shoulder"))
98 if (lastSelection.Contains(
"body"))
100 if (lastSelection.Contains(
"back"))
110 override bool OnChange(Widget w,
int x,
int y,
bool finished)
112 super.OnChange(w,
x,
y, finished);
128 vector mousePos, worldPos;
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));
150 float heading =
Math3D.AngleFromPosition(playerPos, playerCamDir, worldPos) *
Math.RAD2DEG;
162 filter.Split(
" ", rawFilters);
164 foreach (
int i,
string f:rawFilters)
172 protected void ChangeFilter(
TStringArray classes, TextListboxWidget widget, EditBoxWidget filterWidget,
int categoryMask = -1,
bool ignoreScope =
false)
183 for (
int i = 0; i < classes.Count(); i++)
185 string config_path = classes.Get(i);
187 int objects_count =
GetGame().ConfigGetChildrenCount(config_path);
188 for (
int j = 0; j < objects_count; j++)
192 GetGame().ConfigGetChildName(config_path, j, child_name);
194 if (!filters.Count())
200 foreach (
int indx,
string filter:filters)
202 string child_name_lower = child_name;
203 child_name_lower.ToLower();
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;
363 override bool OnClick(Widget w,
int x,
int y,
int button)
365 super.OnClick(w,
x,
y,button);
378 if (selected_row_index != -1)
439 super.OnDoubleClick(w,
x,
y, button);
443 EditBoxWidget.Cast(w).SetText(
"");
proto native float SurfaceY(float x, float z)
Wrapper class for managing sound through SEffectManager.
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
override void Stop()
Stops sound.
Manager class for managing Effect (EffectParticle, EffectSound)
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.
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 AddItemToClipboard(TextListboxWidget text_listbox_widget)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
array< string > TStringArray
proto native int KeyState(KeyCode key)
proto void GetMousePos(out int x, out int y)