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

Private Member Functions

void ConnectionLost (DayZGame game)
 
void Show ()
 
void Hide ()
 
void SetText (string text)
 
float GetDuration ()
 
void SetDuration (float duration)
 

Private Attributes

ref Widget m_WidgetRoot
 
TextWidget m_TextWidgetTitle
 
float m_duration
 

Detailed Description

Definition at line 334 of file DayZGame.c.

Constructor & Destructor Documentation

◆ ConnectionLost()

void ConnectionLost::ConnectionLost ( DayZGame game)
inlineprivate

Definition at line 340 of file DayZGame.c.

341 {
342 m_WidgetRoot = game.GetWorkspace().CreateWidgets("gui/layouts/day_z_connection_lost.layout");
343 m_WidgetRoot.Show(false);
344
345 Class.CastTo(m_TextWidgetTitle, m_WidgetRoot.FindAnyWidget("TextWidget"));
346 m_duration = 0.0;
347 }
Super root of all classes in Enforce script.
Definition EnScript.c:11
TextWidget m_TextWidgetTitle
Definition DayZGame.c:337
ref Widget m_WidgetRoot
Definition DayZGame.c:336
float m_duration
Definition DayZGame.c:338
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

References Class::CastTo(), m_duration, m_TextWidgetTitle, and m_WidgetRoot.

Member Function Documentation

◆ GetDuration()

float ConnectionLost::GetDuration ( )
inlineprivate

Definition at line 372 of file DayZGame.c.

373 {
374 return m_duration;
375 }

References m_duration.

◆ Hide()

void ConnectionLost::Hide ( )
inlineprivate

Definition at line 361 of file DayZGame.c.

362 {
363 if (m_WidgetRoot.IsVisible())
364 m_WidgetRoot.Show(false);
365 }

References m_WidgetRoot.

◆ SetDuration()

void ConnectionLost::SetDuration ( float duration)
inlineprivate

Definition at line 377 of file DayZGame.c.

378 {
380 }

References m_duration.

◆ SetText()

void ConnectionLost::SetText ( string text)
inlineprivate

Definition at line 367 of file DayZGame.c.

368 {
369 m_TextWidgetTitle.SetText(text);
370 }

References m_TextWidgetTitle.

◆ Show()

void ConnectionLost::Show ( )
inlineprivate

Definition at line 349 of file DayZGame.c.

350 {
351 if (!m_WidgetRoot.IsVisible())
352 {
353 if (g_Game.GetUIManager().IsDialogVisible())
354 g_Game.GetUIManager().HideDialog();
355
356 m_WidgetRoot.Show(true);
357 m_TextWidgetTitle.SetText("");
358 }
359 }
DayZGame g_Game
Definition DayZGame.c:3528

References g_Game, m_TextWidgetTitle, and m_WidgetRoot.

Member Data Documentation

◆ m_duration

float ConnectionLost::m_duration
private

Definition at line 338 of file DayZGame.c.

Referenced by ConnectionLost(), GetDuration(), and SetDuration().

◆ m_TextWidgetTitle

TextWidget ConnectionLost::m_TextWidgetTitle
private

Definition at line 337 of file DayZGame.c.

Referenced by ConnectionLost(), SetText(), and Show().

◆ m_WidgetRoot

ref Widget ConnectionLost::m_WidgetRoot
private

Definition at line 336 of file DayZGame.c.

Referenced by ConnectionLost(), Hide(), and Show().


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