[code]do
this = ifs_freeform_sides
if gPlatformStr == "PS2" then
this.bgModel = NewIFModel {
ScreenRelativeX = 0.5,
ScreenRelativeY = 0.5,
ZPos = 255,
model = "shell_cube",
ColorR = 0, ColorG = 0, ColorB = 0,
scale = 1.25,
depth = 0.009,
inert = 1,
}
else
-- note this isn't the safe dimensions!
local w,h,v,widescreen = ScriptCB_GetScreenInfo()
this.bgImage = NewIFImage {
ScreenRelativeX = 0,
ScreenRelativeY = 0,
UseSafezone = 0,
ZPos = 255,
texture = "blank_icon",
ColorR = 0, ColorG = 0, ColorB = 0, alpha = 0.75,
localpos_l = 0,
localpos_t = 0,
localpos_r = w*widescreen,
localpos_b = h,
inert = 1,
}
end
local w,h = ScriptCB_GetSafeScreenInfo()
this.title = NewIFContainer {
ScreenRelativeX = 0.5, -- center
ScreenRelativeY = 0.0, -- top
text = NewIFText {
font = "gamefont_large",
string = "ifs.freeform.picksides",
textw = w,
halign = "hcenter",
valign = "top",
nocreatebackground = 1
}
}
side_w = w * 0.5
this.team1 = NewIFContainer {
ScreenRelativeX = 0.0, -- left
ScreenRelativeY = 0.2, -- top
text = NewIFText {
font = "gamefont_large",
textw = side_w,
x = 0,
halign = "hcenter",
valign = "vcenter",
nocreatebackground = 1
},
icon = NewIFImage {
ZPos = 200,
alpha = 0.25,
localpos_l = side_w * 0.5 - 32,
localpos_t = -32,
localpos_r = side_w * 0.5 + 32,
localpos_b = 32,
inert = 1,
}
}
this.team2 = NewIFContainer {
ScreenRelativeX = 1.0, -- right
ScreenRelativeY = 0.2, -- top
text = NewIFText {
font = "gamefont_large",
textw = side_w,
x = -side_w,
halign = "hcenter",
valign = "vcenter",
nocreatebackground = 1
},
icon = NewIFImage {
ZPos = 200,
alpha = 0.25,
localpos_l = -side_w * 0.5 - 32,
localpos_t = -32,
localpos_r = -side_w * 0.5 + 32,
localpos_b = 32,
inert = 1,
}
}
name_h = h * 0.1
this.players = NewIFContainer {
ScreenRelativeX = 0.0,
ScreenRelativeY = 0.35,
side_x = { [1] = 0, [2] = side_w },
name_y = { [0] = 0, [1] = name_h, [2] = name_h * 2, [3] = name_h * 3 },
[0] = NewIFText {
font = "gamefont_medium",
textw = side_w,
halign = "hcenter",
valign = "vcenter",
nocreatebackground = 1
},
[1] = NewIFText {
font = "gamefont_medium",
textw = side_w,
halign = "hcenter",
valign = "vcenter",
nocreatebackground = 1
},
[2] = NewIFText {
font = "gamefont_medium",
textw = side_w,
halign = "hcenter",
valign = "top",
nocreatebackground = 1
},
[3] = NewIFText {
font = "gamefont_medium",
textw = side_w,
halign = "hcenter",
valign = "top",
nocreatebackground = 1
},
}
local screen_w, screen_h = ScriptCB_GetScreenInfo()
local bar_h = h * .1
this.letterbox_top = NewIFContainer{
ScreenRelativeX = 0.0, --left
ScreenRelativeY = 0.0, --top
texture = "blank_icon",
ZPos = 200,
image = NewIFImage {
texture = "blank_icon",
ColorR = 0, ColorG = 0, ColorB = 0,
-- alpha = 1.0,
ZPos = 200,
localpos_l = -screen_w,
localpos_t = -screen_h,
localpos_r = screen_w,
localpos_b = bar_h,
inert = 1,
},
}
this.letterbox_bottom = NewIFContainer{
ScreenRelativeX = 0.0, --left
ScreenRelativeY = 1.0, --bottom
texture = "blank_icon",
ZPos = 200,
top = NewIFImage {
texture = "blank_icon",
ColorR = 0, ColorG = 0, ColorB = 0,
ZPos = 200,
localpos_l = -screen_w,
localpos_t = -bar_h,
localpos_r = screen_w,
localpos_b = screen_h,
inert = 1,
},
}
this.action = NewIFContainer{
ScreenRelativeX = 0.0, -- left
ScreenRelativeY = 1.0, -- bottom
width = action_w,
header = "Action",
ZPos = 190,
misc = NewHelptext {
x = w,
buttonicon = "btn_directional_pad_LR",
string = "common.change",
bRightJustify = 1,
y = -34,
},
accept = NewHelptext {
x = w,
buttonicon = "btna",
string = "common.select",
bRightJustify = 1,
y = -15,
},
back = NewHelptext {
x = 0,
buttonicon = "btnb",
string = "ifs.freeform.fleet.deselect",
bLeftJustify = 1,
y = -15,
},
}
end[/code]