Board index FlightGear Development

PUI colored text in buttons

FlightGear is opensource, so you can be the developer. In the need for help on anything? We are here to help you.
Forum rules
Core development is discussed on the official FlightGear-Devel development mailing list.

Bugs can be reported in the bug tracker.

PUI colored text in buttons

Postby onox » Thu Jan 22, 2015 8:28 pm

I'm trying to get colored text in PUI (XML) in buttons. If I add <color> to a <button> it changes the background color, which is not what I want. Someone know how to get colored text in a button?
onox
Retired
 
Posts: 431
Joined: Fri Jun 20, 2014 3:45 pm

Re: PUI colored text in buttons

Postby Hooray » Thu Jan 22, 2015 8:49 pm

See $FG_ROOT/Docs/README.gui which documents the whole thing, and refer to $FG_ROOT/gui/dialogs for examples.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: PUI colored text in buttons

Postby onox » Thu Jan 22, 2015 10:01 pm

I have already read README.gui but it does not (clearly) describe how to change the color of the text (legend) of a button. And I cannot find any examples in FG that have buttons with colored text :(

Of course I could replace the whole panel with a Canvas window but I do not have any SVG editing skills with Inkscape.
onox
Retired
 
Posts: 431
Joined: Fri Jun 20, 2014 3:45 pm

Re: PUI colored text in buttons

Postby Hooray » Fri Jan 23, 2015 3:05 am

onox wrote in Thu Jan 22, 2015 10:01 pm:I have already read README.gui but it does not (clearly) describe how to change the color of the text (legend) of a button. And I cannot find any examples in FG that have buttons with colored text :(


well, line 600+ seems to be describing exactly what you're looking for, no ?
(sorry, cannot run FG at the moment, and with the wiki being offline, I cannot really post anything useful beyond just pointers ...)



Of course I could replace the whole panel with a Canvas window but I do not have any SVG editing skills with Inkscape.

if you just need an existing widet, like a button, we already have those in $FG_ROOT/Nasal/canvas/gui/widgets

then again, I am also not sure if it's worth the hassle - it really depends on your use case I guess ?
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: PUI colored text in buttons

Postby onox » Fri Jan 23, 2015 7:42 am

Hooray wrote in Fri Jan 23, 2015 3:05 am:
onox wrote in Thu Jan 22, 2015 10:01 pm:I have already read README.gui but it does not (clearly) describe how to change the color of the text (legend) of a button. And I cannot find any examples in FG that have buttons with colored text :(


well, line 600+ seems to be describing exactly what you're looking for, no ?
(sorry, cannot run FG at the moment, and with the wiki being offline, I cannot really post anything useful beyond just pointers ...)


That only seems to describe how to change the color of the text of all buttons in the GUI.

Canvas doesn't have enough widgets I'm afraid.
onox
Retired
 
Posts: 431
Joined: Fri Jun 20, 2014 3:45 pm


Return to Development

Who is online

Users browsing this forum: No registered users and 15 guests