fix disabled state in uicheckbox
This commit is contained in:
parent
7ab67c012f
commit
1667662c5c
|
@ -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
|
||||
|
|
|
@ -3,6 +3,8 @@ CheckBox < UICheckBox
|
|||
box-size: 12 12
|
||||
text-offset: 16 -1
|
||||
color: #aaaaaa
|
||||
enabled: false
|
||||
background-color: #ffffff88
|
||||
|
||||
$hover:
|
||||
color: #cccccc
|
||||
|
@ -25,4 +27,8 @@ CheckBox < UICheckBox
|
|||
$hover checked:
|
||||
image:
|
||||
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()))
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue