DayZ 1.24
Loading...
Searching...
No Matches
LoginScreenBase Class Reference
Collaboration diagram for LoginScreenBase:
[legend]

Protected Member Functions

bool CanChangeHintPage (float timeAccu)
 

Protected Attributes

TextWidget m_txtDescription
 
TextWidget m_txtLabel
 
ButtonWidget m_btnLeave
 
bool m_IsRespawn
 

Private Member Functions

void LoginTimeBase ()
 
void ~LoginTimeBase ()
 
override Widget Init ()
 
override bool OnClick (Widget w, int x, int y, int button)
 
void Show ()
 
void Hide ()
 
void SetTime (int time)
 
void SetStatus (string status)
 
void SetRespawn (bool value)
 
bool IsRespawn ()
 

Private Attributes

ref FullTimeData m_FullTime
 

Detailed Description

Definition at line 195 of file DayZGame.c.

Constructor & Destructor Documentation

◆ ~LoginTimeBase()

void LoginScreenBase::~LoginTimeBase ( )
inlineprivate

Definition at line 213 of file DayZGame.c.

214 {
215 if (g_Game)
216 g_Game.SetKeyboardHandle(null);
218 }
DayZGame g_Game
Definition DayZGame.c:3528
ref FullTimeData m_FullTime
Definition DayZGame.c:203

References g_Game.

Member Function Documentation

◆ CanChangeHintPage()

bool LoginScreenBase::CanChangeHintPage ( float timeAccu)
inlineprotected

◆ Hide()

void LoginScreenBase::Hide ( )
inlineprivate

Definition at line 264 of file DayZGame.c.

265 {
266 if (layoutRoot)
267 layoutRoot.Show(false);
269 }
ref UiHintPanelLoading m_HintPanel
Definition DayZGame.c:676

References m_HintPanel.

◆ Init()

override Widget LoginScreenBase::Init ( )
inlineprivate

Definition at line 220 of file DayZGame.c.

221 {
222 layoutRoot = GetGame().GetWorkspace().CreateWidgets("gui/layouts/dialog_login_time.layout");
223
224 m_txtDescription = TextWidget.Cast(layoutRoot.FindAnyWidget("txtDescription"));
225 m_txtLabel = TextWidget.Cast(layoutRoot.FindAnyWidget("txtLabel"));
226 m_btnLeave = ButtonWidget.Cast(layoutRoot.FindAnyWidget("btnLeave"));
227 m_txtDescription.Show(true);
228 layoutRoot.FindAnyWidget("notification_root").Show(false);
229
230#ifdef PLATFORM_CONSOLE
231 layoutRoot.FindAnyWidget("toolbar_bg").Show(true);
232 RichTextWidget toolbar_b = RichTextWidget.Cast(layoutRoot.FindAnyWidget("BackIcon"));
234#ifdef PLATFORM_XBOX
235#ifdef BUILD_EXPERIMENTAL
236 layoutRoot.FindAnyWidget("notification_root").Show(true);
237#endif
238#endif
239#endif
240
241 return layoutRoot;
242 }
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
TextWidget m_txtLabel
Definition DayZGame.c:198
TextWidget m_txtDescription
Definition DayZGame.c:197
ButtonWidget m_btnLeave
Definition DayZGame.c:199
proto native CGame GetGame()

References GetGame(), InputUtils::GetRichtextButtonIconFromInputAction(), InputUtils::ICON_SCALE_TOOLBAR, and m_btnLeave.

◆ IsRespawn()

bool LoginScreenBase::IsRespawn ( )
inlineprivate

Definition at line 307 of file DayZGame.c.

308 {
309 return m_IsRespawn;
310 }

◆ LoginTimeBase()

void LoginScreenBase::LoginTimeBase ( )
inlineprivate

Definition at line 205 of file DayZGame.c.

206 {
207 g_Game.SetKeyboardHandle(this);
208 m_IsRespawn = false;
209
210 m_FullTime = new FullTimeData();
211 }
struct that keeps Time relevant information for future formatting

References g_Game.

◆ OnClick()

override bool LoginScreenBase::OnClick ( Widget w,
int x,
int y,
int button )
inlineprivate

Definition at line 244 of file DayZGame.c.

245 {
246 super.OnClick(w, x, y, button);
247 if (w == m_btnLeave)
248 {
249 Leave();
250 return true;
251 }
252 return false;
253 }
Icon x
Icon y

References m_btnLeave, x, and y.

◆ SetRespawn()

void LoginScreenBase::SetRespawn ( bool value)
inlineprivate

Definition at line 302 of file DayZGame.c.

303 {
305 }

◆ SetStatus()

void LoginScreenBase::SetStatus ( string status)
inlineprivate

Definition at line 297 of file DayZGame.c.

298 {
299 m_txtDescription.SetText(status);
300 }

◆ SetTime()

void LoginScreenBase::SetTime ( int time)
inlineprivate

Definition at line 271 of file DayZGame.c.

272 {
273 string text = "";
274 TimeConversions.ConvertSecondsToFullTime(time, m_FullTime);
275 if (!m_IsRespawn)
276 text = "#menu_loading_in_";
277 else
278 text = "#dayz_game_spawning_in_";
279
280 if (m_FullTime.m_Days > 0)
281 text += "dhms";
282 else if (m_FullTime.m_Hours > 0)
283 text += "hms";
284 else if (m_FullTime.m_Minutes > 0)
285 text += "ms";
286 else
287 text += "s";
288
289 text = Widget.TranslateString(text);
290 text = string.Format(text, m_FullTime.m_Seconds, m_FullTime.m_Minutes, m_FullTime.m_Hours, m_FullTime.m_Days);
291 m_txtLabel.SetText(text);
292
293 if (m_IsRespawn && time <= 1)
294 GetGame().SetLoginTimerFinished();
295 }

References GetGame().

◆ Show()

void LoginScreenBase::Show ( )
inlineprivate

Definition at line 255 of file DayZGame.c.

256 {
257 if (layoutRoot)
258 {
259 layoutRoot.Show(true);
260 m_HintPanel = new UiHintPanelLoading(layoutRoot.FindAnyWidget("hint_frame0"));
261 }
262 }

References m_HintPanel.

Member Data Documentation

◆ m_btnLeave

ButtonWidget LoginScreenBase::m_btnLeave
protected

Definition at line 199 of file DayZGame.c.

◆ m_FullTime

ref FullTimeData LoginScreenBase::m_FullTime
private

Definition at line 203 of file DayZGame.c.

◆ m_IsRespawn

bool LoginScreenBase::m_IsRespawn
protected

Definition at line 201 of file DayZGame.c.

◆ m_txtDescription

TextWidget LoginScreenBase::m_txtDescription
protected

Definition at line 197 of file DayZGame.c.

◆ m_txtLabel

TextWidget LoginScreenBase::m_txtLabel
protected

Definition at line 198 of file DayZGame.c.


The documentation for this class was generated from the following file: