DayZ 1.24
Loading...
Searching...
No Matches
ConsoleToolbarHandler.c File Reference

Go to the source code of this file.

Classes

class  ConsoleToolbarWidgetHandlerBase
 

Functions

ConsoleToolbarWidgetHandlerBase ScriptedWidgetEventHandler UpdateControlsElements (EInputDeviceType pInputDeviceType=EInputDeviceType.UNKNOWN)
 
void OnWidgetScriptInit (Widget w)
 
void OnInputDeviceChanged (EInputDeviceType pInputDeviceType)
 

Variables

Widget m_ToolbarWidget
 
RichTextWidget m_ToolbarText
 

Function Documentation

◆ OnInputDeviceChanged()

void UpdateControlsElements::OnInputDeviceChanged ( EInputDeviceType pInputDeviceType)
protected

Definition at line 54 of file ConsoleToolbarHandler.c.

◆ OnWidgetScriptInit()

void UpdateControlsElements::OnWidgetScriptInit ( Widget w)

Definition at line 41 of file ConsoleToolbarHandler.c.

◆ UpdateControlsElements()

void UpdateControlsElements ( EInputDeviceType pInputDeviceType = EInputDeviceType.UNKNOWN)

Definition at line 1 of file ConsoleToolbarHandler.c.

38 {
39#ifdef PLATFORM_CONSOLE
40 string text = "";
41 text += string.Format(" %1", InputUtils.GetRichtextButtonIconFromInputAction("UAUICtrlY", "#server_browser_show / #server_browser_hide", EUAINPUT_DEVICE_CONTROLLER, InputUtils.ICON_SCALE_TOOLBAR));
42 text += string.Format(" %1", InputUtils.GetRichtextButtonIconFromInputAction("UAUICtrlX", "#server_browser_menu_connect", EUAINPUT_DEVICE_CONTROLLER, InputUtils.ICON_SCALE_TOOLBAR));
43 text += string.Format(" %1", InputUtils.GetRichtextButtonIconFromInputAction("UAUIBack", "#STR_settings_menu_root_toolbar_bg_ConsoleToolbar_Back_BackText0", EUAINPUT_DEVICE_CONTROLLER, InputUtils.ICON_SCALE_TOOLBAR));
44 m_ToolbarText.SetText(text);
45
46 bool toolbarShow = false;
48 toolbarShow = !GetGame().GetInput().IsEnabledMouseAndKeyboardEvenOnServer() || GetGame().GetInput().GetCurrentInputDevice() == EInputDeviceType.CONTROLLER;
49 else
52#endif
53 }
RichTextWidget m_ToolbarText
Widget m_ToolbarWidget
static string GetRichtextButtonIconFromInputAction(notnull UAInput pInput, string pLocalizedDescription, int pInputDeviceType=EUAINPUT_DEVICE_CONTROLLER, float pScale=ICON_SCALE_NORMAL, bool pVertical=false)
Definition InputUtils.c:151
static const float ICON_SCALE_TOOLBAR
Definition InputUtils.c:15
proto native CGame GetGame()
EInputDeviceType
Definition input.c:3

Variable Documentation

◆ m_ToolbarText

RichTextWidget m_ToolbarText

Definition at line 39 of file ConsoleToolbarHandler.c.

◆ m_ToolbarWidget

Widget m_ToolbarWidget

Definition at line 38 of file ConsoleToolbarHandler.c.