playMaker

Author Topic: Set GUI Color / Content Color.. not working... (for me) [SOLVED]  (Read 4594 times)

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Using the typing example in PlayMaker Samples, I need to add my game GUI style. Not special, just a thin helvetica font. I changed set GUI skin to mine, and the font changed worked...

Now I need it white not black.

I added set gui content color to the first init state, and its stopped the state, didnt transition to the next state, with the good stuff in it.

I tried addidn it there instead, just before the gui label state. and although it didnt stop the fsm anymore, it didnt work...

Whats the correct usage here?

Mark
« Last Edit: April 09, 2013, 12:37:36 PM by Alex Chouls »

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Re: Set GUI Color / Content Color.. not working... (for me)
« Reply #1 on: April 05, 2013, 06:36:00 AM »
bump?

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4003
  • Official Playmaker Support
    • LinkedIn
Re: Set GUI Color / Content Color.. not working... (for me)
« Reply #2 on: April 06, 2013, 05:48:29 PM »
GUI Actions are designed to run every frame in OnGUI, so they don't finish. As long as an action is active (highlighted green), the automatic FINISHED event won't be sent. That's why you see the FSM "stuck" in the Init state.

But in this case, Set GUI Content Color should go in the same state as the GUI Label anyway. It needs to be set every OnGUI before the GUI actions that you want to tint.

The reason it's not changing color is probably because Style is blank, and it's using a default text style with black text, that can't be tinted by Set GUI Content Color.

If you set the Style to a style in your custom skin (e.g., Label) it should work. Make sure the text color for the Label style is white if you want to tint it different colors.

Or you could just set the text color in the style and not use Set GUI Content Color at all :)

EDIT: The GUI Label action should probably default to use the Label style so there are less steps to figure out. I'll make that change...
« Last Edit: April 06, 2013, 05:54:55 PM by Alex Chouls »

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
[SOLVED]Re: Set GUI Color / Content Color.. not working... (for me)
« Reply #3 on: April 09, 2013, 03:54:33 AM »
Got this to work, As you said it was because I hadn't specified a Style, I typed Label, and it worked..
Thanks for your help!