try to make my own GUI

try to make my own GUI

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

Moderator: Moderators

Post Reply
thedude
Posts: 66
Joined: 21 Aug 2009, 12:47

try to make my own GUI

Post by thedude »

I'm new to Spring and want try to make a GUI. I was told that there are two GUI's I can use to build my own: IceUI and RedUI. After looking at both I think I would use RedUI because it seems to me that the RedUI is not as big as others. So it would be easy for me to start.
My GUI:
-there should be a texture at the bottom of the screen (texture attached (I know it is ugly))
-the minimap should be at the left lower corner of the screen
-build pictures should be in the middle part of this texture (maybe two lines)
-the right part of my texture should contain the pic of the selected unit (and maybe later some command icons)
-the most important thing to me is: it should be possible to minimize the GUI (by that I mean: the whole GUI (texture of GUI and buttons) should slide down so one only can see a "maximize-button" and a little bit of the GUI)

Would it be possible to do this by using RedUI?
Are there easier ways to get this done? Maybe other GUI's or should I start from scratch. I think to start from scratch would be to hard for me.
Attachments
gui_texture.png
guitexture
(4.6 KiB) Downloaded 73 times
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: try to make my own GUI

Post by Regret »

thedude wrote:I'm new to Spring and want try to make a GUI. I was told that there are two GUI's I can use to build my own: IceUI and RedUI. After looking at both I think I would use RedUI because it seems to me that the RedUI is not as big as others. So it would be easy for me to start.
My GUI:
-there should be a texture at the bottom of the screen (texture attached (I know it is ugly))
-the minimap should be at the left lower corner of the screen
-build pictures should be in the middle part of this texture (maybe two lines)
-the right part of my texture should contain the pic of the selected unit (and maybe later some command icons)
-the most important thing to me is: it should be possible to minimize the GUI (by that I mean: the whole GUI (texture of GUI and buttons) should slide down so one only can see a "maximize-button" and a little bit of the GUI)

Would it be possible to do this by using RedUI?
Are there easier ways to get this done? Maybe other GUI's or should I start from scratch. I think to start from scratch would be to hard for me.
All but minimap control is possible. I will include minimap controls in later versions.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Re: try to make my own GUI

Post by Caydr »

I've put together a minimap widget that can do what you're asking.

Red UI could be hacked to minimize pretty easily.

But in both cases though you'd probably want to wait a bit. My minimap widget, I was hoping to release with AA, and Red UI is still in heavy development so any modifications you do will be obsoleted by updates to the original widgets pretty fast.

You might build up some support if you draw a concept of how you'd make it look.

As for IceUI and others, even if you make the modifications people may not want to use them due to the performance hit. Red UI doesn't seem so bad this way.
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: try to make my own GUI

Post by Regret »

Caydr wrote:any modifications you do will be obsoleted by updates to the original widgets pretty fast.
Wrong. Backwards compatibility will be with each release (exception maybe if it's something very big, but that's unlikely).
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Re: try to make my own GUI

Post by Caydr »

I mean, he'll miss out on bug fixes and improvements if he modifies Red UI files. He could just do a file comparison and update the relevant bits, but it could be a fair amount of work, given how many updates you've made so quickly.
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: try to make my own GUI

Post by Regret »

Caydr wrote:I mean, he'll miss out on bug fixes and improvements if he modifies Red UI files. He could just do a file comparison and update the relevant bits, but it could be a fair amount of work, given how many updates you've made so quickly.
He doesn't need to modify the RedUI framework itself, he can make everything he wants except for the minimap already.
thedude
Posts: 66
Joined: 21 Aug 2009, 12:47

Re: try to make my own GUI

Post by thedude »

Ok I downloaded the RedUI. There are two files. Where do I have to put this two files to? Both to mod/mymod/LuaUI/Widget?
What I'd like to do first is to load the texture alligned to the bottom of the screen and put the build menu in the middle of my texture.
How can I do this? :?
I attached my first concept.
Attachments
myconcept_1.png
my first concept
(85.83 KiB) Downloaded 30 times
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: try to make my own GUI

Post by Regret »

thedude wrote:How can I do this?
By learning how to code in Lua and how widgets work in spring. Will take several days/weeks. Good luck.
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: try to make my own GUI

Post by CarRepairer »

thedude wrote:I'm new to Spring and want try to make a GUI. I was told that there are two GUI's I can use to build my own: IceUI and RedUI.
You were told wrong. There's also ChiliGUI. Example (you can see both IceUI and Chili windows on this screen)
SirMaverick
Posts: 834
Joined: 19 May 2009, 21:10

Re: try to make my own GUI

Post by SirMaverick »

CarRepairer wrote:There's also ChiliGUI.
Still alpha. Keep that in mind when you try to use it.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Re: try to make my own GUI

Post by Caydr »

And you should either be constructive or at least on-topic.
thedude
Posts: 66
Joined: 21 Aug 2009, 12:47

Re: try to make my own GUI

Post by thedude »

Can someone tell me how to load my guitexture into spring?
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Re: try to make my own GUI

Post by Caydr »

Unfortunately, this was the correct answer.
Regret wrote:
thedude wrote:How can I do this?
By learning how to code in Lua and how widgets work in spring. Will take several days/weeks. Good luck.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: try to make my own GUI

Post by AF »

Caydr wrote:I mean, he'll miss out on bug fixes and improvements if he modifies Red UI files. He could just do a file comparison and update the relevant bits, but it could be a fair amount of work, given how many updates you've made so quickly.
Monkeypatching, go google it
Post Reply

Return to “Lua Scripts”