[Patch] Transparency Lock (in trunk r12102)
Moderator: OpenTTD Developers
[Patch] Transparency Lock (in trunk r12102)
From the discussion in this topic I got the idea to make this patch.
It creates the possibility to CTRL-click a transparency option to "lock" it, meaning pressing the invisible toggle key 'x' won't toggle this option anymore. The locks are saved like the transparency itself to the openttd config. Meaning if you load a game, start a new game or anything, your last used settings will be used again.
I also changed the strings a bit so it indicates that you can lock them with CTRL.
This patch is rather small, and I hope it can be included to trunk soon.
Screenshot: Download: Credits: thanks to wolf01 for letting me have a look at your code regarding transparency
It creates the possibility to CTRL-click a transparency option to "lock" it, meaning pressing the invisible toggle key 'x' won't toggle this option anymore. The locks are saved like the transparency itself to the openttd config. Meaning if you load a game, start a new game or anything, your last used settings will be used again.
I also changed the strings a bit so it indicates that you can lock them with CTRL.
This patch is rather small, and I hope it can be included to trunk soon.
Screenshot: Download: Credits: thanks to wolf01 for letting me have a look at your code regarding transparency
Last edited by Roujin on 10 Feb 2008 15:30, edited 1 time in total.
Re: [Patch] Transparency Lock (r12099)
Nice!
not sure if this idea belongs here, but still: would be nice if you included a save of the position of the transparency toolbar... So I dont have to relocate it to the correct position every time I open it
not sure if this idea belongs here, but still: would be nice if you included a save of the position of the transparency toolbar... So I dont have to relocate it to the correct position every time I open it
..: Trond :.. because you deserve it!
The whole problem with the world is that fools and fanatics are always so certain of themselves,
and wiser people so full of doubts.
Bertrand Russell
MyGRFs: Norwegian Funny Town Names 4 | LOTR & WoW Town Names 2 | Islandic Town Names 1 | Random Norwegian Town Names
Favorites: GRFCrawler | ISR | WIKI | Now Playing: OpenTTD 1.3.2 w/YAPP 3.0-RC3.9ish
The whole problem with the world is that fools and fanatics are always so certain of themselves,
and wiser people so full of doubts.
Bertrand Russell
MyGRFs: Norwegian Funny Town Names 4 | LOTR & WoW Town Names 2 | Islandic Town Names 1 | Random Norwegian Town Names
Favorites: GRFCrawler | ISR | WIKI | Now Playing: OpenTTD 1.3.2 w/YAPP 3.0-RC3.9ish
Re: [Patch] Transparency Lock (r12099)
The patch is now included in trunk. Thanks Maedhros!Revision: 12102
Author: maedhros
Date: 15:49:44, Sonntag, 10. Februar 2008
Message:
-Feature: Allow locking individual transparency settings so they will not be changed by pressing 'x'. (Roujin)
[...]
Re: [Patch] Transparency Lock (in trunk r12102)
I think thats the fastest I've ever seen a patch make trunk
Re: [Patch] Transparency Lock (in trunk r12102)
wouh that was fast ! congratz and ofc thanks for that new feature.
Re: [Patch] Transparency Lock (in trunk r12102)
I think it's got a lot to do with patch size ^^ chance to be included in trunk must be decreased exponentially with patch size or something
This one is really compact because I even found a lock sprite to reuse originally wanted to include a newly drawn sprite, but then I found the lock sprite already used
(I wish my bigger patches would get as much attention as the small ones )
This one is really compact because I even found a lock sprite to reuse originally wanted to include a newly drawn sprite, but then I found the lock sprite already used
(I wish my bigger patches would get as much attention as the small ones )
Re: [Patch] Transparency Lock (in trunk r12102)
It's got a fair amount to do with patch size - it's small and easy to read - and it also fixes something that's been annoying me for a while, all of which help.
Large patches are much more difficult to read and understand completely, and I'm afraid unless it's something that really interests me (and usually not even then) I just don't have enough time to read them.
Large patches are much more difficult to read and understand completely, and I'm afraid unless it's something that really interests me (and usually not even then) I just don't have enough time to read them.
No-one's more important than the earthworm.
Re: [Patch] Transparency Lock (in trunk r12102)
I've had a problem with this...seems to forget the settings on a reload.
I have vehicle loading locked on, but on a reload the settings are locked off. Seems that the savegame doesn't remember the current settings for locks...nightly 12208 win9x was the last one I used.
I find it strange that this hasn't already been mentioned, so is it something I'm doing wrong? I generally know what I'm doing and haven't spotted any relevant patch setting to cope with this...
I have vehicle loading locked on, but on a reload the settings are locked off. Seems that the savegame doesn't remember the current settings for locks...nightly 12208 win9x was the last one I used.
I find it strange that this hasn't already been mentioned, so is it something I'm doing wrong? I generally know what I'm doing and haven't spotted any relevant patch setting to cope with this...
Re: [Patch] Transparency Lock (in trunk r12102)
It's not saved in savegames, but within the config file. So it's global for all of your games.
If you load something or start a new game, the setting doesn't change. It remains the same what you've set up last.
Even if you exit the game (to your OS) and start it again, transparency and transparency lock settings should be what you last used.
The numbers in the config file (transparency = [x] and transparency_locks = [y]) are a bitmask over the transparency options. e.g. i have transparency_locks = 385, convert that to binary -> 110000001, that means (reading from right to left) I have options 1, 8 and 9 locked (signs, catenary and loading indicators).
The same with transparency; there, '1' means transparent.
If you load something or start a new game, the setting doesn't change. It remains the same what you've set up last.
Even if you exit the game (to your OS) and start it again, transparency and transparency lock settings should be what you last used.
The numbers in the config file (transparency = [x] and transparency_locks = [y]) are a bitmask over the transparency options. e.g. i have transparency_locks = 385, convert that to binary -> 110000001, that means (reading from right to left) I have options 1, 8 and 9 locked (signs, catenary and loading indicators).
The same with transparency; there, '1' means transparent.
Re: [Patch] Transparency Lock (in trunk r12102)
Thanks for that...I'll check my settings. Somehow I thought the settings were in the savegame, no idea why!
Re: [Patch] Transparency Lock (in trunk r12102)
Ok, I understand what the settings are, but it doesn't work as I would expect it to...
The config file has the correct setting of 256 for tranparency_locks, meaning that the vehicle loading indicator is locked on. But, if I exit the game with transparency on, and then reload the game, I get vehicle loading indicators locked, but locked as transparent (not in display mode!)...see picture...
I would have expected the settings to remember that I want that option on display regardless of whether I exit the game with general transparency on of off...but it seems that the settings only remember to lock that option without remembering whether it's on or off.
Is this right?
The config file has the correct setting of 256 for tranparency_locks, meaning that the vehicle loading indicator is locked on. But, if I exit the game with transparency on, and then reload the game, I get vehicle loading indicators locked, but locked as transparent (not in display mode!)...see picture...
I would have expected the settings to remember that I want that option on display regardless of whether I exit the game with general transparency on of off...but it seems that the settings only remember to lock that option without remembering whether it's on or off.
Is this right?
Re: [Patch] Transparency Lock (in trunk r12102)
I have that problem as well (but I'm using custom r12180, so I didn't post anything). I have loading indicators locked 'on' (so they always display, and don't toggle). If the game is saved in transparency mode, it gets switched on reload, so they never display, and don't toggle. If saved in normal mode, the setting works as expected.
Re: [Patch] Transparency Lock (in trunk r12102)
sc79
Thanks for that, at least it's not just me!
Thanks for that, at least it's not just me!
Re: [Patch] Transparency Lock (in trunk r12102)
hmm thanks for the bug report, i'll look into it.
edit: bug confirmed. Happens only on exit game (to OS). Working on it...
edit: bug confirmed. Happens only on exit game (to OS). Working on it...
Re: [Patch] Transparency Lock (in trunk r12102)
I've made a patch to fix this bug. Made bugreport and added the patch to flyspray.
Since this is in trunk already, you could have made a bugreport on flyspray yourself instead of posting here in the first place
Since this is in trunk already, you could have made a bugreport on flyspray yourself instead of posting here in the first place
Re: [Patch] Transparency Lock (in trunk r12102)
Roujin,
Apologies, but I wasn't sure if it was a bug or just me incorrectly understanding the new feature...something I've been guilty of in the past.
Apologies, but I wasn't sure if it was a bug or just me incorrectly understanding the new feature...something I've been guilty of in the past.
Re: [Patch] Transparency Lock (in trunk r12102)
No problem, 3iff No one will kill you for misunderstanding something.. (maybe DaleStan, he'll kill you with words )
So, again, thanks for reporting this, I had stubled over some irregularity regarding transparency before but was never able to get what exactly it was.
So, again, thanks for reporting this, I had stubled over some irregularity regarding transparency before but was never able to get what exactly it was.
Who is online
Users browsing this forum: No registered users and 9 guests