//selection handling void ofxBKButton::setSelected(bool value, bool notify) { isSelected = value; updateLabelColor(); if(notify) notifySelected(); }
void LLSpinCtrl::setLabel(const LLStringExplicit& label) { if (mLabelBox) { mLabelBox->setText(label); } else { llwarns << "Attempting to set label on LLSpinCtrl constructed without one " << getName() << llendl; } updateLabelColor(); }
// <FS:Ansariel> Allow setting an argument on the label BOOL LLSpinCtrl::setLabelArg(const std::string& key, const LLStringExplicit& text) { if (mLabelBox) { mLabelBox->setTextArg(key, text); } else { llwarns << "Attempting to set label argument on LLSpinCtrl constructed without one " << getName() << llendl; } updateLabelColor(); return TRUE; }
void firstMenu(Menu *menu, SDL_Renderer *windowRenderer, Context *context) { /* Get the mouse position */ SDL_Rect mouseRect; mouseRect.w = 0; mouseRect.h = 0; Uint32 mouseState = SDL_GetMouseState(&mouseRect.x, &mouseRect.y); /* Update the color of the labels */ updateLabelColor(menu, windowRenderer, &mouseRect); /* Draw the label on the renderer */ SDL_RenderCopy(windowRenderer, menu->quitLabel, NULL, &menu->quitRect); SDL_RenderCopy(windowRenderer, menu->startLabel, NULL, &menu->startRect); /* Test the click events. */ if(rectCollision(mouseRect, menu->quitRect) && (mouseState & SDL_BUTTON(1))) *context = QUIT; else if(rectCollision(mouseRect, menu->startRect) && (mouseState & SDL_BUTTON(1))) *context = GAME; }
void LLSpinCtrl::setEnabled(BOOL b) { LLView::setEnabled( b ); mEditor->setEnabled( b ); updateLabelColor(); }