DayZ 1.24
Loading...
Searching...
No Matches
ModsMenuTooltip.c
Go to the documentation of this file.
1class ModsMenuTooltip extends ScriptedWidgetEventHandler
2{
3 protected Widget m_Root;
5
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
13 {
14 delete m_Root;
15 }
16
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
31 {
32 m_Root.Show(false);
33 m_Root.SetPos(0, 0);
34 m_Text.SetText("");
35 }
36}
string m_Text
Definition ActionBase.c:49
Icon x
Icon y
Widget m_Root
Definition SizeToChild.c:85
map: item x vector(index, width, height)
Definition EnWidgets.c:651
void ModsMenuTooltip(Widget parent)
void ShowTooltip(ModInfo mod_ref)
proto native CGame GetGame()
proto void GetMousePos(out int x, out int y)