Page 3 of 3

Re: UI Discussion

Posted: 19 Jan 2014, 20:08
by FLOZi
Line 235

Code: Select all

excessHeat = 0 -- if we managed to get out of critical heat, remove all excess
edit: but doesn't set the rules param, thanks - thought it might be my booboo :P

edit2: That should happen the next time ChangeHeat is called though, which is once a second. :?

Re: UI Discussion

Posted: 19 Jan 2014, 21:02
by smoth
smawthy tah du list:

fix danger, it is still there when unit cools down.
add sub bar for excess heat.

Re: UI Discussion

Posted: 19 Jan 2014, 22:12
by smoth
sourceforge, such a pain. Anyway, here you go flozzykins.

Re: UI Discussion

Posted: 01 Feb 2014, 00:05
by FLOZi
build menu mockup - Jump / ECM / BAP / NARC / TAG / AMS are filters to select only mechs with those special abilities/weapons

Nothing finalised here, just hashing out options with Mr Canadia

Re: UI Discussion

Posted: 01 Feb 2014, 02:50
by smoth
fer anarchid?

Re: UI Discussion

Posted: 18 Feb 2014, 20:13
by Funkencool
If you still need any more help with the UI, I'd be more than willing to help. While working on BARs UI I've become quite comfortable with chili (and lua).

Re: UI Discussion

Posted: 18 Feb 2014, 20:52
by FLOZi
All help is appreciated - is there anything in particular you'd like to contribute to?

UI only or other info elements? (NARC/TAG indicator etc)

Re: UI Discussion

Posted: 18 Feb 2014, 21:08
by Funkencool
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.

Re: UI Discussion

Posted: 18 Feb 2014, 21:19
by FLOZi
Funkencool 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.
http://springrts.com/wiki/Gamedev:PublicRepos

https://sourceforge.net/p/mwspring/code/log/

Re: UI Discussion

Posted: 18 Feb 2014, 21:22
by Funkencool
Cool, thanks :-)

Re: UI Discussion

Posted: 19 Feb 2014, 00:20
by smoth
Funkencool 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.
Your menu would be a massive help as the current plans do not even remotely cover it

Re: UI Discussion

Posted: 19 Feb 2014, 10:53
by Anarchid
I've made some kind of horrible orders window so that i could hide the vanilla orders menu. Someone touching it up to BAR levels would be amazing!

Note that that menu also fails to display quite a few of Flozi's special commands (especially beacon upgrades)

Re: UI Discussion

Posted: 19 Feb 2014, 15:00
by smoth
His build menu is not what they are needing. I mean his work on the settings menu etc.

Re: UI Discussion

Posted: 19 Feb 2014, 23:22
by Funkencool
So I figured I'd do a quick walkthrough of my Menu.

First is the 'Info' page, which I'll probably rename. I have a lot of todos for this but for now it is what comes up when the user presses 'Shift+Esc'.

If there's a credits.txt in the root of the game archive (or folder) it'll also show that. I mostly wanted this for BAR so I could put music credits since it's least I could do for the artists.

Image

Next is the 'Interface' tab which can be brought up with 'F11'.
It has the widget list and should contain any settings pertaining to the UI.

Right now I have skins, which list all available chili skins (dynamically, so user skins too).
And cursors which is only static right now, so it has a hardcoded list.

Image

Then there's the 'Graphics' tab, which contains any graphic related options.
The options on the left are all engine settings and hardcoded.
The options on the right (in the red box) are settings added by widgets. I'll get to that in a sec.
Image

It also handles different sizes/resizing gracefully
Image


I wanted to make it easy to add options without actually touching Menu's code so I added some global functions to handle that.

For a quick example, the settings on the right in the that red box were added with this.

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
AddToStack() will add a control to a stackpanel where the red box is. This means there's no fighting with other widgets for room, since chili will handle it. The only downfall is they will only be organized depending on the order in which they're added by the widgets.

There's more to it but I'm going to work on some examples first.

Re: UI Discussion

Posted: 26 Jul 2014, 05:48
by smoth
FING F!

I don't know why YOUR repo is different, no other repo has EVER given me this much trouble.

SO MAD! ANyway, I lost most of my evening to tracking down a few obscure as f**** bugs...
  • Fixed:
    • unit given would result in the card code crashing
    • unit dying would result in the card code crashing
  • Added:
    • support for disabled weapon status
  • Updated:
    • general code tweaks a bit of more verbose checks added