The International Simutrans Forum

 

Author Topic: Skinable Toolbar Background  (Read 2220 times)

0 Members and 1 Guest are viewing this topic.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2920
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Skinable Toolbar Background
« 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.
« Last Edit: June 02, 2014, 12:15:37 AM by An_dz »

Offline Leartin

  • Oh no, not him again!
  • Devotee
  • *
  • Posts: 1590
  • PAK-DEV P192C
  • Languages: DE, EN
Re: Skinable Toolbar Background
« Reply #1 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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10820
  • Languages: De,EN,JP
Re: Skinable Toolbar Background
« Reply #2 on: June 04, 2014, 09:52:23 PM »
Added in r7244. However, you could as well have a cofigurable color.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2920
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: Skinable Toolbar Background
« Reply #3 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.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2920
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: Skinable Toolbar Background
« Reply #4 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

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10820
  • Languages: De,EN,JP
Re: Skinable Toolbar Background
« Reply #5 on: September 16, 2014, 09:36:51 PM »
Incorporated in r7329 Sorry it took so long.