Ricoom Posted January 5, 2016 Share Posted January 5, 2016 Have tryed, but it always ends up crashing so how is it different from adding a button to customizastionscreen? Link to comment https://forums.kleientertainment.com/forums/topic/61930-adding-a-button-to-newgamescreen/ Share on other sites More sharing options...
Blueberrys Posted January 6, 2016 Share Posted January 6, 2016 @Ricoom Code and log please. Link to comment https://forums.kleientertainment.com/forums/topic/61930-adding-a-button-to-newgamescreen/#findComment-705802 Share on other sites More sharing options...
Ricoom Posted January 6, 2016 Author Share Posted January 6, 2016 Ok, got that problem solved ( had forgot to access font global trying to use local variable that didn't exist, Im not that familiar with lua) but now have another problem .. How to realign existing newgame screen buttons to make my button fit and look nice among others. As the buttons in newgamescreen are defined as menu items instead of separate buttons don't know how to refrence them from my mod.table.insert(menuitems, {text = STRINGS.UI.NEWGAMESCREEN.CHANGECHARACTER, cb = function() self:ChangeCharacter() end, offset = Vector3(0, yIncrement, 0)}) table.insert(menuitems, {text = STRINGS.UI.NEWGAMESCREEN.CUSTOMIZE, cb = function() self:Customize() end, offset = Vector3(0, yIncrement, 0)}) table.insert(menuitems, {text = STRINGS.UI.NEWGAMESCREEN.CANCEL, cb = function() TheFrontEnd:PopScreen(self) end, offset = Vector3(0, yIncrement, 0)}) else menuitems = { {text = STRINGS.UI.NEWGAMESCREEN.START, cb = function() self:Start() end, offset = Vector3(0,10,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}, } end self.menu = self.root:AddChild(Menu(menuitems, -70)) self.menu:SetPosition(0, 30, 0) Link to comment https://forums.kleientertainment.com/forums/topic/61930-adding-a-button-to-newgamescreen/#findComment-705836 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now