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

Comparing deliantra/Deliantra-Client/bin/deliantra (file contents):
Revision 1.101 by root, Thu Feb 4 20:01:09 2010 UTC vs.
Revision 1.103 by elmex, Sat Mar 20 01:01:16 2010 UTC

1673 child => (my $table = new DC::UI::Table expand => 1, col_expand => [0, 1]), 1673 child => (my $table = new DC::UI::Table expand => 1, col_expand => [0, 1]),
1674 ); 1674 );
1675 1675
1676 $table->add_at (0, 4, new DC::UI::Label align => 1, text => "Username"); 1676 $table->add_at (0, 4, new DC::UI::Label align => 1, text => "Username");
1677 $table->add_at (1, 4, new DC::UI::Entry 1677 $table->add_at (1, 4, new DC::UI::Entry
1678 text => $CFG->{profile}{default}{user}, 1678 text => $PROFILE->{user},
1679 tooltip => "The name of your character on the server. The name is case-sensitive!", 1679 tooltip => "The name of your character on the server. The name is case-sensitive!",
1680 on_changed => sub { my ($self, $value) = @_; $CFG->{profile}{default}{user} = $value; 1 } 1680 on_changed => sub { my ($self, $value) = @_; $PROFILE->{user} = $value; 1 }
1681 ); 1681 );
1682 1682
1683 $table->add_at (0, 5, new DC::UI::Label align => 1, text => "Password"); 1683 $table->add_at (0, 5, new DC::UI::Label align => 1, text => "Password");
1684 $table->add_at (1, 5, new DC::UI::Entry 1684 $table->add_at (1, 5, new DC::UI::Entry
1685 text => $CFG->{profile}{default}{password}, 1685 text => $PROFILE->{password},
1686 hidden => 1, 1686 hidden => 1,
1687 tooltip => "The password for your character.", 1687 tooltip => "The password for your character.",
1688 on_changed => sub { my ($self, $value) = @_; $CFG->{profile}{default}{password} = $value; 1 } 1688 on_changed => sub { my ($self, $value) = @_; $PROFILE->{password} = $value; 1 }
1689 ); 1689 );
1690 1690
1691 $table->add_at (1, 11, $LOGIN_BUTTON = new DC::UI::Button 1691 $table->add_at (1, 11, $LOGIN_BUTTON = new DC::UI::Button
1692 expand => 1, 1692 expand => 1,
1693 text => "Login / Register", 1693 text => "Login / Register",
1729 $table->add_at (1, $row, my $vbox = new DC::UI::VBox); 1729 $table->add_at (1, $row, my $vbox = new DC::UI::VBox);
1730 1730
1731 $vbox->add ( 1731 $vbox->add (
1732 $HOST_ENTRY = new DC::UI::Entry 1732 $HOST_ENTRY = new DC::UI::Entry
1733 expand => 1, 1733 expand => 1,
1734 text => $CFG->{profile}{default}{host}, 1734 text => $PROFILE->{host},
1735 tooltip => "The hostname or ip address of the Deliantra server to connect to (e.g. <b>gameserver.deliantra.net</b>)", 1735 tooltip => "The hostname or ip address of the Deliantra server to connect to (e.g. <b>gameserver.deliantra.net</b>)",
1736 on_changed => sub { 1736 on_changed => sub {
1737 my ($self, $value) = @_; 1737 my ($self, $value) = @_;
1738 $CFG->{profile}{default}{host} = $value; 1738 $PROFILE->{host} = $value;
1739 1 1739 1
1740 } 1740 }
1741 ); 1741 );
1742 1742
1743 if (0) { #d# disabled 1743 if (0) { #d# disabled
2776 shift_fire_stop => 0, 2776 shift_fire_stop => 0,
2777 uitheme => "wood", 2777 uitheme => "wood",
2778 map_shift_x => -24, # arbitrary 2778 map_shift_x => -24, # arbitrary
2779 map_shift_y => +24, # arbitrary 2779 map_shift_y => +24, # arbitrary
2780 ); 2780 );
2781 2781
2782 while (my ($k, $v) = each %DEF_CFG) { 2782 while (my ($k, $v) = each %DEF_CFG) {
2783 $CFG->{$k} = $v unless exists $CFG->{$k}; 2783 $CFG->{$k} = $v unless exists $CFG->{$k};
2784 } 2784 }
2785 2785
2786 $CFG->{profile}{default}{host} ||= "gameserver.deliantra.net"; 2786 my @args = @ARGV;
2787
2788 my $profile = 'default';
2789
2790 for (my $i = 0; $i < @args; $i++) {
2791 if ($args[$i] eq '-profile') {
2792 $profile = $args[$i + 1];
2793 splice @args, $i, 2, ();
2794 $i = 0;
2795 }
2796 }
2797
2798 $CFG->{profile}{$profile} ||= {};
2787 $PROFILE = $CFG->{profile}{default}; 2799 $PROFILE = $CFG->{profile}{$profile};
2800 $PROFILE->{host} ||= "gameserver.deliantra.net";
2801
2802 $PROFILE->{host} = $args[0] if @args > 0;
2803 $PROFILE->{user} = $args[1] if @args > 1;
2804 $PROFILE->{password} = $args[2] if @args > 2;
2788 2805
2789 # convert old bindings (only default profile matters) 2806 # convert old bindings (only default profile matters)
2790 if (my $bindings = delete $PROFILE->{bindings}) { 2807 if (my $bindings = delete $PROFILE->{bindings}) {
2791 while (my ($mod, $syms) = each %$bindings) { 2808 while (my ($mod, $syms) = each %$bindings) {
2792 while (my ($sym, $cmds) = each %$syms) { 2809 while (my ($sym, $cmds) = each %$syms) {
2815 DejaVuSansMono-BoldOblique.ttf 2832 DejaVuSansMono-BoldOblique.ttf
2816 mona.ttf 2833 mona.ttf
2817 ); 2834 );
2818 2835
2819 DC::add_font $_ for @fonts; 2836 DC::add_font $_ for @fonts;
2820 2837
2821 $FONT_PROP = new_from_file DC::Font $fonts[0]; 2838 $FONT_PROP = new_from_file DC::Font $fonts[0];
2822 $FONT_FIXED = new_from_file DC::Font $fonts[1]; 2839 $FONT_FIXED = new_from_file DC::Font $fonts[1];
2823 2840
2824 $FONT_PROP->make_default; 2841 $FONT_PROP->make_default;
2825 2842

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines