Those two things are completely unrelated. The widgets themselves are not changed by making them nested - that just affects their layout on the screen / within the window and allowing to adjust easier for font sizes etc pp. The thing you propose could most probably be implemented, though... with or (not anymore in OpenTTD) without nested widgets.Expresso wrote:One more question: do the nested widgets also support widgets which have optional animations? This could be useful for widgets which show an animation when the mouse-pointer hovers over them.
Nesting Windows
Moderator: OpenTTD Developers
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Nesting Windows
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: Nesting Windows
I completely agree with planetmaker.
The whole purpose of the exercise 'switching to nested widgets' is to reduce the maintenance effort (it does more calculations by itself, and thus less demanded from the programmer), make them more flexible in changing size due to differences in wording (different languages use phrases with different length to describe something), differences in font or font size, etc.
In the end however, a widget occupies some screen space, and is rendered by the video system when needed. Who or why a refresh is queried is not controlled by the widgets but by the window class.
The current implementation does not have animated widgets (although technically, lowering and raising buttons is a form of animation). However, there is no fundamental reason why this would not be possible, technically at least.
Game-wise however, I don't see the point. What good does an animated widget do? (does it enhance game play?)
Also, it doesn't really fit in a 25+ year old game, it seems to me.
Last but not least, we need all the processor power we get for making more trains run in the game, so why would we want to waste CPU power on such an animation?
The whole purpose of the exercise 'switching to nested widgets' is to reduce the maintenance effort (it does more calculations by itself, and thus less demanded from the programmer), make them more flexible in changing size due to differences in wording (different languages use phrases with different length to describe something), differences in font or font size, etc.
In the end however, a widget occupies some screen space, and is rendered by the video system when needed. Who or why a refresh is queried is not controlled by the widgets but by the window class.
The current implementation does not have animated widgets (although technically, lowering and raising buttons is a form of animation). However, there is no fundamental reason why this would not be possible, technically at least.
Game-wise however, I don't see the point. What good does an animated widget do? (does it enhance game play?)
Also, it doesn't really fit in a 25+ year old game, it seems to me.
Last but not least, we need all the processor power we get for making more trains run in the game, so why would we want to waste CPU power on such an animation?
Re: Nesting Windows
Random query: Does anyone of the devs actually speak a RTL language?
Just curious
Just curious

Re: Nesting Windows
depending on your definition of "speak" probably somewhere between "no" and "unlikely"
Re: Nesting Windows
Because it makes the interface feel more slick. I have a processor I run at 4gHz, it only slows down in the very biggest games - as in several thousand vehicles. Considering I play in a realistic style on smaller maps (usually with less than 500 vehicles, which barely taxes my netbook or laptop, never mind my PC) speed is a non-issue so why not make it look prettier?Alberth wrote:Last but not least, we need all the processor power we get for making more trains run in the game, so why would we want to waste CPU power on such an animation?
I'm all for any eye-candy improvements, although if they can be disabled that's a plus. If it does start to slow your PC down, though, then turning off full animation will give you another few hundred vehicles before it slows down.
Jon
Re: Nesting Windows
A first step would be to replace all buttons with static graphics, most likely in two versions, one inactive, and one active.
The second step would be to come up with animations for all active graphics.
The second step would be to come up with animations for all active graphics.
- Firestryke31
- Engineer
- Posts: 17
- Joined: 22 Aug 2009 02:53
- Location: Throw a dart at central Texas
- Contact:
Re: Nesting Windows
There are already some buttons that do that, the first that come to mind are the signal buttons (the light turns green when the signal is selected).
"Why were you late?"
"There was a train."
-- Conversation between 2 New Braunfelians
"There was a train."
-- Conversation between 2 New Braunfelians
Re: Nesting Windows
Is that my vivid imagination or did TT original have animated cursors?
Re: Nesting Windows
I think there were a few. The Zzzzz one, and the lights on the signal placement cursor I'm sure used to animate.
Re: Nesting Windows
Quite a few, at least in TTD. Not so sure about TTO.Eddi wrote:Is that my vivid imagination or did TT original have animated cursors?
Also both landscaping cursors and dynamite. Probably others I've forgotten.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Who is online
Users browsing this forum: Google [Bot] and 2 guests