Beispiel #1
0
	void UIButton::SetStateSprite(int32 state, Sprite *newSprite, int32 spriteFrame/* = 0*/)
	{
		for(int i = 0; i < DRAW_STATE_COUNT; i++)
		{
			if(state & 0x01)
			{
				CreateBackForState((eButtonDrawState)i)->SetSprite(newSprite, spriteFrame);
			}
			state >>= 1;
		}
	}
Beispiel #2
0
    void UIButton::CreateBackgroundForState(int32 state)
	{
		for(int i = 0; i < DRAW_STATE_COUNT; i++)
		{
			if(state & 0x01)
			{
				CreateBackForState((eButtonDrawState)i);
			}

			state >>= 1;
		}
	}
Beispiel #3
0
	void UIButton::SetStateColorInheritType(int32 state, UIControlBackground::eColorInheritType value)
	{
		for(int i = 0; i < DRAW_STATE_COUNT; i++)
		{
			if(state & 0x01)
			{
				CreateBackForState((eButtonDrawState)i)->SetColorInheritType(value);
			}
			state >>= 1;
		}
		
		selectedBackground = GetActualBackground(controlState);
	}
Beispiel #4
0
	void UIButton::SetStateColor(int32 state, Color color)
	{
		for(int i = 0; i < DRAW_STATE_COUNT; i++)
		{
			if(state & 0x01)
			{
				CreateBackForState((eButtonDrawState)i)->SetColor(color);
			}
			state >>= 1;
		}
		
		selectedBackground = GetActualBackground(controlState);
	}
Beispiel #5
0
	void UIButton::SetStateModification(int32 state, int32 modification)
	{
		for(int i = 0; i < DRAW_STATE_COUNT; i++)
		{
			if(state & 0x01)
			{
				CreateBackForState((eButtonDrawState)i)->SetModification(modification);
			}
			state >>= 1;
		}
		
		selectedBackground = GetActualBackground(controlState);
	}
Beispiel #6
0
	void UIButton::SetStateSprite(int32 state, const FilePath &spriteName, int32 spriteFrame/* = 0*/)
	{
		for(int i = 0; i < DRAW_STATE_COUNT; i++)
		{
			if(state & 0x01)
			{
				CreateBackForState((eButtonDrawState)i)->SetSprite(spriteName, spriteFrame);
			}
			state >>= 1;
		}
		
		selectedBackground = GetActualBackground(controlState);
	}