Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
modsmenutooltip.c
Go to the documentation of this file.
1class 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;
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}
proto native CGame GetGame()
proto void GetMousePos(out int x, out int y)
Icon x
Icon y
Widget m_Root
Definition sizetochild.c:91