fix disabled state in uicheckbox

master
Eduardo Bart 13 years ago
parent 7ab67c012f
commit 1667662c5c

@ -4,6 +4,7 @@ Button < UIButton
color: #f0ad4dff color: #f0ad4dff
size: 106 24 size: 106 24
text-translate: 0 0 text-translate: 0 0
border-image: border-image:
source: /core_styles/images/button.png source: /core_styles/images/button.png
border: 5 border: 5
@ -20,7 +21,7 @@ Button < UIButton
border: 5 border: 5
$disabled: $disabled:
color: #999999 color: #f0ad4d88
background-color: #ffffff88 background-color: #ffffff88
TopButton < UIButton TopButton < UIButton

@ -3,6 +3,8 @@ CheckBox < UICheckBox
box-size: 12 12 box-size: 12 12
text-offset: 16 -1 text-offset: 16 -1
color: #aaaaaa color: #aaaaaa
enabled: false
background-color: #ffffff88
$hover: $hover:
color: #cccccc color: #cccccc
@ -25,4 +27,8 @@ CheckBox < UICheckBox
$hover checked: $hover checked:
image: image:
source: /core_styles/images/checkbox.png source: /core_styles/images/checkbox.png
coords: 0 36 12 12 coords: 0 36 12 12
$disabled
background-color: #ffffff88
color: #aaaaaa88

@ -81,8 +81,8 @@ void UIWidget::destroy()
if(parent->hasChild(asUIWidget())) if(parent->hasChild(asUIWidget()))
parent->removeChild(asUIWidget()); parent->removeChild(asUIWidget());
} }
setVisible(false); //setVisible(false);
setEnabled(false); //setEnabled(false);
} }
void UIWidget::render() void UIWidget::render()
@ -139,12 +139,14 @@ void UIWidget::setStyle(const std::string& styleName)
OTMLNodePtr styleNode = g_ui.getStyle(styleName); OTMLNodePtr styleNode = g_ui.getStyle(styleName);
applyStyle(styleNode); applyStyle(styleNode);
m_style = styleNode; m_style = styleNode;
updateStyle();
} }
void UIWidget::setStyleFromNode(const OTMLNodePtr& styleNode) void UIWidget::setStyleFromNode(const OTMLNodePtr& styleNode)
{ {
applyStyle(styleNode); applyStyle(styleNode);
m_style = styleNode; m_style = styleNode;
updateStyle();
} }
void UIWidget::setParent(const UIWidgetPtr& parent) void UIWidget::setParent(const UIWidgetPtr& parent)
@ -751,8 +753,9 @@ void UIWidget::updateStyle()
} }
// merge states styles // merge states styles
if(match) if(match) {
newStateStyle->merge(style); newStateStyle->merge(style);
}
} }
} }

Loading…
Cancel
Save