mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-07-14 06:52:52 +03:00
Small fix.
--HG-- branch : dev
This commit is contained in:
@@ -61,6 +61,8 @@ UIPushButton::UIPushButton() :
|
||||
mTextBox( NULL ),
|
||||
mIconSpace( 0 )
|
||||
{
|
||||
setFlags( UI_AUTO_SIZE | UI_VALIGN_CENTER | UI_HALIGN_CENTER );
|
||||
|
||||
mIcon = eeNew( UIGfx, () );
|
||||
mIcon->setParent( this );
|
||||
mIcon->setFlags( UI_AUTO_SIZE | UI_VALIGN_CENTER | UI_HALIGN_CENTER );
|
||||
@@ -91,7 +93,11 @@ bool UIPushButton::isType( const Uint32& type ) const {
|
||||
return UIPushButton::getType() == type ? true : UIComplexControl::isType( type );
|
||||
}
|
||||
|
||||
void UIPushButton::onSizeChange() {
|
||||
void UIPushButton::onSizeChange() {
|
||||
if ( ( mFlags & UI_AUTO_SIZE ) && NULL != getSkin() && 0 == mSize.getHeight() ) {
|
||||
setInternalHeight( getSkinSize().getHeight() );
|
||||
}
|
||||
|
||||
if ( NULL != mTextBox ) {
|
||||
mTextBox->setSize( mSize );
|
||||
mTextBox->setPosition( 0, 0 );
|
||||
|
||||
@@ -639,10 +639,15 @@ void EETest::createNewUI() {
|
||||
listBox->addListBoxItems( str );
|
||||
|
||||
UIProgressBar * progressBar = eeNew( UIProgressBar, () );
|
||||
progressBar->setPosition( 50, 540 )->setSize( 200, 26 );
|
||||
progressBar->setPosition( 50, 530 )->setSize( 200, 26 );
|
||||
progressBar->setProgress( 60.f );
|
||||
progressBar->setDisplayPercent( true );
|
||||
|
||||
UIPushButton * pushButton = eeNew( UIPushButton, () );
|
||||
pushButton->setPosition( 50, 560 )->setSize( 200, 0 );
|
||||
pushButton->setText( "PushButton" );
|
||||
pushButton->setIcon( mTheme->getIconByName( "ok" ) );
|
||||
|
||||
UISprite * sprite = eeNew( UISprite, () );
|
||||
sprite->setPosition( 50, 600 );
|
||||
sprite->setSprite( &SP );
|
||||
|
||||
Reference in New Issue
Block a user