7 protected ImageWidget m_IconSmall;
8 protected ImageWidget m_IconCollapse;
12 protected ImageWidget m_IconBig;
13 protected MultilineTextWidget m_Author;
22 protected ModsMenuDetailed m_ParentMenu;
23 protected bool m_IsOpen;
25 void ModsMenuDetailedEntry(
ModInfo data,
Widget parent, ModsMenuDetailed parent_menu)
27 m_Root =
GetGame().GetWorkspace().CreateWidgets(
"gui/layouts/new_ui/mods_menu/mods_menu_detailed_entry.layout", parent);
28 m_Detail =
m_Root.FindAnyWidget(
"DetailContainer");
30 m_IconSmall = ImageWidget.Cast(
m_Root.FindAnyWidget(
"IconSmall"));
31 m_IconCollapse = ImageWidget.Cast(
m_Root.FindAnyWidget(
"collapse_button"));
32 m_IconCollapse.LoadImageFile( 1,
"set:dayz_gui image:icon_open" );
35 m_IconBig = ImageWidget.Cast(
m_Root.FindAnyWidget(
"IconBig"));
36 m_Author = MultilineTextWidget.Cast(
m_Root.FindAnyWidget(
"Author"));
37 m_Author.SetLineBreakingOverride(LinebreakOverrideMode.LINEBREAK_WESTERN);
46 m_ParentMenu = parent_menu;
53 void ~ModsMenuDetailedEntry()
68 m_IconBig.Show(
true );
69 m_IconSmall.Show(
false );
70 m_IconCollapse.SetImage( 1 );
81 m_IconBig.Show(
false );
82 m_IconSmall.Show(
true );
83 m_IconCollapse.SetImage( 0 );
91 string picture =
m_Data.GetPicture();
92 string logo =
m_Data.GetLogoSmall();
94 string description =
m_Data.GetOverview();
95 string author =
m_Data.GetAuthor();
96 string version =
m_Data.GetVersion();
97 string action =
m_Data.GetAction();
102 m_IconBig.LoadImageFile(0, picture);
106 m_IconBig.LoadImageFile(0, logo);
110 m_IconBig.LoadImageFile(0,
ModInfo.DEFAULT_PICTURE);
116 m_IconSmall.LoadImageFile(0, logo);
118 else if (picture !=
"")
120 m_IconSmall.LoadImageFile(0, picture);
124 m_IconSmall.LoadImageFile(0,
ModInfo.DEFAULT_LOGO_SMALL);
132 if (description !=
"")
145 m_Author.Show(
true );
146 m_Author.SetText(author);
151 m_Version.Show(
true );
152 m_Version.SetText(version);
155 #ifdef PLATFORM_WINDOWS
158 m_ActionWebsite.Show(
true );
164 bool isOwned =
m_Data.GetIsOwned();
165 m_Root.FindAnyWidget(
"ModOwnership").Show(
true );
166 m_Root.FindAnyWidget(
"Owned").Show( isOwned );
167 m_Root.FindAnyWidget(
"Unowned").Show( !isOwned );
168 m_ActionPurchase.Show(
true );
169 m_Version.Show(
false );
175 if( w == m_IconCollapse )
177 m_ParentMenu.Select(
m_Data, !m_IsOpen );
180 else if( w == m_ActionWebsite )
184 else if( w == m_ActionPurchase )
193 if( w == m_ActionWebsite )
195 m_ActionWebsite.SetBold(
true );
196 m_ActionWebsite.SetText(
"#mod_detail_info_website" );
199 if( w == m_ActionPurchase )
201 m_ActionPurchase.SetBold(
true );
202 m_ActionPurchase.SetText(
"#mod_detail_info_store" );
207 if(
m_Data.GetTooltip() !=
"" )
208 m_ParentMenu.PrepareTooltip(
m_Data );
217 if( w == m_ActionWebsite )
219 m_ActionWebsite.SetBold(
false );
220 m_ActionWebsite.SetText(
"#mod_detail_info_website" );
223 if( w == m_ActionPurchase )
225 m_ActionPurchase.SetBold(
false );
226 m_ActionPurchase.SetText(
"#mod_detail_info_store" );
231 m_ParentMenu.HideTooltip();