| 166 | } |
| 167 | |
| 168 | void CClickWindowBitmap::UpdateButtons (bool noClickStatus, CClickWindowController::EButton selected, |
| 169 | CClickWindowController::EButton locked) |
| 170 | { |
| 171 | // No click button |
| 172 | |
| 173 | if (noClickStatus) { |
| 174 | m_btnNoClick->SetBitmapLabel (m_bmpButtonNoClick); |
| 175 | m_btnLeft->Enable(); |
| 176 | m_btnMiddle->Enable(); |
| 177 | m_btnRight->Enable(); |
| 178 | m_btnDrag->Enable(); |
| 179 | m_btnDblLeft->Enable(); |
| 180 | } |
| 181 | else { |
| 182 | m_btnNoClick->SetBitmapLabel (m_bmpButtonNoClickSelected); |
| 183 | m_btnLeft->Disable(); |
| 184 | m_btnMiddle->Disable(); |
| 185 | m_btnRight->Disable(); |
| 186 | m_btnDrag->Disable(); |
| 187 | m_btnDblLeft->Disable(); |
| 188 | } |
| 189 | |
| 190 | /* Update bitmaps */ |
| 191 | if (selected== CClickWindowController::LEFT) |
| 192 | if (locked== CClickWindowController::LEFT) |
| 193 | m_btnLeft->SetBitmapLabel (m_bmpButtonLeftSelectedLocked); |
| 194 | else |
| 195 | m_btnLeft->SetBitmapLabel (m_bmpButtonLeftSelected); |
| 196 | else |
| 197 | if (locked== CClickWindowController::LEFT) |
| 198 | m_btnLeft->SetBitmapLabel (m_bmpButtonLeftLocked); |
| 199 | else |
| 200 | m_btnLeft->SetBitmapLabel (m_bmpButtonLeft); |
| 201 | |
| 202 | if (selected== CClickWindowController::MIDDLE) |
| 203 | if (locked== CClickWindowController::MIDDLE) |
| 204 | m_btnMiddle->SetBitmapLabel (m_bmpButtonMiddleSelectedLocked); |
| 205 | else |
| 206 | m_btnMiddle->SetBitmapLabel (m_bmpButtonMiddleSelected); |
| 207 | else |
| 208 | if (locked== CClickWindowController::MIDDLE) |
| 209 | m_btnMiddle->SetBitmapLabel (m_bmpButtonMiddleLocked); |
| 210 | else |
| 211 | m_btnMiddle->SetBitmapLabel (m_bmpButtonMiddle); |
| 212 | |
| 213 | if (selected== CClickWindowController::RIGHT) |
| 214 | if (locked== CClickWindowController::RIGHT) |
| 215 | m_btnRight->SetBitmapLabel (m_bmpButtonRightSelectedLocked); |
| 216 | else |
| 217 | m_btnRight->SetBitmapLabel (m_bmpButtonRightSelected); |
| 218 | else |
| 219 | if (locked== CClickWindowController::RIGHT) |
| 220 | m_btnRight->SetBitmapLabel (m_bmpButtonRightLocked); |
| 221 | else |
| 222 | m_btnRight->SetBitmapLabel (m_bmpButtonRight); |
| 223 | |
| 224 | if (selected== CClickWindowController::DRAG) |
| 225 | if (locked== CClickWindowController::DRAG) |