… | |
… | |
843 | $QUIT_DIALOG = new CFClient::UI::FancyFrame title => "Really Quit?"; |
843 | $QUIT_DIALOG = new CFClient::UI::FancyFrame title => "Really Quit?"; |
844 | |
844 | |
845 | $QUIT_DIALOG->add (my $vb = new CFClient::UI::VBox expand => 1); |
845 | $QUIT_DIALOG->add (my $vb = new CFClient::UI::VBox expand => 1); |
846 | |
846 | |
847 | $vb->add (new CFClient::UI::Label |
847 | $vb->add (new CFClient::UI::Label |
848 | text => "You should find a savebed and apply it first!", |
848 | text => "You should find a savebed and apply it first!", |
849 | max_w => $WIDTH * 0.25 |
849 | max_w => $WIDTH * 0.25, |
|
|
850 | ellipsize => 0, |
850 | ); |
851 | ); |
851 | $vb->add (my $hb = new CFClient::UI::HBox expand => 1); |
852 | $vb->add (my $hb = new CFClient::UI::HBox expand => 1); |
852 | $hb->add (new CFClient::UI::Button |
853 | $hb->add (new CFClient::UI::Button |
853 | text => "Ok", |
854 | text => "Ok", |
|
|
855 | expand => 1, |
854 | connect_activate => sub { $QUIT_DIALOG->hide }, |
856 | connect_activate => sub { $QUIT_DIALOG->hide }, |
855 | expand => 1 |
|
|
856 | ); |
857 | ); |
857 | $hb->add (new CFClient::UI::Button |
858 | $hb->add (new CFClient::UI::Button |
858 | text => "Quit anyway", |
859 | text => "Quit anyway", |
|
|
860 | expand => 1, |
859 | connect_activate => sub { exit 1 }, |
861 | connect_activate => sub { exit }, |
860 | expand => 1 |
|
|
861 | ); |
862 | ); |
862 | $hb->add (new CFClient::UI::Label "You should find a savebed and apply it first!"); |
|
|
863 | |
863 | |
864 | $QUIT_DIALOG->show_centered; |
864 | $QUIT_DIALOG->show_centered; |
865 | } else { |
865 | } else { |
866 | $QUIT_DIALOG->show_centered; |
866 | $QUIT_DIALOG->show_centered; |
867 | } |
867 | } |