Welcome,
Guest
. Please
login
or
register
.
February 07, 2025, 06:10:50 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Change Color Tint of UILabel?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Change Color Tint of UILabel? (Read 16872 times)
Dedede
Guest
Change Color Tint of UILabel?
«
on:
May 18, 2012, 02:33:27 PM »
Hey guys,
is it possible to change the color tint value of an UILabel at runtime?
I can only find effectColor, which as the name implies only works, if effects are used.
Thanks.
Logged
Ferazel
Full Member
Thank You
-Given: 1
-Receive: 2
Posts: 150
Re: Change Color Tint of UILabel?
«
Reply #1 on:
May 18, 2012, 03:11:30 PM »
UILabel inherits from UIWidget which has a .color property:
http://www.tasharen.com/ngui/docs/d1/d68/class_u_i_widget.html#a70d22f68e64f19372b1eaab899abf975
Logged
Dedede
Guest
Re: Change Color Tint of UILabel?
«
Reply #2 on:
May 18, 2012, 03:33:14 PM »
Thanks Ferazel,
it works like a charm
Logged
tinyutopia
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 15
Re: Change Color Tint of UILabel?
«
Reply #3 on:
April 17, 2013, 03:06:48 PM »
This is a dead link
Logged
Lohoris
Newbie
Thank You
-Given: 4
-Receive: 0
Posts: 11
Re: Change Color Tint of UILabel?
«
Reply #4 on:
September 17, 2013, 04:31:06 AM »
Quote from: tinyutopia on April 17, 2013, 03:06:48 PM
This is a dead link
Dead link indeed.
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Change Color Tint of UILabel?
«
Reply #5 on:
September 17, 2013, 02:55:20 PM »
UILabel lbl
=
GetComponent
<
UILabel
>
(
)
;
lbl
.
color
=
Color
.
red
;
Logged
skatola
Newbie
Thank You
-Given: 4
-Receive: 0
Posts: 31
Re: Change Color Tint of UILabel?
«
Reply #6 on:
January 31, 2016, 06:35:20 AM »
Quote from: ArenMook on September 17, 2013, 02:55:20 PM
UILabel lbl
=
GetComponent
<
UILabel
>
(
)
;
lbl
.
color
=
Color
.
red
;
sorry, what if i want change just a part of a uilabel?
for example: uilabel_text = "Hello
World[/color=#2b2b2b]";
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Change Color Tint of UILabel?
«
Reply #7 on:
January 31, 2016, 08:37:33 AM »
label
.
text
=
"Hello [ff0000]red[-] world"
;
It's explained in the documentation for UILabel, even shown in the picture.
http://www.tasharen.com/forum/index.php?topic=6706.0
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Change Color Tint of UILabel?