Code: Select all
excessHeat = 0 -- if we managed to get out of critical heat, remove all excess
edit2: That should happen the next time ChangeHeat is called though, which is once a second.
Moderators: FLOZi, SpikedHelmet, Moderators, Content Developer
Code: Select all
excessHeat = 0 -- if we managed to get out of critical heat, remove all excess
http://springrts.com/wiki/Gamedev:PublicReposFunkencool wrote:No particular preferences, but I guess I should probably have a better idea what I'm getting into. Is there an SVN somewhere? I can't seem to find one.
Your menu would be a massive help as the current plans do not even remotely cover itFunkencool wrote:No particular preferences, but I guess I should probably have a better idea what I'm getting into. Is there an SVN somewhere? I can't seem to find one.
Edit: At the very least I could implement my menu, and see what needs doing from there.
Code: Select all
-- WIP
function widget:GetInfo()
return {
name = 'Main Menu API? examples',
desc = 'Some examples of how to add options (and eventually tabs) to Funks Main Menu',
author = 'Funkencool',
date = '2014',
license = 'GNU GPL v2',
layer = 0,
enabled = true
}
end
local Chili
local Menu
local function change(obj)
Spring.Echo(obj.caption..' Toggled')
end
function widget:Initialize()
Chili = WG.Chili
Menu = WG.MainMenu
local widgetOptions = Chili.Control:New{
x = 0,
width = '100%',
height = 70,
padding = {0,0,0,0},
children = {
Chili.Label:New{caption='Widget Option Example',x=0,y=0},
Chili.Checkbox:New{caption='Setting 1:',width = 80,y=15,right=0,checked=false,OnChange = {change}},
Chili.Checkbox:New{caption='Setting 2:',width = 80,y=30,right=0,checked=false,OnChange = {change}},
Chili.Checkbox:New{caption='Setting 3:',width = 80,y=45,right=0,checked=false,OnChange = {change}},
Chili.Line:New{y=60,width='100%'}
}
}
Menu.AddToStack('Graphics', widgetOptions)
end