| 147 | } |
| 148 | |
| 149 | void CheckboxWidget::UpdateCheckbox() |
| 150 | { |
| 151 | if (m_checkboxEnabled) |
| 152 | { |
| 153 | m_checkboxBorderSprite->SetColor(s_borderColor); |
| 154 | m_checkboxBackgroundSprite->SetColor(s_backgroundColor); |
| 155 | } |
| 156 | else |
| 157 | { |
| 158 | m_checkboxBorderSprite->SetColor(s_disabledBorderColor); |
| 159 | m_checkboxBackgroundSprite->SetColor(s_disabledBackgroundColor); |
| 160 | } |
| 161 | |
| 162 | |
| 163 | if (m_state == CheckboxState_Unchecked) |
| 164 | { |
| 165 | m_checkboxContentEntity->Enable(false); |
| 166 | return; |
| 167 | } |
| 168 | else if (m_state == CheckboxState_Checked) |
| 169 | { |
| 170 | m_checkboxContentEntity->Enable(); |
| 171 | m_checkboxContentSprite->SetColor(Nz::Color::White); |
| 172 | m_checkboxContentSprite->SetTexture(m_checkMark, false); |
| 173 | } |
| 174 | else // Tristate |
| 175 | { |
| 176 | m_checkboxContentEntity->Enable(); |
| 177 | m_checkboxContentSprite->SetColor(Nz::Color::Black); |
| 178 | m_checkboxContentSprite->SetTexture(Nz::TextureRef {}); |
| 179 | } |
| 180 | } |
| 181 | } |
nothing calls this directly
no test coverage detected