Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [TGUI] Disabled image property  (Read 1874 times)

0 Members and 2 Guests are viewing this topic.

marcolo2307

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
[TGUI] Disabled image property
« on: July 02, 2017, 09:13:35 pm »
Hi!

Is there any way to make button changing its background after disabling? (I'm loading from theme)

I would be also grateful for a list of available properties in TGUI, now I'm taking it from the source code ;/

texus

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • TGUI
    • Email
Re: [TGUI] Disabled image property
« Reply #1 on: July 02, 2017, 11:07:30 pm »
Apparently that feature was only added in tgui 0.8-dev, according to the commit history it was one of the first big features added after I released 0.7.
If upgrading is not an option then a workaround could be to call button->getRenderer()->setNormalTexture(...) each time you disable or enable it (to swap which image is displayed).
Also, even though 0.8-dev has BackgroundColorDisabled and TextureDisabled properties, they are not being used yet by the default themes. So you will have to edit the theme file yourself (and provide your own image if you use TextureDisabled).

There is currently no list of properties outside the source code. Most properties are used in one of the 3 theme files shipped with TGUI, for the others you will have to keep checking the source code (either from the src folder or from the tests).
I intended to put a list on the website some time ago already, but I haven't had the time yet. It currently has low priority.
« Last Edit: July 02, 2017, 11:09:19 pm by texus »
TGUI: C++ SFML GUI

marcolo2307

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: [TGUI] Disabled image property
« Reply #2 on: July 03, 2017, 01:12:17 am »
Thanks!