screens/newgamescreen.lua
3637383940414243444546474849505152535455565758596061626364656667
self.cancelbutton.text:SetColour(0,0,0,1)
self.cancelbutton:SetPosition( 0, -235, 0)
--]]
self.title = self.root:AddChild(Text(TITLEFONT, 60))
self.title:SetPosition( 0, 200, 0)
self.title:SetRegionSize(250,70)
self.title:SetString(STRINGS.UI.NEWGAMESCREEN.TITLE)
self.title:SetVAlign(ANCHOR_MIDDLE)
self.portraitbg = self.root:AddChild(Image("images/saveslot_portraits.xml", "background.tex"))
self.portraitbg:SetPosition(0,100,0)
self.portraitbg:SetClickable(false)
self.portrait = self.root:AddChild(Image())
self.portrait:SetVRegPoint(ANCHOR_MIDDLE)
self.portrait:SetHRegPoint(ANCHOR_MIDDLE)
self.portrait:SetClickable(false)
local atlas = (table.contains(MODCHARACTERLIST, self.character) and "images/saveslot_portraits/"..self.character..".xml") or "images/saveslot_portraits.xml"
self.portrait:SetTexture(atlas, self.character..".tex")
self.portrait:SetPosition(0, 100, 0)
local menuitems =
{
{text = STRINGS.UI.NEWGAMESCREEN.CHANGECHARACTER, cb = function() self:ChangeCharacter() end},
{text = STRINGS.UI.NEWGAMESCREEN.CUSTOMIZE, cb = function() self:Customize() end},
{text = STRINGS.UI.NEWGAMESCREEN.START, cb = function() self:Start() end},
{text = STRINGS.UI.NEWGAMESCREEN.CANCEL, cb = function() TheFrontEnd:PopScreen(self) end},
}
3637383940414243444546474849505152535455565758596061626364
self.cancelbutton.text:SetColour(0,0,0,1)
self.cancelbutton:SetPosition( 0, -235, 0)
--]]
self.title = self.root:AddChild(Text(TITLEFONT, 60))
self.title:SetPosition( 75, 135, 0)
self.title:SetRegionSize(250,60)
self.title:SetHAlign(ANCHOR_LEFT)
self.title:SetString(STRINGS.UI.NEWGAMESCREEN.TITLE)
self.portraitbg = self.root:AddChild(Image("images/saveslot_portraits.xml", "background.tex"))
self.portraitbg:SetPosition(-120, 135, 0)
self.portraitbg:SetClickable(false)
self.portrait = self.root:AddChild(Image())
self.portrait:SetClickable(false)
local atlas = (table.contains(MODCHARACTERLIST, self.character) and "images/saveslot_portraits/"..self.character..".xml") or "images/saveslot_portraits.xml"
self.portrait:SetTexture(atlas, self.character..".tex")
self.portrait:SetPosition(-120, 135, 0)
local menuitems =
{
{text = STRINGS.UI.NEWGAMESCREEN.START, cb = function() self:Start() end, offset = Vector3(0,20,0)},
{text = STRINGS.UI.NEWGAMESCREEN.CHANGECHARACTER, cb = function() self:ChangeCharacter() end},
{text = STRINGS.UI.NEWGAMESCREEN.CUSTOMIZE, cb = function() self:Customize() end},
{text = STRINGS.UI.NEWGAMESCREEN.CANCEL, cb = function() TheFrontEnd:PopScreen(self) end},
}