How to Design our own UI for our own map? - Page 2

How to Design our own UI for our own map?

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

Moderator: Moderators

Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: How to Design our own UI for our own map?

Post by Regret »

Muneeb Ahmed wrote:UI using java?
I have never seen a game that was not entirely in Java / Web-based to use Java for anything ingame.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: How to Design our own UI for our own map?

Post by knorke »

http://wildfiregames.com/0ad/
not Java but AD 0 uses javascript similiar to how spring uses Lua.
User avatar
Muneeb Ahmed
Posts: 11
Joined: 26 Jul 2010, 09:20

Re: How to Design our own UI for our own map?

Post by Muneeb Ahmed »

knorke wrote:why a combo box?
why not just a number of buttons? much easier to do.
Well thats also a good option. But question is still there! HOW? :?
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: How to Design our own UI for our own map?

Post by Google_Frog »

If you know Java Lua should be easy.

My advice is to look through some Lua tutorials so you can understand the syntax then look through some of the simpler widgets in this subforum.
User avatar
Muneeb Ahmed
Posts: 11
Joined: 26 Jul 2010, 09:20

Re: How to Design our own UI for our own map?

Post by Muneeb Ahmed »

Google_Frog wrote:If you know Java Lua should be easy.
Ok. I'll look for that.
By the way, thanks alot! :-)
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: How to Design our own UI for our own map?

Post by Argh »

Coding buttons / combobox:

Very straightforward, if you're OK with static positions. If you need dynamic positions (drag, resize, dynamically adding new ones) that gets a lot more complicated.

If you need an example of simple button behaviors, let me know, I have source that might suit your needs (but you will need to change various things; I don't have anything ready-made that will be totally suitable- i.e., as has been said already, learning Lua isn't optional).

The simplest way to implement this, if it's just for an AI developer to test with, is to do it as a custom Command. Then the UI is taken care of largely automatically, and you can have a testing Unit that has the custom commands built and use it during development of your project.
Post Reply

Return to “Lua Scripts”