Author Topic: game description font color help.  (Read 293 times)

Steven Campoli

  • Sr. Member
  • ****
  • Posts: 105
    • View Profile
game description font color help.
« on: October 01, 2018, 09:51:06 PM »
hey guys, i managed to change the fonts and size of the game description but cant figure out a way to change the color of the text. i do not see a text color rgb in the layout... any ideas how to do this?
Steven Campoli

zpaolo11x

  • Sr. Member
  • ****
  • Posts: 224
    • View Profile
Re: game description font color help.
« Reply #1 on: October 02, 2018, 01:58:33 AM »
hey guys, i managed to change the fonts and size of the game description but cant figure out a way to change the color of the text. i do not see a text color rgb in the layout... any ideas how to do this?

If the text item is called mytext, just use the command

mytext.set_rgb(R,G,B)

where R,G and B are from 0 to 255

You can find more info here:

https://github.com/mickelson/attract/blob/master/Layouts.md#Text

Steven Campoli

  • Sr. Member
  • ****
  • Posts: 105
    • View Profile
Re: game description font color help.
« Reply #2 on: October 02, 2018, 07:47:56 AM »
i dont think it is...copied a part of the layout..using hyerpie2 theme...

erW*0.8, flyerH*0.8 );
flyer.preserve_aspect_ratio = true
}
local flx = fe.layout.width;
local fly = fe.layout.height;
}
}
/////////////////
//Game Description
////////////////
if ( glist_delay != 0 ){
if ( my_config["aspectratio"] == "16x9") {
if ( my_config["select_description"] == "On" ){
local image_bg = fe.add_image( "white.png", flx*0.719, bth, lbw, (flh - bth - bbh) );

image_bg.set_rgb(bgRGB[0],bgRGB[1],bgRGB[2])
image_bg.alpha = 150;
image_bg.visible=true;

local text = fe.add_text("info", flx*0.72, fly*0.14, flw*0.26, flh*0.7);
text.font = "AEH.ttf"
text.charsize = flx*0.015;
text.align = Align.Left;
text.word_wrap = true;
text.alpha = 255;
text.visible=true;

local box_back = fe.add_artwork( "back", flx*0.719, bth, lbw, (flh
Steven Campoli

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 678
    • View Profile
Re: game description font color help.
« Reply #3 on: October 02, 2018, 08:51:54 AM »
Code: [Select]
// set color variables
text.red = 255;
text.green = 255;
text.blue = 255;

// or with a built in function
text.set_rgb(255, 255, 255);

If it still does not work, it’s being changed later in the code I assume.

Steven Campoli

  • Sr. Member
  • ****
  • Posts: 105
    • View Profile
Re: game description font color help.
« Reply #4 on: October 02, 2018, 08:57:40 AM »
got it...it was text.set_rgb(......)

thanks !
Steven Campoli