|
@@ -79,7 +79,29 @@ Einstellungen::Einstellungen( Schrift *zSchrift, Fenster *zF )
|
|
|
userOptions->addWert( "Monitor", Text( auswahl ) );
|
|
|
else
|
|
|
userOptions->setWert( "Monitor", Text( auswahl ) );
|
|
|
+ Monitor m = getMonitor( auswahl );
|
|
|
+ if( !userOptions->wertExistiert( "ScreenWidth" ) )
|
|
|
+ userOptions->addWert( "ScreenWidth", Text( m.breite ) );
|
|
|
+ else
|
|
|
+ userOptions->setWert( "ScreenWidth", Text( m.breite ) );
|
|
|
+ if( !userOptions->wertExistiert( "ScreenWidth" ) )
|
|
|
+ userOptions->addWert( "ScreenHeight", Text( m.height ) );
|
|
|
+ else
|
|
|
+ userOptions->setWert( "ScreenHeight", Text( m.height ) );
|
|
|
+ breite->setText( Text( m.breite ) );
|
|
|
+ height->setText( Text( m.height ) );
|
|
|
} );
|
|
|
+ TextFeld *at = initTextFeld( 255, 50, 200, 20, zSchrift, TextFeld::Style::Text, "Auflösung (Neustart erforderlich)" );
|
|
|
+ f->addMember( at );
|
|
|
+ breite = initTextFeld( 255, 70, 50, 20, zSchrift, TextFeld::Style::TextFeld, userOptions->wertExistiert( "ScreenWidth" ) ? userOptions->zWert( "ScreenWidth" )->getText() :
|
|
|
+ Text( getMonitor( userOptions->wertExistiert( "Monitor" ) ? *userOptions->zWert( "Monitor" ) : 0 ).breite ) );
|
|
|
+ height = initTextFeld( 312, 70, 50, 20, zSchrift, TextFeld::Style::TextFeld, userOptions->wertExistiert( "ScreenHeight" ) ? userOptions->zWert( "ScreenHeight" )->getText() :
|
|
|
+ Text( getMonitor( userOptions->wertExistiert( "Monitor" ) ? *userOptions->zWert( "Monitor" ) : 0 ).height ) );
|
|
|
+ breite->setTastaturEreignis( _nurNummernTE );
|
|
|
+ height->setTastaturEreignis( _nurNummernTE );
|
|
|
+ f->addMember( breite->getThis() );
|
|
|
+ f->addMember( initTextFeld( 305, 70, 5, 20, zSchrift, TextFeld::Style::Text, "x" ) );
|
|
|
+ f->addMember( height->getThis() );
|
|
|
ok = initKnopf( 390, 450, 100, 20, zSchrift, Knopf::Style::Sichtbar, "Ok" );
|
|
|
ok->setMausEreignisParameter( this );
|
|
|
ok->setMausEreignis( einstellungenOkME );
|
|
@@ -98,6 +120,8 @@ Einstellungen::~Einstellungen()
|
|
|
{
|
|
|
maxFPS->release();
|
|
|
guiSound->release();
|
|
|
+ breite->release();
|
|
|
+ height->release();
|
|
|
f->release();
|
|
|
ok->release();
|
|
|
}
|
|
@@ -121,7 +145,9 @@ bool Einstellungen::okME( MausEreignis & me )
|
|
|
{
|
|
|
int fps = *maxFPS->zText();
|
|
|
int sound = *guiSound->zText();
|
|
|
- if( fps > 0 && sound >= 0 && sound <= 100 )
|
|
|
+ int wi = *breite->zText();
|
|
|
+ int hi = *height->zText();
|
|
|
+ if( fps > 0 && sound >= 0 && sound <= 100 && wi > 0 && hi > 0 )
|
|
|
{
|
|
|
f->removeStyle( Fenster::Style::Sichtbar );
|
|
|
hauptScreen->lock();
|
|
@@ -133,6 +159,14 @@ bool Einstellungen::okME( MausEreignis & me )
|
|
|
userOptions->addWert( "GUISound", guiSound->zText()->getText() );
|
|
|
else
|
|
|
userOptions->setWert( "GUISound", guiSound->zText()->getText() );
|
|
|
+ if( !userOptions->wertExistiert( "ScreenWidth" ) )
|
|
|
+ userOptions->addWert( "ScreenWidth", Text( wi ) );
|
|
|
+ else
|
|
|
+ userOptions->setWert( "ScreenWidth", Text( wi ) );
|
|
|
+ if( !userOptions->wertExistiert( "ScreenHeight" ) )
|
|
|
+ userOptions->addWert( "ScreenHeight", Text( hi ) );
|
|
|
+ else
|
|
|
+ userOptions->setWert( "ScreenHeight", Text( hi ) );
|
|
|
hauptScreen->unlock();
|
|
|
userOptions->speichern();
|
|
|
}
|