UI Discussion - Page 3

UI Discussion

When a mechwarrior falls in battle, what does she leave to legacy?

Moderators: FLOZi, SpikedHelmet, Moderators, Content Developer

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: UI Discussion

Post 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. :?
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: UI Discussion

Post by smoth »

smawthy tah du list:

fix danger, it is still there when unit cools down.
add sub bar for excess heat.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: UI Discussion

Post by smoth »

sourceforge, such a pain. Anyway, here you go flozzykins.
Attachments
updates.zip
(18.67 KiB) Downloaded 13 times
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: UI Discussion

Post 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
Attachments
MCL Buildmenu Mockup.png
MCL Buildmenu Mockup.png (23.87 KiB) Viewed 8898 times
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: UI Discussion

Post by smoth »

fer anarchid?
User avatar
Funkencool
Posts: 542
Joined: 02 Dec 2011, 22:31

Re: UI Discussion

Post 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).
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: UI Discussion

Post 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)
User avatar
Funkencool
Posts: 542
Joined: 02 Dec 2011, 22:31

Re: UI Discussion

Post 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.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: UI Discussion

Post 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/
User avatar
Funkencool
Posts: 542
Joined: 02 Dec 2011, 22:31

Re: UI Discussion

Post by Funkencool »

Cool, thanks :-)
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: UI Discussion

Post 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
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: UI Discussion

Post 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)
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: UI Discussion

Post by smoth »

His build menu is not what they are needing. I mean his work on the settings menu etc.
User avatar
Funkencool
Posts: 542
Joined: 02 Dec 2011, 22:31

Re: UI Discussion

Post 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.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: UI Discussion

Post 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
Attachments
mcl_gui_unitcard.lua
(19.91 KiB) Downloaded 9 times
Post Reply

Return to “MechCommander: Legacy”