コード例 #1
0
ファイル: ofxBKButton.cpp プロジェクト: benkuper/ofxBKUI
//selection handling
void ofxBKButton::setSelected(bool value, bool notify)
{
	isSelected = value;
	updateLabelColor();

	if(notify) notifySelected();
}
コード例 #2
0
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();
}
コード例 #3
0
ファイル: llspinctrl.cpp プロジェクト: wish-ds/firestorm-ds
// <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;
}
コード例 #4
0
ファイル: menu.c プロジェクト: MickaelSERENO/Tetris
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;
}
コード例 #5
0
void LLSpinCtrl::setEnabled(BOOL b)
{
	LLView::setEnabled( b );
	mEditor->setEnabled( b );
	updateLabelColor();
}