Transparency Options Gui: new features :)

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

About the loading indicator widget

Keep it
9
56%
Leave it, there is already a switch under patches which does the same thing
7
44%
 
Total votes: 16

User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Transparency Options Gui: new features :)

Post by Wolf01 »

new features

Invisible houses toggle with ctrl+click on the transparent trees widget http://wolf01.game-host.org/OTTD_relate ... 10002.diff <- don't try this at home, needs bugfixing for newhouses
Invisible trees toggle with ctrl+click on the transparent trees widget http://wolf01.game-host.org/OTTD_relate ... 10002.diff <- should work also if old
Transparency saving widget http://wolf01.game-host.org/OTTD_relate ... 11243.diff <- updated I NEED IT! :D

Synced some separate patches for the new features: invisible houses, save widget and toggle invisible trees/houses patches directly with CTRL+click on the widget

NEW! (is #FF4040, not RED, dalestan ;) )
Updated the Transparency Saving patch, now it saves to openttd.cfg, it doesn't break the savegame compatibility
to use it:
1) enable the saving using the widget, or CTRL+2
2) set the wanted transparencies
3) toggle them with X <- this trigger the backup routine which stores the transparencies to the variable
4) now with X you can toggle between full visible and saved transparencies
5) close the game, play or do what you want, remember that if you change the transparencies with the saving widget enabled, you must go back to point 3

now, you load a game, or you do a new game:
1) enable the saving using the widget, or CTRL+2
2) toggle the transparencies with X
3) play normally, if you want to change the saved transparencies please see the section above
Last edited by Wolf01 on 10 Oct 2007 21:02, edited 14 times in total.
czerty
Engineer
Engineer
Posts: 50
Joined: 22 Sep 2006 16:28

Post by czerty »

It will be posible to code to have transparent all except (yours) stations and depots ?
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Post by Wolf01 »

it is already coded ;)
l_Blue_l
Transport Coordinator
Transport Coordinator
Posts: 285
Joined: 29 Mar 2006 22:42
Contact:

Post by l_Blue_l »

As Bridges can now be build over Signals covering them up i think there now need to be a simple way of making bridges and other building for that fact Transparent.

One possible way it of doing this is to press T then selected the item you would like to be made Transparent and from this it selects the smallest Sub-group to be made Transparent.
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Post by Wolf01 »

have you tried the patch or only pressed the "post" button and started to typing?

press the button with the image of the station and you'll get all the bridges, stations and also catenary transparent (or select "transparent buildings" from the options dropdown menu of the main toolbar)
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Post by Wolf01 »

the patch is complete, i need only a little help in main_gui.cpp to figure out how to fix the shift problem when the second bit is set (due to the add_bit i think)

Code: Select all

			case 'X' | WKC_SHIFT: { //cycle transparency
				bool add_bit = false;
				byte temp_trans_opt = GB(_transparent_opt, 0, 7);

				if (!HASBIT(temp_trans_opt, 6)) add_bit = true;
				temp_trans_opt <<= 1;
				if (add_bit) temp_trans_opt |= 1;
				SB(_transparent_opt, 0, 7, temp_trans_opt);
 				MarkWholeScreenDirty();
 				break;
			}
l_Blue_l
Transport Coordinator
Transport Coordinator
Posts: 285
Joined: 29 Mar 2006 22:42
Contact:

Post by l_Blue_l »

No i haven't tried the patch but i do relies thats the way your patch would work. After reading what i have said before i relies that i didn't make myself clearly and that is totally my fault.


What i meant to say was that a instead of having to travel to the Gui or menu all the time you could press T then click on the item on the map you would like to be made Transparent. This could make for a more advanced Transparency system where the smallest sub-group of items is made Transparent, This could possible be even just a company x's bridges leaving everything els the way it was. I know this would mean more coding but it could be a nicely added feature with you Gui.

I am sorry for a confusion.
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Post by Wolf01 »

about the bit-shifting i decided to remove it
now the patch does:
000000
100000
110000
...
111111
011111
001111

