Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
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 = g_Game.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
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
31 {
32 m_Root.Show(false);
33 m_Root.SetPos(0, 0);
34 m_Text.SetText("");
35 }
36}
proto owned string GetTooltip()
map: item x vector(index, width, height)
Definition enwidgets.c:657
void ModsMenuTooltip(Widget parent)
void ShowTooltip(ModInfo mod_ref)
DayZGame g_Game
Definition dayzgame.c:3942
proto void GetMousePos(out int x, out int y)
WorkspaceWidget Widget
Defined in code.
Icon x
Icon y
Widget m_Root
Definition sizetochild.c:91