Patch: Small map industry selector v6 [update]
Moderator: OpenTTD Developers
Patch: Small map industry selector v6 [update]
I added a button to small map, to select if you want to show hidden industries in red color (as they are shown in all other small map types) or do not show them at all, as it is done now in trunk.
I also changed buttons texts from "Enable all/Disable all" to "Show all/Hide all" and add tooltips texts.
v6.2 (r12072)
- replace black boxes with arrows (->)
v6.1 (r11932)
- remove outlines and replace them with marker on the left side on industry color label if industry accept cargo and with marker on the right side in industry produce cargo accepted by selected industry. Second screenshot.
v6 (r11915)
- if one industry is selected , then is in list shown which industries accept cargo produced by selected industry (blue outline) and which industries produce cargo accepted by selected industry (red outline).
v5 (r11874)
- added button Show hidden, to select how are shown hidden industries
- changed button texts
- added tooltips texts
------ already in trunk [r11474] --------------------
While useing newindustries I have problem with finding the right industry.
I write this patch, with which you can select which industry you want displayed on the small map.
If you click on industry label in small map window, you can select which industries are shown on small map.
Thera are also buttons for show all (Enable all) and hide all (Disable all) industries.
v4.2.3 (r11430)
- code clean up to developers suggestions
v4.2.2 (r11391)
- code clean up
v4.2.1 (r11388)
- update to trunk version 11388
v4.2 (r11353)
- fix: removed limit for only 32 different industry types
- reset to show all at game load or new game start
v4.1 (r11342)
- fix: if you click below industries list, you get selected industry in next column
- add industry counters
- make screen updateing faster when you click on industry
v4 (r11336)
- changed color of disabled industry text and box
- feature complete
v3.1 (r11314)
- changed only the way of showing enabled/disabled industries, now it is changeing color of the box in the front of industry label and not the color of the text
v3 (r11293)
- now you can click directly on key (label) of industry in small map window
- remove new window for list
- smallmap window is resized to show all industries
v2 (r11247)
- change color of new window
- add butons, enable all - disable all
- pressed one industries are shown
I hope that diff file is ok.
Let me know what you think.
p.s.: this is my first try to OpenTTD code
I also changed buttons texts from "Enable all/Disable all" to "Show all/Hide all" and add tooltips texts.
v6.2 (r12072)
- replace black boxes with arrows (->)
v6.1 (r11932)
- remove outlines and replace them with marker on the left side on industry color label if industry accept cargo and with marker on the right side in industry produce cargo accepted by selected industry. Second screenshot.
v6 (r11915)
- if one industry is selected , then is in list shown which industries accept cargo produced by selected industry (blue outline) and which industries produce cargo accepted by selected industry (red outline).
v5 (r11874)
- added button Show hidden, to select how are shown hidden industries
- changed button texts
- added tooltips texts
------ already in trunk [r11474] --------------------
While useing newindustries I have problem with finding the right industry.
I write this patch, with which you can select which industry you want displayed on the small map.
If you click on industry label in small map window, you can select which industries are shown on small map.
Thera are also buttons for show all (Enable all) and hide all (Disable all) industries.
v4.2.3 (r11430)
- code clean up to developers suggestions
v4.2.2 (r11391)
- code clean up
v4.2.1 (r11388)
- update to trunk version 11388
v4.2 (r11353)
- fix: removed limit for only 32 different industry types
- reset to show all at game load or new game start
v4.1 (r11342)
- fix: if you click below industries list, you get selected industry in next column
- add industry counters
- make screen updateing faster when you click on industry
v4 (r11336)
- changed color of disabled industry text and box
- feature complete
v3.1 (r11314)
- changed only the way of showing enabled/disabled industries, now it is changeing color of the box in the front of industry label and not the color of the text
v3 (r11293)
- now you can click directly on key (label) of industry in small map window
- remove new window for list
- smallmap window is resized to show all industries
v2 (r11247)
- change color of new window
- add butons, enable all - disable all
- pressed one industries are shown
I hope that diff file is ok.
Let me know what you think.
p.s.: this is my first try to OpenTTD code
- Attachments
-
- Unnamed, 1st Jan 2000.png (86.1 KiB) Viewed 4685 times
-
- Unnamed, 1st Jan 2000.png (33.04 KiB) Viewed 4422 times
-
- smallmap_industry_selector_r12072.diff
- (8.03 KiB) Downloaded 158 times
Last edited by gule on 06 Feb 2008 20:13, edited 17 times in total.
Re: Patch: Small map industry selector
looks nice, clean and tidy,
but might i give a couple of suggestions:
a all/none button at the bottom?
but might i give a couple of suggestions:
a all/none button at the bottom?
Re: Patch: Small map industry selector
very nice patch, Im experiencing just what you described.
and another suggestion from me
- I think the depressed buttons should be the enabled ones, not the other way round. also I second the idea of all/none buttons beneath the list!
and another suggestion from me