i want to use hotkeys directly (alt+number key, i hope that these hotkeys aren't aready used)
and maybe shift-x to store the preferred transparency to toggle with on-off (for example 011001 -> 000000 -> 011001 instead of 0->1->0)

EDIT:
done the first idea but with ctrl (so all OS support it)
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Post by Wolf01 »

i've synced the patch with the about latest trunk revision
it doesn't need changes and applies well since 200 revisions ago
i didn't found any bug since r7100

so i added a poll :)
Grolsch
Transport Coordinator
Transport Coordinator
Posts: 283
Joined: 08 May 2004 07:48
Location: Alkmaar, The Netherlands

Post by Grolsch »

Woo I like it! Devs, pleeeeaaaaase add it to the trunk! :D
Beer equals power
User avatar
MagicBuzz
Tycoon
Tycoon
Posts: 1357
Joined: 15 Feb 2003 17:32
Location: Vergezac, France

Post by MagicBuzz »

Same for me. I like this patch :)
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Post by Wolf01 »

uploaded a new version of the patch (peter should be happy as i changed the behaviour of the X key to toggle all transparencies but not the transparent signs) :D
User avatar
Smoky555
Engineer
Engineer
Posts: 97
Joined: 06 Jan 2005 05:22
Location: Russia, Volgograd
Contact:

Post by Smoky555 »

Hi
When applying this patch to the last trunk, i have an error (while compiling) in this string in vehicle.cpp :

Code: Select all

 	AddSortableSpriteToDraw(image, pal, v->x_pos + v->x_offs, v->y_pos + v->y_offs,
v->sprite_width, v->sprite_height, v->z_height, v->z_pos, v->vehstatus & VS_SHADOW);
and in this string of industry_cmd.cpp file:

Code: Select all

			AddSortableSpriteToDraw(image, dits->building.pal,
 			ti->x + dits->subtile_x,
 			ti->y + dits->subtile_y,
 			dits->width  + 1,
 			dits->height + 1,
 			dits->dz,
			z,
			HASBIT(_transparent_opt, DO_TRANS_INDUSTRIES));
the error is the same: "Object not found". Compiling with MS VS2005.

What's wrong? Please, help ;)
Russian OpenTTD Community patchpack (2.0.0RC2) (in Russian) , (in English)
User avatar
Octopussy
Engineer
Engineer
Posts: 122
Joined: 01 May 2006 21:57

Post by Octopussy »

I think it can be useful.

What I always find in the game are the depots for road vehicles.

If we can find them more easily it will be nice.
User avatar
Smoky555
Engineer
Engineer
Posts: 97
Joined: 06 Jan 2005 05:22
Location: Russia, Volgograd
Contact:

Post by Smoky555 »

Octopussy wrote:I think it can be useful.

What I always find in the game are the depots for road vehicles.

If we can find them more easily it will be nice.
place the signs near ...
Russian OpenTTD Community patchpack (2.0.0RC2) (in Russian) , (in English)
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Post by Wolf01 »

the transparency patch is now applied to trunk, i'll thank a lot Belugas and Peter1138 and all other devs which made this possible
i updated also the first post with a little patch for who wants to fix the little issues while waiting for the fixed trunk

good game
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Smoky555 wrote:the error is the same: "Object not found". Compiling with MS VS2005.
Can you paste the whole error message, please?
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
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Post by Wolf01 »

synced some patches related to the transparency options, see first post
User avatar
Octopussy
Engineer
Engineer
Posts: 122
Joined: 01 May 2006 21:57

Post by Octopussy »

Is it also possible to disable catenary for Trams and Electrified Railway ?
User avatar
RainierWatcher
Traffic Manager
Traffic Manager
Posts: 244
Joined: 14 Jan 2007 15:10
Location: West Norfolk, England

Post by RainierWatcher »

Octopussy wrote:Is it also possible to disable catenary for Trams and Electrified Railway ?
Should come under the stations option of this I think.
Ways of Preventing Death:
* Don't breathe air. Seriously. Everyone born before 1870 breathed the substance at some point in their life and every one of them is dead today. A coincidence? I think not.
Taken from uncyclopedia
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 64 guests