playMaker

Author Topic: Change GUI TEXT color?  (Read 6295 times)

KozTheBoss

  • Full Member
  • ***
  • Posts: 150
  • You dont fail unless you give up trying to succeed
    • Pixel Life - portfolio
Change GUI TEXT color?
« on: January 10, 2013, 05:56:25 PM »
HAI GUISE!

still drilling away at the attempt of my top-down shooter - I've come to the point of almost polishing and getting the last vital bits and bobs in before i tag it as an alpha and put it on my portfolio for further development

So I have a shop where you can buy weapons and upgrades - however when a player tries to buy something and dont have enough money, there is currently no feedback to tell them that..

What im creating is text on the screen that will pop in & out saying "You can't afford that!" in red

I've come so far, but for the love of god I can't figure out how to change the texts color to red =(

I've tried assigning a red material to it, but as you probably know that just fucks up the font completely

I also need to figure out how to make the text fade out slowly (like transparancy) but none of the GUI actions seem to work on my GUI TEXT - nothing! =(

Any help is appriciated :)

Koztheboss
« Last Edit: January 10, 2013, 06:11:16 PM by KozTheBoss »
Remember, you don't fail unless you give up trying to succeed!

Vallar

  • Junior Playmaker
  • **
  • Posts: 90
Re: Change GUI TEXT color?
« Reply #1 on: January 11, 2013, 05:53:07 PM »
I am still new here, however, have you tried to use the Set GUI Texture Color action? You can specify the GUI Text object you want to change and set its color to Red from there right away.

As for fading you can do try the Set GUI Texture Alpha and make it to fade in/out as you want using the Every Frame option.

If this isn't what you are after or not good enough/working out, I do apologize I am just new to this.

Alio

  • Playmaker Newbie
  • *
  • Posts: 19
Re: Change GUI TEXT color?
« Reply #2 on: January 14, 2013, 04:33:18 PM »
I've noticed some dynamic fonts wont allow for you to change color/size/style ie bold/italic etc.

If you have that situation you might find a work around where you import it into photoshop or another program and manually change the color from white whatever, to  the color that you want. and reimport that second set into your assets and then have it create that GUI text instead.

What vallar posted bout the alpha textures should work but you might have to change your setting on the png/img when you import to have more advanced options.. I'm not great with that aspect of unity so I can't give you a definate answer. I'm trying to find a solution for fading text as well.  let me know if that works and ill try it.
I just frankenstein it.

doppelmonster

  • Full Member
  • ***
  • Posts: 157
    • Grinder Games
Re: Change GUI TEXT color?
« Reply #3 on: April 30, 2013, 10:13:29 AM »
If you havent solved it yet, this might bring you on the right track: