- Joined
- Dec 31, 2014
- Messages
- 4
- Reaction score
- 0
- First Language
- French
- Primarily Uses
Hello.
I have a little Windows Base child that i use to write some text
class Window_Choix < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(624,0,400,300) contents.font.size = 16 hide end def updateText(text,clear=false) contents.clear if clear show for i in 0..text .length-1 contents.draw_text(0,16*i,600,16,text[1],0) end end endand i have this code elsewhere
@text.push("Blabla") @windowText.updateText(@text)It work fine.
My question is: since Windows Base have some color method
def process_escape_character(code, text, pos) case code.upcase when 'C' change_color(text_color(obtain_escape_param(text))) when 'I' process_draw_icon(obtain_escape_param(text), pos) when '{' make_font_bigger when '}' make_font_smaller end endhow can i color some of my text in blue ?
Some code like :
@text.push("Bla \C[5] bla")@windowText.updateText(@text)Thank you
I have a little Windows Base child that i use to write some text
class Window_Choix < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(624,0,400,300) contents.font.size = 16 hide end def updateText(text,clear=false) contents.clear if clear show for i in 0..text .length-1 contents.draw_text(0,16*i,600,16,text[1],0) end end endand i have this code elsewhere
@text.push("Blabla") @windowText.updateText(@text)It work fine.
My question is: since Windows Base have some color method
def process_escape_character(code, text, pos) case code.upcase when 'C' change_color(text_color(obtain_escape_param(text))) when 'I' process_draw_icon(obtain_escape_param(text), pos) when '{' make_font_bigger when '}' make_font_smaller end endhow can i color some of my text in blue ?
Some code like :
@text.push("Bla \C[5] bla")@windowText.updateText(@text)Thank you