Dayz Explorer
1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
modsmenutooltip.c
Go to the documentation of this file.
1
class
ModsMenuTooltip
extends
ScriptedWidgetEventHandler
2
{
3
protected
Widget
m_Root
;
4
protected
RichTextWidget
m_Text
;
5
6
void
ModsMenuTooltip(
Widget
parent)
7
{
8
m_Root
=
GetGame
().GetWorkspace().CreateWidgets(
"gui/layouts/new_ui/mods_menu/mods_tooltip.layout"
, parent);
9
m_Text
=
RichTextWidget
.Cast(
m_Root
.FindAnyWidget(
"TooltipText"
));
10
}
11
12
void
~ModsMenuTooltip()
13
{
14
delete
m_Root
;
15
}
16
17
void
ShowTooltip(
ModInfo
mod_ref)
18
{
19
m_Root
.Show(
true
);
20
m_Text
.SetText(mod_ref.GetTooltip());
21
22
int
x
,
y
;
23
GetMousePos
(
x
,
y
);
24
m_Root
.SetPos(
x
,
y
);
25
26
m_Text
.Update();
27
m_Root
.Update();
28
}
29
30
void
HideTooltip()
31
{
32
m_Root
.Show(
false
);
33
m_Root
.SetPos(0, 0);
34
m_Text
.SetText(
""
);
35
}
36
}
GetGame
proto native CGame GetGame()
ModInfo
Definition:
modinfo.c:1
GetMousePos
proto void GetMousePos(out int x, out int y)
y
Icon y
RichTextWidget
Definition:
gameplay.c:315
x
Icon x
m_Text
protected string m_Text
Definition:
actionbase.c:49
Widget
Definition:
enwidgets.c:189
m_Root
protected Widget m_Root
Definition:
sizetochild.c:91
ScriptedWidgetEventHandler
map: item x vector(index, width, height)
Definition:
enwidgets.c:650
DAYZ
scripts_v1.24.157551
scripts
mission
gui
newui
modsmenu
modsmenutooltip.c
Generated by
1.8.17