The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: An_dz on June 02, 2014, 12:04:03 AM

Title: Skinable Toolbar Background
Post by: An_dz on June 02, 2014, 12:04:03 AM
pak192.comic has textured buttons, and I'm doing the same with pak96.comic, but the toolbar background is fixed to the default grey. pak192.comic tries to fake this lack of texturing by using multiple fake buttons, but that's not a beautiful solution and your screen might be larger than the amount they included.

This patch allow the pakset to skin this background by adding a new symbol object, ToolsBackground. If not included we fallback to the old grey background.
Title: Re: Skinable Toolbar Background
Post by: Leartin on June 03, 2014, 01:59:47 AM
Would it be possible to implement a similar "toolbar background" for all the submenus, so each submenu could have it's own 'background' which is painted behind transparent parts of the buttons?
What I have in mind there is replacing the colored bars in each button with transparency, then have one colorbar-tile as the background. While this would disable the current solution for the right end of the toolbar, It would solve two problems:
1) Clicking the button would not change the darkness of the bar (at least I hope that would be an effect)
2) Buttons could appear in multiple menus with different colors, especially interesting for extension buildings.

As for other uses, I'd like it especially for themes with restricted lines, as those end up having a longer title bar then there are buttons. And if it is supported like that, maybe other pakset would find a use for it. I know I would have if it was around at the time the pak192.comic-GUI was redesigned.
Title: Re: Skinable Toolbar Background
Post by: prissi on June 04, 2014, 09:52:23 PM
Added in r7244. However, you could as well have a cofigurable color.
Title: Re: Skinable Toolbar Background
Post by: An_dz on June 05, 2014, 04:40:05 PM
I thought about it, but who will define it? The theme is not a good idea.

I liked Leartin's idea, it can be extended to all menus and I have something in mind on how to do this.
Title: Re: Skinable Toolbar Background
Post by: An_dz on June 06, 2014, 06:09:25 PM
Brought this patch back to main board to bring an update. Added check for main toolbar and extended for all toolbars.

Rule is simple, the image number in the ToolsBackground symbols is the same of toolbar, so: image[n] is for toolbar[n].

If you want to specify a separator without background (e.g. pak192.comic rightmost icon), define it as -b,icon
Title: Re: Skinable Toolbar Background
Post by: prissi on September 16, 2014, 09:36:51 PM
Incorporated in r7329 Sorry it took so long.