[code]function ifs_missionselect_pcMulti_fnAddModeBoxes(this)
-- Now, do the boxes above and below the columns
local ColumnWidthL = 170
local ColumnWidthC = 200
local ColumnWidthR = 220
local ListHeightC = 170
local TopBoxHeight = 30 -- enough for two lines of text
local infobox_offset_y = 50 + 5
local infobox_offset_x = -38
local new_shell_offset_x = 240
local icon_x = 27
local icon_y = 18
local icon_height = 18
local icon_era_offset_y = 45
local era_text_offset_x = 32 + icon_height
local era_text_offset_y = 12
local era_check_offset_x = 10
local era_check_offset_y = 19
if( this == ifs_missionselect ) then
mode_list[6] =
{
key = "mode_xl", showstr = "modename.name.xl",
descstr = "modename.description.xl", subst = "xl",
icon = "mode_icon_XL",
}
end
this.mode_checkbox = NewIFContainer { --container for all the backgrounds
ScreenRelativeX = 0, -- left side of screen
ScreenRelativeY = 0, -- top
x = ColumnWidthL + infobox_offset_x + new_shell_offset_x - 50,
y = infobox_offset_y + ListHeightC + TopBoxHeight + icon_era_offset_y - 225, -- top-justify against left box
ZPos = 180,
}
local i
local Count = table.getn(mode_list)
print( "O HI!!! Count is: ", Count )
for i = 1,Count do
print( "YU GATTA! this is mode_list.key ", mode_list.key )
this.mode_checkbox = NewIFContainer {
--ScreenRelativeX = 0, -- left side of screen
--ScreenRelativeY = 0, -- top
--x = ColumnWidthL + infobox_offset_x + new_shell_offset_x - 50,
y = i * 20, -- top-justify against left box
--ZPos = 0,
bChecked = 1,
key = mode_list.key,
checkbox = NewIFImage {
--ZPos = 0,
x = era_check_offset_x, y = era_check_offset_y,
texture = "check_yes",
localpos_l = 1, localpos_t = 1,
localpos_r = 14, localpos_b = 14,
AutoHotspot = 1, tag = "check_mode" .. i,
bIsFlashObj = 1, flash_alpha = 1.0,
hotspot_width = 100,
},
text= NewIFText {
x = era_text_offset_x,
y = era_text_offset_y,
halign = "left", valign = "vcenter",
font = "gamefont_super_tiny",
textw = ColumnWidthR - 80, texth = TopBoxHeight,
startdelay=math.random()*0.5, nocreatebackground=1,
string = mode_list.showstr,
},
icon = NewIFImage {
--ZPos = 240,
localpos_l = icon_x,
localpos_r = icon_x + icon_height,
localpos_t = icon_y,
localpos_b = icon_y + icon_height,
--ColorR = 240,
--ColorG = 32,
--ColorB = 32,
texture = mode_list.icon,
},
}
end
end[/code]