Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / Using SetTextColor on a custom text font?

Author
Message
pseudohaiku
3
Years of Service
User Offline
Joined: 9th Mar 2016
Location:
Posted: 9th Mar 2016 13:06
Hopefully this is the right place to ask for this! I've implemented a custom text using SetTextFontImage and everything is working as expected, however it doesn't seem as though I can use SetTextColor to make it change from anything other than black..

Help please?
blink0k
AGK Developer
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 9th Mar 2016 22:54 Edited at: 9th Mar 2016 22:54
are you using a custom font? this is just a guess but if the original color is black you might not be able to change it. maybe try a white bitmap font
Yodaman Jer
User Banned
Posted: 10th Mar 2016 00:45
Are you using specific fonts for different text blocks, or can you use a default text font image instead? SetTextDefaultFontImage(id)

I've had good luck doing it that way, but that was changing white text to black, though I seem to recall it worked for other colors too. If I had any bitmap fonts lying around I would test it out!
Slowly compiling code, one byte at a time.
Follow meh blague for more zany thoughts and possibly offensive programming!
pseudohaiku
3
Years of Service
User Offline
Joined: 9th Mar 2016
Location:
Posted: 10th Mar 2016 02:16
I'm using a custom font, yes. It seems like And yeah I'm using SetTextDefaultFontImage but it appears that I'll have to create a few with different colours since it doesn't want to change the color.

Thanks though!
BatVink
Moderator
16
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 10th Mar 2016 08:56
It works on white. Pure white will become pure red )or whatever colour you apply). A value of 128,128,128 will adopt 50% of the colour you apply.
You can have a font of varying shades of white and grey for better font effects. I often shade my fonts from white at the top to about 212,212,212 at the bottom to give a nice effect.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
JLMoondog
Moderator
10
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 10th Mar 2016 10:31
Hey pseodohaiku! Post your font and I'll edit it so it so you can change its coor perfectly every time. :?

Cheers!

Login to post a reply

Server time is: 2019-11-17 15:34:27
Your offset time is: 2019-11-17 15:34:27