-
June 15th, 2019, 08:28 #1
- Join Date
- Jul 2010
- Location
- Germany, Frankfurt
- Posts
- 156
is it possible to change the color of a frame of its contols ?
I have a string control like that:
Code:<label_fieldtop name="label"> <anchored position="insidetopleft" offset="10,5" width="30" /> <frame name="abilityscore" /> </label_fieldtop>
I tried:
label.setColor("ff0000") which changed the text color.
label.setBackColor("ff0000") which changed the color behind the frame ...
label.abilityscore.setColor("ff0000") which results in a "attempt to index .. nil value .." error ...
-
June 15th, 2019, 10:40 #2
No - the frame is a graphic file.
What is the game trigger for the frame changing colour?
-
June 15th, 2019, 12:15 #3
- Join Date
- Jul 2010
- Location
- Germany, Frankfurt
- Posts
- 156
"onInit" of the control i want to set the color of the frame for the label text (default is a white "label" bitmap) to the color depending of the name of the database control (e.g. ability: Strength -> red, Constitution -> blue etc.).
I have allready a workaround for that by setting a corresponding frame with "label.setFrame(name_of_the_colored_frame)", but i thought maybe it could be done in a more generic way.
But ok, good to know , thanks for your answer!
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks