fix disabled state in uicheckbox

This commit is contained in:
Eduardo Bart 2011-11-16 03:23:16 -02:00
parent 7ab67c012f
commit 1667662c5c
3 changed files with 15 additions and 5 deletions

View File

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

View File

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

View File

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