- athanasios
- Tycoon
- Posts: 3138
- Joined: 23 Jun 2005 00:09
- Contact:
Re: Patch: Small map industry selector
Nice idea. But I think that these buttons should appear on the map window and not on a separate one. With big maps we tend to use larger areas of the screen and so an extra window is annoying. What I suggest is change current list of industries to buttons. This will also look better as it follows the style of the already existing 8 buttons on the bottom-right. Only you have to wait till a developer fixes newindustries issue.
http://members.fortunecity.com/gamesart
"If no one is a fool I am also a fool." -The TTD maniac.
I prefer to be contacted through PMs. Thanks.
"If no one is a fool I am also a fool." -The TTD maniac.
I prefer to be contacted through PMs. Thanks.
Re: Patch: Small map industry selector
Thank you. Good suggestion. I add this buttons.7of9 wrote:but might i give a couple of suggestions:
a all/none button at the bottom?
I am planing to make this buttons in the map window. This is only testing if can be made.athanasios wrote:Nice idea. But I think that these buttons should appear on the map window and not on a separate one. With big maps we tend to use larger areas of the screen and so an extra window is annoying. What I suggest is change current list of industries to buttons. This will also look better as it follows the style of the already existing 8 buttons on the bottom-right. Only you have to wait till a developer fixes newindustries issue.
As you suggest I will wait on newindustries fix and then move the buttons.
Re: Patch: Small map industry selector
Nice patch, I've been waiting for something like this for a long time.
Just one request though, could you make patches from the main directory, and not the src directory? It is A LOT easier to apply patches that way.
Just one request though, could you make patches from the main directory, and not the src directory? It is A LOT easier to apply patches that way.
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)

OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone

OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone







Re: Patch: Small map industry selector
Do you mean with main directory, trunk directory?XeryusTC wrote:Just one request though, could you make patches from the main directory, and not the src directory? It is A LOT easier to apply patches that way.
-
- Transport Coordinator
- Posts: 366
- Joined: 24 Sep 2007 14:07
Re: Patch: Small map industry selector
This is a very handy patch, indeed... after getting enough money to build industries, of course. It's obviously more useful in Create Scenario mode.
I note that in your screenshot, there were exactly 22 Power Stations. That'd make for some good revenue... if there were any coal mines present.
I note that in your screenshot, there were exactly 22 Power Stations. That'd make for some good revenue... if there were any coal mines present.
- belugas
- OpenTTD Developer
- Posts: 1507
- Joined: 05 Apr 2005 01:48
- Location: Deep down the deepest blue
- Contact:
Re: Patch: Small map industry selector
I like the concept and the realization too. Well done
Some points:
1) on my todo list, i have to make it so that the smallmap list of industries will be scrollable, since with newindustries, there are some overwrite glitches i want to remove.
2) this lead to the fact that (as mentionned by athanasios) it would be better and more intuitive that the list will actually be the toggable buttons. Having a scrollable list will facilitate the change
3) code wise, from a brief glance, i can see you're using a mixture of tabs and spaces to align your code. We prefer to use tabs to align code and spaces to align data.
Some points:
1) on my todo list, i have to make it so that the smallmap list of industries will be scrollable, since with newindustries, there are some overwrite glitches i want to remove.
2) this lead to the fact that (as mentionned by athanasios) it would be better and more intuitive that the list will actually be the toggable buttons. Having a scrollable list will facilitate the change
3) code wise, from a brief glance, i can see you're using a mixture of tabs and spaces to align your code. We prefer to use tabs to align code and spaces to align data.
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
-
- Engineer
- Posts: 63
- Joined: 26 Aug 2005 15:12
Re: Patch: Small map industry selector
Nice patch! I always watned something like this, even though I did not even realise it!
Snuk the Great
Re: Patch: Small map industry selector
1) I fix this problem, to arrange industry list in three columns, then i count number of industries in one column and then resize the window and panel with industries. It is not the best solution but it works.belugas wrote:1) on my todo list, i have to make it so that the smallmap list of industries will be scrollable, since with newindustries, there are some overwrite glitches i want to remove.
2) this lead to the fact that (as mentionned by athanasios) it would be better and more intuitive that the list will actually be the toggable buttons. Having a scrollable list will facilitate the change
3) code wise, from a brief glance, i can see you're using a mixture of tabs and spaces to align your code. We prefer to use tabs to align code and spaces to align data.
2) Right now I'm reworking code to enable clicking directly on list. I didn't create toggable buttons, but I check mouse position and enable/disable industry.
3) I noticed this and I changed my code editor setting.
I have one question, how can i create buttons, which are show only when is selected industry type smallmap? I need this for enable all/disable all buttons.
Re: Patch: Small map industry selector
I love this, i Was thinking about this last night after painfully trying to find industries with ECS. Perhaps put the industry buttons in the key itself rather then a new window.
Re: Patch: Small map industry selector
Right now I am working on this. I will also try to implement more dynamic industries list (key).ThunderAI wrote:I love this, i Was thinking about this last night after painfully trying to find industries with ECS. Perhaps put the industry buttons in the key itself rather then a new window.
Re: Patch: Small map industry selector
I made new version (see first post).
Now you can click direct on industry label in small map window to enabel / disable industry type.
Please test it.
Now you can click direct on industry label in small map window to enabel / disable industry type.
Please test it.
Re: Patch: Small map industry selector
Yes, I meant the trunk directory.gule wrote:Do you mean with main directory, trunk directory?XeryusTC wrote:Just one request though, could you make patches from the main directory, and not the src directory? It is A LOT easier to apply patches that way.
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)

OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone

OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone







- belugas
- OpenTTD Developer
- Posts: 1507
- Joined: 05 Apr 2005 01:48
- Location: Deep down the deepest blue
- Contact:
Re: Patch: Small map industry selector
It looks reaaly nice, judging only form screenshot, gule 
When time allows it, i'll look at the sources.

When time allows it, i'll look at the sources.
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
Re: Patch: Small map industry selector
I am looking forward for your opinion.belugas wrote:When time allows it, i'll look at the sources.
I made new version which change only the way of showing enabled/diasbled industry. Second screen shot in first post.
Diff file is attached.
- Attachments
-
- smallmap_industry_selector_r11314.diff
- (9.58 KiB) Downloaded 171 times
- athanasios
- Tycoon
- Posts: 3138
- Joined: 23 Jun 2005 00:09
- Contact:
Re: Patch: Small map industry selector
I believe the unselected industry types should be a different color. If grey, little darker than 1st screenshot, so they are easily readable. Or use the same reddish color instead of grey. If both are black it can be confusing which is selected and which not. Since grey doesn't fit so much with background color, I suggest the darkest background brown.
My proposal:
Left: All selected (original)
Middle: Some selected, 8bpp (dots).
Right: Some selected, 32bpp (painted industry color with 67% opacity background color).
My proposal:
Left: All selected (original)
Middle: Some selected, 8bpp (dots).
Right: Some selected, 32bpp (painted industry color with 67% opacity background color).
- Attachments
-
- suggestions.png (1.3 KiB) Viewed 6622 times
-
- sug_magnified.png (1.32 KiB) Viewed 6620 times
http://members.fortunecity.com/gamesart
"If no one is a fool I am also a fool." -The TTD maniac.
I prefer to be contacted through PMs. Thanks.
"If no one is a fool I am also a fool." -The TTD maniac.
I prefer to be contacted through PMs. Thanks.
Re: Patch: Small map industry selector
Good ideas.athanasios wrote:I believe the unselected industry types should be a different color. If grey, little darker than 1st screenshot, so they are easily readable. Or use the same reddish color instead of grey. If both are black it can be confusing which is selected and which not. Since grey doesn't fit so much with background color, I suggest the darkest background brown.
My proposal:
Left: All selected (original)
Middle: Some selected, 8bpp (dots).
Right: Some selected, 32bpp (painted industry color with 67% opacity background color).
But I need help with string colors. How can I change string color to custom color and also how can I applay mask to the industry type color to make it lighter as in your middle column?
And also I am completly noob at 32bpp blitter. How can I change opacity of background color?
Where can i find the right color code for colors? In wiki are only the base ones.
- belugas
- OpenTTD Developer
- Posts: 1507
- Joined: 05 Apr 2005 01:48
- Location: Deep down the deepest blue
- Contact:
Re: Patch: Small map industry selector
To be honest, i don't think using 82bpp /transparency or other kind of technics have their place in here.. Too much work for that little advantage.
The grey colour used for the string is perfect, imho. The colour of the industry type does not have to be changed nor touched. ONly the black border that should be changed. That would make the difference, i think.
And it would be far easier to work out
As for the rest, bravo
The grey colour used for the string is perfect, imho. The colour of the industry type does not have to be changed nor touched. ONly the black border that should be changed. That would make the difference, i think.
And it would be far easier to work out

As for the rest, bravo
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
Who is online
Users browsing this forum: No registered users and 6 guests