View Single Post
12-10-05, 02:45 AM   #2
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 521
If your checkbutton inherits UICheckButtonTemplate, this is in UIPanelTemplates.xml and it looks like:
<CheckButton name="UICheckButtonTemplate" virtual="true">
<Size>
<AbsDimension x="32" y="32"/>
</Size>
<Layers>
<Layer level="ARTWORK">
<FontString name="$parentText" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="LEFT" relativePoint="RIGHT">
<Offset>
<AbsDimension x="-2" y="0"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<NormalTexture file="Interface\Buttons\UI-CheckBox-Up"/>
<PushedTexture file="Interface\Buttons\UI-CheckBox-Down"/>
<HighlightTexture file="Interface\Buttons\UI-CheckBox-Highlight" alphaMode="ADD"/>
<CheckedTexture file="Interface\Buttons\UI-CheckBox-Check"/>
<DisabledCheckedTexture file="Interface\Buttons\UI-CheckBox-Check-Disabled"/>
</CheckButton>
So you could set the color by doing CheckButtonText:SetTextColor(.5,.5,.5) or CheckButtonText:SetTextColor(1,1,1) depending on its state after it's checked.

I assume you're using that since a checkbutton that doesn't inherit anything has no text associated with it.
  Reply With Quote