ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/bin/pclient
(Generate patch)

Comparing deliantra/Deliantra-Client/bin/pclient (file contents):
Revision 1.236 by root, Mon May 22 03:28:55 2006 UTC vs.
Revision 1.237 by elmex, Tue May 23 17:51:18 2006 UTC

82our $BUTTONBAR; 82our $BUTTONBAR;
83our $LOGVIEW; 83our $LOGVIEW;
84our $CONSOLE; 84our $CONSOLE;
85our $METASERVER; 85our $METASERVER;
86our $LOGIN_BUTTON; 86our $LOGIN_BUTTON;
87our $QUIT_DIALOG;
87 88
88our $FLOORBOX; 89our $FLOORBOX;
89our $GAUGES; 90our $GAUGES;
90our $STATWIDS; 91our $STATWIDS;
91 92
834 }; 835 };
835 836
836 $window 837 $window
837} 838}
838 839
840sub open_quit_dialog {
841 unless ($QUIT_DIALOG) {
842
843 my $QUIT_DIALOG = new CFClient::UI::FancyFrame title => "Really Quit?";
844
845 $QUIT_DIALOG->add (my $vb = new CFClient::UI::VBox expand => 1);
846
847 $vb->add (new CFClient::UI::Label
848 text => "You should find a savebed and apply it first!",
849 max_w => $WIDTH * 0.25
850 );
851 $vb->add (my $hb = new CFClient::UI::HBox expand => 1);
852 $hb->add (new CFClient::UI::Button
853 text => "Ok",
854 connect_activate => sub { $QUIT_DIALOG->hide },
855 expand => 1
856 );
857 $hb->add (new CFClient::UI::Button
858 text => "Quit anyway",
859 connect_activate => sub { exit 1 },
860 expand => 1
861 );
862 $hb->add (new CFClient::UI::Label "You should find a savebed and apply it first!");
863
864 $QUIT_DIALOG->show;
865 } else {
866 $QUIT_DIALOG->show;
867 }
868}
869
839sub make_inventory_window { 870sub make_inventory_window {
840 my $invwin = new CFClient::UI::FancyFrame 871 my $invwin = new CFClient::UI::FancyFrame
841 user_w => $WIDTH * (4/5), user_h => $HEIGHT * (4/5), title => "Inventory"; 872 user_w => $WIDTH * (4/5), user_h => $HEIGHT * (4/5), title => "Inventory";
842 873
843 $invwin->add (my $hb = new CFClient::UI::HBox expand => 1); 874 $invwin->add (my $hb = new CFClient::UI::HBox expand => 1);
951 text => "Save Config", 982 text => "Save Config",
952 tooltip => "Saves the options chosen in the client setting, server settings and the window layout to be restored on later runs.", 983 tooltip => "Saves the options chosen in the client setting, server settings and the window layout to be restored on later runs.",
953 connect_activate => sub { 984 connect_activate => sub {
954 CFClient::write_cfg "$Crossfire::VARDIR/pclientrc"; 985 CFClient::write_cfg "$Crossfire::VARDIR/pclientrc";
955 status "Configuration Saved"; 986 status "Configuration Saved";
987 },
988 );
989
990 $BUTTONBAR->add (new CFClient::UI::Button
991 text => "Quit",
992 tooltip => "Terminates the program",
993 connect_activate => sub {
994 if ($CONN) {
995 open_quit_dialog
996 } else {
997 exit 1
998 }
956 }, 999 },
957 ); 1000 );
958 1001
959 $BUTTONBAR->show; 1002 $BUTTONBAR->show;
960 1003

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines