DayZ
1.24
Loading...
Searching...
No Matches
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
}
m_Text
string m_Text
Definition
ActionBase.c:49
x
Icon x
y
Icon y
m_Root
Widget m_Root
Definition
SizeToChild.c:85
ModInfo
Definition
ModInfo.c:2
Param3
Definition
EntityAI.c:95
RichTextWidget
Definition
gameplay.c:314
ScriptedWidgetEventHandler
map: item x vector(index, width, height)
Definition
EnWidgets.c:651
ScriptedWidgetEventHandler::HideTooltip
void HideTooltip()
Definition
ModsMenuTooltip.c:30
ScriptedWidgetEventHandler::m_Root
Widget m_Root
Definition
SizeToChild.c:9
ScriptedWidgetEventHandler::ModsMenuTooltip
void ModsMenuTooltip(Widget parent)
Definition
ModsMenuTooltip.c:6
ScriptedWidgetEventHandler::m_Text
RichTextWidget m_Text
Definition
ModsMenuTooltip.c:4
ScriptedWidgetEventHandler::ShowTooltip
void ShowTooltip(ModInfo mod_ref)
Definition
ModsMenuTooltip.c:17
ScriptedWidgetEventHandler::~ModsMenuTooltip
void ~ModsMenuTooltip()
Definition
ModsMenuTooltip.c:12
Widget
Definition
EnWidgets.c:190
GetGame
proto native CGame GetGame()
GetMousePos
proto void GetMousePos(out int x, out int y)
scripts
5_Mission
GUI
NewUI
ModsMenu
ModsMenuTooltip.c
Generated by
1.10.0