Window engine
Window engine
I have som tips for the window engine. I have written a window engine for my own game, so I have some experience.
I don't know the strcture of your window engine but my suggest is:
* Use a script engie (for exampel lua) for initiation of the windows and actions.
* Have predefined actions wich you can asign a button. (for exampel: Select tool 12)
With litle work you can then make a mod wich replace all windows if you use a script engine. (or a simple input-file where all windowses are declarated.)
I don't know the strcture of your window engine but my suggest is:
* Use a script engie (for exampel lua) for initiation of the windows and actions.
* Have predefined actions wich you can asign a button. (for exampel: Select tool 12)
With litle work you can then make a mod wich replace all windows if you use a script engine. (or a simple input-file where all windowses are declarated.)
Last edited by Zuu on 20 Jan 2004 12:56, edited 1 time in total.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
We will use our own 'language' (it's not scripting, more like configuration) for loading in everything about the gui.
In the end it will all come down to creating a new instance of a window class given a identifier for which window it should be.
In the end it will all come down to creating a new instance of a window class given a identifier for which window it should be.
"Peace cannot be kept by force. It can only be achieved by understanding." - Albert Einstein
I've updated my orginaly post now.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: Window engine
That also was already in our plans, we image the configuration a bit like this:zuu wrote:* Have predefined actions wich you can asign a button. (for exampel: Select tool 12)
Code: Select all
Window JukeBox
{
Title = "Jazz Jukebox";
Items
{
// x, y, w, h, ..., Action
Button(10, 10, 25, 25, ..., JUKEBOX_PLAY);
...
}
}
"Peace cannot be kept by force. It can only be achieved by understanding." - Albert Einstein
Looks good. Reson why I started this was that many people don't know how much work that is behind a good window system.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Who is online
Users browsing this forum: No registered users and 3 guests