… | |
… | |
789 | $window |
789 | $window |
790 | } |
790 | } |
791 | |
791 | |
792 | sub make_inventory_window { |
792 | sub make_inventory_window { |
793 | my $invwin = new CFClient::UI::FancyFrame user_w => 300, user_h => 300, title => "Inventory"; |
793 | my $invwin = new CFClient::UI::FancyFrame user_w => 300, user_h => 300, title => "Inventory"; |
794 | $invwin->add (my $hb = new CFClient::UI::HBox); |
|
|
795 | $hb->add ($INV = new CFClient::UI::Inventory expand => 1); |
794 | $invwin->add ($INV = new CFClient::UI::Inventory expand => 1); |
796 | $hb->add (my $rng = new CFClient::UI::Slider vertical => 1); |
|
|
797 | $INV->set_range ($rng); |
|
|
798 | $invwin |
795 | $invwin |
799 | } |
796 | } |
800 | |
797 | |
801 | sub sdl_init { |
798 | sub sdl_init { |
802 | CFClient::SDL_Init |
799 | CFClient::SDL_Init |
… | |
… | |
901 | push @bgmusic, shift @bgmusic; |
898 | push @bgmusic, shift @bgmusic; |
902 | } |
899 | } |
903 | |
900 | |
904 | sub audio_init { |
901 | sub audio_init { |
905 | if ($CFG->{audio_enable}) { |
902 | if ($CFG->{audio_enable}) { |
906 | if (open my $fh, "<:utf8", CFClient::find_rcfile "sounds/config") { |
903 | if (open my $fh, "<", CFClient::find_rcfile "sounds/config") { |
907 | $SDL_MIXER = !CFClient::Mix_OpenAudio; |
904 | $SDL_MIXER = !CFClient::Mix_OpenAudio; |
908 | CFClient::Mix_AllocateChannels 8; |
905 | CFClient::Mix_AllocateChannels 8; |
909 | CFClient::MixMusic::volume $CFG->{bgm_volume} * 128; |
906 | CFClient::MixMusic::volume $CFG->{bgm_volume} * 128; |
910 | |
907 | |
911 | audio_music_finished; |
908 | audio_music_finished; |