Custom GUI?

Custom GUI?

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

kalda341
Posts: 101
Joined: 19 Nov 2010, 09:44

Custom GUI?

Post by kalda341 »

How would I go about creating a custom interface with a widget? I mostly want to create a different build unit section.
User avatar
Niobium
Posts: 456
Joined: 07 Dec 2008, 02:35

Re: Custom GUI?

Post by Niobium »

Unless you are going for something really basic, then your best bet is to use an existing framework (IceUI, RedUI, chiliUI, etc). From there you can either start from scratch with framework help, or use an existing build menu widget for that framework and modify it, which is probably the easier route.

What are some of the things you are going for in the UI?
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Custom GUI?

Post by Forboding Angel »

use chili... just trust me on this one.
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Custom GUI?

Post by Jazcash »

Use IceUI, just trust me on this one.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Custom GUI?

Post by Forboding Angel »

Lets see, Ice ui vs chilli:

iceui can't be included with the mod
iceui can't be extended easily
iceui has very odd text arrangement (some words on the same lines will be different sizes, etc)
iceui can't easily have added gui elements
iceui is very resource hungry
iceui is only suitable for mods/games that use energy/metal resourcing

^^
Chiliui is basically the inverse of the above.
kalda341
Posts: 101
Joined: 19 Nov 2010, 09:44

Re: Custom GUI?

Post by kalda341 »

Where can I get chiliui? The only place I can find it is here: http://code.google.com/p/zero-k/source/ ... e%3Dclosed and I don't want to manually create every individual file.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Custom GUI?

Post by Forboding Angel »

Get tortoisesvn (you'll need it anyway if you're gonna start your own project), and download the zk repo (not the whole thing, just the mods part). That way you ahve the files locally and can just copy them over.
kalda341
Posts: 101
Joined: 19 Nov 2010, 09:44

Re: Custom GUI?

Post by kalda341 »

Thanks.
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Custom GUI?

Post by Jazcash »

Forboding Angel wrote: iceui can't be included with the mod
What makes you think that? I seem to remember CA used to use Chilli, along with various other mod/games.
Forboding Angel wrote: iceui has very odd text arrangement (some words on the same lines will be different sizes, etc)
This has never happened to me, like, ever.

Forboding Angel wrote: iceui can't easily have added gui elements
Forboding Angel wrote: iceui can't be extended easily
These are pretty much the same point and I agree.
Forboding Angel wrote: iceui is very resource hungry
Chilli is much newer than IceUI and yet has had so many more complaints about it eating up FPS.

Forboding Angel wrote: iceui is only suitable for mods/games that use energy/metal resourcing
Which is just about every game. If a game uses neither you can just turn them off. Gundam has its own sort of system but doesn't use Chilli am I right?
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Custom GUI?

Post by Forboding Angel »

Gundam uses chili.

IceUI cannot be included with the mod.

For text arraingement, press f11 and laugh at the lol HUEG and LOLSMALL text all over the place.

If it's eating your fps, then it's most likely a fault of your graphics card (people around here love to play on netbooks, laptops, and their mom's dell with it's integrated intel chipset -- "BUT I CAN PUMP IT UP TO 256MB IN THE BIOS!" Arugh, /facepalm). IceUI just plain sucks fps no matter what you have. It's resource hungry.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Custom GUI?

Post by knorke »

tl;dr:
seems like both chili and ice have their problems.

Depending on how complex your "build unit section" thing should be you might as well make it from scratch. Search wiki for stuff to draw on screen and reading mouse clicks.
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Custom GUI?

Post by Jazcash »

Yeh, sorry by Chilli in Gundam I meant Gundam has its own resource panel. That's why I can use IceUI in Gundam whilst still using Smoth's smexy panel in the top right corner.

F11 looks fine for me.

Doesn't seem to eat my FPS any more than other GUIs...
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Custom GUI?

Post by smoth »

There are 3 ui frameworks:

Red
(used by ba)

ICEUI
(used by many players who prefer that widget setup for *A)

Chilli
(used by ca, cursed, evolution RTS, gundam RTS and when I get enough understanding, s44)

custom gl code
you can just use raw gl texrect and other elements to do ui as well. Personally this approach is my favorite but is also the hardest to work with and why I moved to chili.

Each one has their positives and negatives, obviously I prefer chili but the question is what is your widget for, if it is for a game does the game function a lot like ota? Why not use red? If it is going to have a very simple ui, why not use ice?

I prefer chilli because I found it feature rich, easily skinable and I have seen some of the most flexible stuff done with it. Some will argue one framework is weaker than another and for parts of them this may be true but "the best" is always opinion driven.

so what is your ui for, that can help eliminate choices and possibly vector you to something best suited for your needs.
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Custom GUI?

Post by Jazcash »

Yeh, that's probably the stance I should be taking instead. I've stated before I don't hate Chilli, and I take back any GUI1 > GUI2 I may have said. Mainly because you can't just compare a GUI and say it's better than another unless you specify on a particular use or purpose.

And yes, I agree, Chilli is definitely the best way forward for new, active games to develop their interface. However, IceUI still has advantages over other GUIs and vice versa, same goes for disadvantages.

That is primarily why I think it's important to give advanced users the choice of which one to use. If it's not suited for that particular game, I'm sure experienced users will know this but may still want individual elements of a certain GUI for whatever reason. For example, I may like everything about Chilli, apart from the chatbox and chat bubbles so want to bring in the IceUI chat instead.
kalda341
Posts: 101
Joined: 19 Nov 2010, 09:44

Re: Custom GUI?

Post by kalda341 »

What's the url for the zk repo?
kalda341
Posts: 101
Joined: 19 Nov 2010, 09:44

Re: Custom GUI?

Post by kalda341 »

Oh, I see, its just checkout on the google code.
kalda341
Posts: 101
Joined: 19 Nov 2010, 09:44

Re: Custom GUI?

Post by kalda341 »

I have placed any file from widgets with any reference to chili in my widgets folder. I have them all enabled but see no difference. I realise I probably have to do a lot of tweaking, but surely I would notice some ui difference?
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Custom GUI?

Post by knorke »

your local widget folder or your games widget folder? might make a difference, not sure.

ask in #ca
i am not sure if chili or ice have any real documenation. you probally need to copy moar random files.
kalda341
Posts: 101
Joined: 19 Nov 2010, 09:44

Re: Custom GUI?

Post by kalda341 »

My game widgets folder.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Custom GUI?

Post by Forboding Angel »

YOu probably need this:
http://code.google.com/p/zero-k/source/ ... idgets.lua

and this:

http://code.google.com/p/zero-k/source/ ... camain.lua

Moreover, infolog.txt will tell you what is going wrong. ALWAYS look at infolog!
Post Reply

Return to “Lua Scripts”