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

◆ OnInputPresetChanged()

void GetText::OnInputPresetChanged ( )
protected

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

194{
195 protected ButtonWidget m_OkButton;
196 protected MultilineTextWidget m_Description;
197
198 void WarningMenuBase()
199 {
200 if (GetGame().GetMission())
201 {
203
204 GetGame().GetMission().GetHud().ShowHudUI(false);
206 }
207 }
208
209 void ~WarningMenuBase()
210 {
211 if (GetGame() && GetGame().GetMission())
212 {
214
217
220 }
221 }
222
223 override Widget Init()
224 {
225 layoutRoot = GetGame().GetWorkspace().CreateWidgets("gui/layouts/day_z_dropped_items.layout");
226 m_OkButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget("bOK"));
227 m_Description = MultilineTextWidget.Cast(layoutRoot.FindAnyWidget("txtDescription"));
228 m_Description.Show(true);
229
230 string text = Widget.TranslateString(GetText());
231 m_Description.SetText(text);
232
233 if (GetGame().GetMission())
234 {
237 }
238
239 OnInputDeviceChanged(GetGame().GetInput().GetCurrentInputDevice());
240
241 return layoutRoot;
242 }
243
244 string GetText()
245 {
246 return "";
247 }
248
249 override bool OnClick(Widget w, int x, int y, int button)
250 {
251 super.OnClick(w, x, y, button);
252
253 if (w.GetUserID() == IDC_OK)
254 {
255 Close();
256 return true;
257 }
258
259 return false;
260 }
261
262 override void Update(float timeslice)
263 {
264 super.Update(timeslice);
265
266 #ifdef PLATFORM_CONSOLE
267 if (GetUApi().GetInputByID(UAUISelect).LocalPress())
268 Close();
269 #endif
270 }
271
272 protected void OnInputPresetChanged()
273 {
274 #ifdef PLATFORM_CONSOLE
276 #endif
277 }
278
279 protected void OnInputDeviceChanged(EInputDeviceType pInputDeviceType)
280 {
283 }
284
285 protected void UpdateControlsElements()
286 {
287 RichTextWidget toolbarText = RichTextWidget.Cast(layoutRoot.FindAnyWidget("ContextToolbarText"));
288 string context = string.Format(" %1", InputUtils.GetRichtextButtonIconFromInputAction("UAUISelect", "#early_access_alpha_understand", EUAINPUT_DEVICE_CONTROLLER, InputUtils.ICON_SCALE_TOOLBAR));
289
290 toolbarText.SetText(context);
291 }
292
293 protected void UpdateControlsElementVisibility()
294 {
295 bool toolbarShow = false;
296 #ifdef PLATFORM_CONSOLE
298 #endif
299
300 layoutRoot.FindAnyWidget("BottomConsoleToolbar").Show(toolbarShow);
301 m_OkButton.Show(!toolbarShow);
302 }
303}
304
305class ItemDropWarningMenu : WarningMenuBase
306{
307 override string GetText()
308 {
309 return "#str_item_drop_notification";
310 }
311}
312
314{
315 override string GetText()
316 {
317 return "#str_position_change_notification";
318 }
319}
void OnInputPresetChanged()
Определения Inventory.c:154
void OnInputDeviceChanged(EInputDeviceType pInputDeviceType)
Определения Inventory.c:161
Icon x
Icon y
void Close()
void ~WarningMenuBase()
Определения ItemDropWarningMenu.c:130
void UpdateControlsElementVisibility()
Определения ItemDropWarningMenu.c:214
void OnInputDeviceChanged(EInputDeviceType pInputDeviceType)
Определения ItemDropWarningMenu.c:200
void OnInputPresetChanged()
Определения ItemDropWarningMenu.c:193
ButtonWidget m_OkButton
Определения ItemDropWarningMenu.c:116
override bool OnClick(Widget w, int x, int y, int button)
Определения ItemDropWarningMenu.c:170
void UpdateControlsElements()
Определения ItemDropWarningMenu.c:206
WarningMenuBase UIScriptedMenu GetText()
Определения ItemDropWarningMenu.c:115
override Widget Init()
Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside o...
Определения ItemDropWarningMenu.c:144
void WarningMenuBase()
Определения ItemDropWarningMenu.c:119
proto native UAInputAPI GetUApi()
proto native WorkspaceWidget GetWorkspace()
proto native Input GetInput()
proto native Mission GetMission()
void ShowHudUI(bool show)
void ShowQuickbarUI(bool show)
proto native EInputDeviceType GetCurrentInputDevice()
proto native bool IsEnabledMouseAndKeyboard()
static string GetRichtextButtonIconFromInputAction(notnull UAInput pInput, string pLocalizedDescription, int pInputDeviceType=EUAINPUT_DEVICE_CONTROLLER, float pScale=ICON_SCALE_NORMAL, bool pVertical=false)
Определения InputUtils.c:167
static const float ICON_SCALE_TOOLBAR
Определения InputUtils.c:15
Определения InputUtils.c:2
ScriptInvoker GetOnInputDeviceChanged()
Определения gameplay.c:851
ScriptInvoker GetOnInputPresetChanged()
Определения gameplay.c:859
void AddActiveInputExcludes(array< string > excludes)
Hud GetHud()
Определения gameplay.c:721
void RemoveActiveInputExcludes(array< string > excludes, bool bForceSupress=false)
deprecated
override string GetText()
Определения ItemDropWarningMenu.c:123
Определения gameplay.c:317
proto bool Remove(func fn, int flags=EScriptInvokerRemoveFlags.ALL)
remove specific call from list
proto bool Insert(func fn, int flags=EScriptInvokerInsertFlags.IMMEDIATE)
insert method to list
Определения DayZGame.c:64
string GetText()
Определения ItemDropWarningMenu.c:52
Определения EnWidgets.c:190
proto native CGame GetGame()
string m_Description
class purpose description
Определения EnEntity.c:845
const int IDC_OK
Определения constants.c:135
proto native external Widget CreateWidgets(string layout, Widget parentWidget=NULL, bool immedUpdate=true)
Create widgets from *.layout file.
proto native volatile void Update()
Определения PlayerSoundManager.c:125
EInputDeviceType
Определения input.c:3