Guest Carnifex Posted January 10, 2011 Share Posted January 10, 2011 it is possible to use multiple colors in one textview? (because ingame tooltips use it) If yes, why is this not working: Code: <header alignx = "center" fontsize="13"><rs class="CLASS0"><tip_golden>TEXT1</tip_golden></rs><rs class="CLASS1"><tip_golden><r name="DATA"/></tip_golden></rs> <rs class="CLASS0"><tip_golden>TEXT2</tip_golden></tip_golden></rs></header> Quote Link to comment Share on other sites More sharing options...
Ciuine Posted January 10, 2011 Share Posted January 10, 2011 Yep, it is possible. Code: <header alignx="center" fontsize="15" outline="1"><rs class="class"><p fontsize="17"><r name="name"/></p><br /> <tip_golden><r name="RN"/>: <r name="rank"/><br /></tip_golden> <tip_white><r name="LN"/>: <r name="level"/><br /> <r name="EN"/>: <r name="Exp"/>/<r name="LExp"/><br /></tip_white> <tip_green><r name="DHN"/>: <r name="Bonus"/>x<br /> <r name="SN"/>: <r name="Stat"/><br /></tip_green> <tip_blue><r name="TN"/> <r name="Time"/><br /></tip_blue> </rs></header> That's the Text for my PatronTT. Mine is called on with <multiline>true</multiline>. You have too many /tip_goldens. Quote Link to comment Share on other sites More sharing options...
Guest Carnifex Posted January 10, 2011 Share Posted January 10, 2011 but you have only one <rs class="class">, but i need to change the color of only one part of the textview! Quote Link to comment Share on other sites More sharing options...
Ciuine Posted January 10, 2011 Share Posted January 10, 2011 Create another? If it is just one color not found in the tips, use <p color=...></p>. Quote Link to comment Share on other sites More sharing options...
Guest Carnifex Posted January 10, 2011 Share Posted January 10, 2011 you mean: Code: <header alignx = "center" fontsize="13"><p color="COLOR1">TEXT1</p> <p color="COLOR2"><r name="DATA"/></p> <p color="COLOR3">TEXT2</p></header> and then how to change the color, there is no widget:SetColoVal("COLOR1","tip_green") Quote Link to comment Share on other sites More sharing options...
Ciuine Posted January 10, 2011 Share Posted January 10, 2011 Oh no, I meant <p color="0xFFFFFFFF">. And why do you still have that extra /tip_golden? What is your ultimate goal with this text view? A single line variabled multi-color text view where the text can have multiple different colors called on by the LUA? Quote Link to comment Share on other sites More sharing options...
Guest Carnifex Posted January 10, 2011 Share Posted January 10, 2011 Quote: Oh no, I meant <p color="0xFFFFFFFF">. but i can't change this at runtimeQuote: And why do you still have that extra /tip_golden? oh, i've forgotten to remove thisQuote: A single line variabled multi-color text view where the text can have multiple different colors called on by the LUA? exactly this^^ Quote Link to comment Share on other sites More sharing options...
Ciuine Posted January 10, 2011 Share Posted January 10, 2011 Your previous code worked fine with the removal of the extra </tip_golden>. Example of functional code: Code: <header alignx="center" fontsize="14" outline="1"><rs class="class"><r name="value"/></rs><rs class="class1">Blah</rs></header> Quote Link to comment Share on other sites More sharing options...
SLA Posted January 10, 2011 Share Posted January 10, 2011 Quote: Oh no, I meant <p color="0xFFFFFFFF">. Quote: but i can't change this at runtime Afaik, you can:Code: wtTextView:SetFormat("<p color="0xFFFFFFFF">Formatted text</p>") Quote Link to comment Share on other sites More sharing options...
Ciuine Posted January 11, 2011 Share Posted January 11, 2011 That'd probably be super annoying having to write out the entire textview for each modification. The <rs></rs><rs></rs> deal should work fine. Quote Link to comment Share on other sites More sharing options...
Guest Carnifex Posted January 11, 2011 Share Posted January 11, 2011 yes it works as you see on my recent update, but now idea why deflaut Color doen't work with multiple formats btw: silly german autocorrection^^ Quote Link to comment Share on other sites More sharing options...
Recommended Posts