… | |
… | |
511 | audio_music_push; |
511 | audio_music_push; |
512 | } |
512 | } |
513 | |
513 | |
514 | sub audio_init { |
514 | sub audio_init { |
515 | if ($CFG->{audio_enable}) { |
515 | if ($CFG->{audio_enable}) { |
516 | DC::Audio::init $CFG->{audio_driver}; |
516 | DC::Audio::init; |
517 | |
517 | |
518 | if ($SDL_MIXER) { |
518 | if ($SDL_MIXER) { |
519 | audio_music_finished; |
519 | audio_music_finished; |
520 | } else { |
520 | } else { |
521 | status "Unable to open sound device: there will be no sound"; |
521 | status "Unable to open sound device: there will be no sound"; |
… | |
… | |
1178 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Compress Textures"); |
1178 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Compress Textures"); |
1179 | $table->add_at (1, $row++, new DC::UI::CheckBox |
1179 | $table->add_at (1, $row++, new DC::UI::CheckBox |
1180 | state => $CFG->{texture_compression}, |
1180 | state => $CFG->{texture_compression}, |
1181 | tooltip => "Use texture compression. Normally this will not reduce visual quality noticable but " |
1181 | tooltip => "Use texture compression. Normally this will not reduce visual quality noticable but " |
1182 | . "will save a lot of memory and increase performance (and also fall prey to the ever-buggy Mac OS X software renderer). " |
1182 | . "will save a lot of memory and increase performance (and also fall prey to the ever-buggy Mac OS X software renderer). " |
1183 | . "The compression algorithm can differ form card to card, so your mileage may vary. This setting is ignored in " |
1183 | . "The compression algorithm can differ from card to card, so your mileage may vary. This setting is ignored in " |
1184 | . "forced OpenGL 1.1 mode and when using the Apple renderer.", |
1184 | . "forced OpenGL 1.1 mode and when using the Apple renderer.", |
1185 | on_changed => sub { my ($self, $value) = @_; $CFG->{texture_compression} = $value; 0 } |
1185 | on_changed => sub { my ($self, $value) = @_; $CFG->{texture_compression} = $value; 0 } |
1186 | ); |
1186 | ); |
1187 | |
1187 | |
1188 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Fast & Ugly"); |
1188 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Fast & Ugly"); |
… | |
… | |
1915 | if $self->{text} eq $nullpw; |
1915 | if $self->{text} eq $nullpw; |
1916 | 0 |
1916 | 0 |
1917 | }, |
1917 | }, |
1918 | on_changed => sub { |
1918 | on_changed => sub { |
1919 | my ($self, $value) = @_; |
1919 | my ($self, $value) = @_; |
1920 | $PROFILE->{password} = pack "H*", Deliantra::Util::hash_pw $value |
1920 | $PROFILE->{password} = unpack "H*", Deliantra::Util::hash_pw $value |
1921 | if length $value && $value ne $nullpw; |
1921 | if length $value && $value ne $nullpw; |
1922 | 1 |
1922 | 1 |
1923 | }, |
1923 | }, |
1924 | ); |
1924 | ); |
1925 | |
1925 | |
… | |
… | |
1955 | }, |
1955 | }, |
1956 | ); |
1956 | ); |
1957 | |
1957 | |
1958 | $vbox->add (new DC::UI::FancyFrame |
1958 | $vbox->add (new DC::UI::FancyFrame |
1959 | label => "Server Message", |
1959 | label => "Server Message", |
1960 | tooltip => "The last message, or error, form the server.", |
1960 | tooltip => "The last message, or error, from the server.", |
1961 | child => ($LOGIN_ERROR = new DC::UI::Label valign => 0, ellipsise => 0), |
1961 | child => ($LOGIN_ERROR = new DC::UI::Label valign => 0, ellipsise => 0), |
1962 | ); |
1962 | ); |
1963 | |
1963 | |
1964 | $vbox->add (new DC::UI::FancyFrame |
1964 | $vbox->add (new DC::UI::FancyFrame |
1965 | label => "How to Play", |
1965 | label => "How to Play", |
… | |
… | |
2595 | make_playerbook; |
2595 | make_playerbook; |
2596 | |
2596 | |
2597 | $MENUPOPUP = DC::UI::Menu->new (items => [ |
2597 | $MENUPOPUP = DC::UI::Menu->new (items => [ |
2598 | ["Setup…\tF9" , sub { $SETUP_DIALOG->toggle_visibility }], |
2598 | ["Setup…\tF9" , sub { $SETUP_DIALOG->toggle_visibility }], |
2599 | ["Playerbook…\tTab" , sub { $PL_WINDOW ->toggle_visibility }], |
2599 | ["Playerbook…\tTab" , sub { $PL_WINDOW ->toggle_visibility }], |
2600 | ["…Statistics\tF2" , sub { toggle_player_page ($::STATS_PAGE) }], |
2600 | ["…Statistics\tF2" , sub { toggle_player_page ($::STATS_PAGE) }], |
2601 | ["…Skills\tF3" , sub { toggle_player_page ($::SKILL_PAGE) }], |
2601 | ["…Skills\tF3" , sub { toggle_player_page ($::SKILL_PAGE) }], |
2602 | ["…Spells\tF4" , sub { toggle_player_page ($::SPELL_PAGE) }], |
2602 | ["…Spells\tF4" , sub { toggle_player_page ($::SPELL_PAGE) }], |
2603 | ["…Inventory\tF5" , sub { toggle_player_page ($::INVENTORY_PAGE) }], |
2603 | ["…Inventory\tF5" , sub { toggle_player_page ($::INVENTORY_PAGE) }], |
2604 | ["Help Browser…\tF1" , sub { $HELP_WINDOW ->toggle_visibility }], |
2604 | ["Help Browser…\tF1" , sub { $HELP_WINDOW ->toggle_visibility }], |
2605 | ["Quit…" , sub { |
2605 | ["Quit…" , sub { |
2606 | if ($CONN) { |
2606 | if ($CONN) { |