Added position rules for widgets in the relative layout.

--HG--
branch : dev
This commit is contained in:
Martín Lucas Golini
2017-03-08 17:12:12 -03:00
parent ba638da1de
commit 69aa3c7419
8 changed files with 90 additions and 46 deletions

View File

@@ -699,8 +699,11 @@ void EETest::createNewUI() {
rlay->setLayoutMargin( Recti( 16, 16, 16, 16 ) );
rlay->setBackgroundFillEnabled( true )->setColor( 0x333333CC );
UIPushButton::New()->setText( "OK" )->setLayoutGravity( UI_VALIGN_BOTTOM | UI_HALIGN_RIGHT )->setLayoutMargin( Recti( 0, 0, 16, 16 ) )->setParent( rlay );
UIPushButton::New()->setText( "Cancel" )->setLayoutGravity( UI_VALIGN_BOTTOM | UI_HALIGN_RIGHT )->setLayoutMargin( Recti( 0, 0, 16 + 32, 16 ) )->setParent( rlay );
UIPushButton * ofBut = UIPushButton::New();
ofBut->setText( "OK" )->setLayoutGravity( UI_VALIGN_BOTTOM | UI_HALIGN_RIGHT )->setLayoutMargin( Recti( 0, 0, 16, 16 ) )->setParent( rlay );
UIPushButton::New()->setText( "Cancel" )->setLayoutGravity( UI_VALIGN_BOTTOM | UI_HALIGN_RIGHT )->setLayoutMargin( Recti( 0, 0, 8, 0 ) )
->setLayoutPositionRule( LayoutPositionRules::LEFT_OF, ofBut )->setParent( rlay );
win2->show();
/**/