… | |
… | |
875 | } |
875 | } |
876 | |
876 | |
877 | sub graphics_setup { |
877 | sub graphics_setup { |
878 | my $vbox = new DC::UI::VBox; |
878 | my $vbox = new DC::UI::VBox; |
879 | |
879 | |
|
|
880 | { |
|
|
881 | $vbox->add (my $frame = new DC::UI::FancyFrame expand => 1, label => "Video Mode"); |
|
|
882 | |
880 | $vbox->add (my $table = new DC::UI::Table expand => 1, col_expand => [0, 1]); |
883 | $frame->add (my $table = new DC::UI::Table expand => 1, col_expand => [0, 1]); |
881 | |
884 | |
882 | my $row = 0; |
885 | my $row = 0; |
883 | |
886 | |
884 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "OpenGL Info"); |
887 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "OpenGL Info"); |
885 | $table->add_at (1, $row++, new DC::UI::Label fontsize => 0.8, text => DC::OpenGL::gl_vendor . ", " . DC::OpenGL::gl_version, |
888 | $table->add_at (1, $row++, new DC::UI::Label fontsize => 0.8, text => DC::OpenGL::gl_vendor . ", " . DC::OpenGL::gl_version, |
886 | can_events => 1, |
889 | can_events => 1, |
887 | tooltip => "<tt><span size='8192'>" . (DC::OpenGL::gl_extensions) . "</span></tt>"); |
890 | tooltip => "<tt><span size='8192'>" . (DC::OpenGL::gl_extensions) . "</span></tt>"); |
888 | |
891 | |
889 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Caveats"); |
892 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Caveats"); |
890 | $table->add_at (1, $row++, $CAVEAT_LABEL = new DC::UI::Label fontsize => 0.8, |
893 | $table->add_at (1, $row++, $CAVEAT_LABEL = new DC::UI::Label fontsize => 0.8, |
891 | can_events => 1, |
894 | can_events => 1, |
892 | tooltip => "This field shows any known issues with your config or driver, such as " |
895 | tooltip => "This field shows any known issues with your config or driver, such as " |
893 | . "a non-accelerated display format. You can try to work around these issues " |
896 | . "a non-accelerated display format. You can try to work around these issues " |
894 | . "by selecting a different video mode, changing the settings below or " |
897 | . "by selecting a different video mode, changing the settings below or " |
895 | . "by installing the right driver for your graphics card."); |
898 | . "by installing the right driver for your graphics card."); |
896 | |
899 | |
897 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "UI Theme"); |
900 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "UI Theme"); |
898 | $table->add_at (1, $row++, $FULLSCREEN_ENABLE = new DC::UI::Selector |
901 | $table->add_at (1, $row++, $FULLSCREEN_ENABLE = new DC::UI::Selector |
899 | value => $CFG->{uitheme}, |
902 | value => $CFG->{uitheme}, |
900 | options => [ |
903 | options => [ |
901 | [wood => "Wood (the default)"], |
904 | [wood => "Wood (the default)"], |
902 | [plain => "Plain (very)"], |
905 | [plain => "Plain (very)"], |
903 | [blue => "Blue (dark)"], |
906 | [blue => "Blue (dark)"], |
904 | [metal => "Metal (light)"], |
907 | [metal => "Metal (light)"], |
905 | ], |
908 | ], |
906 | tooltip => "Choose the User Interface theme that you like most :)", |
909 | tooltip => "Choose the User Interface theme that you like most :)", |
907 | on_changed => sub { my ($self, $value) = @_; $CFG->{uitheme} = $value; 0 } |
910 | on_changed => sub { my ($self, $value) = @_; $CFG->{uitheme} = $value; 0 } |
908 | ); |
911 | ); |
909 | |
912 | |
910 | my $vidmode_tooltip = |
913 | my $vidmode_tooltip = |
911 | "<b>Video Mode.</b> The video mode to use for fullscreen (and the window size for windowed operation). " |
914 | "<b>Video Mode.</b> The video mode to use for fullscreen (and the window size for windowed operation). " |
912 | . "The format is <i>width</i> x <i>height</i> \@ <i>depth-per-channel</i> + <i>alpha-channel</i>."; |
915 | . "The format is <i>width</i> x <i>height</i> \@ <i>depth-per-channel</i> + <i>alpha-channel</i>."; |
913 | |
916 | |
914 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Video Mode"); |
917 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Video Mode"); |
915 | $table->add_at (1, $row++, my $hbox = new DC::UI::HBox); |
918 | $table->add_at (1, $row++, my $hbox = new DC::UI::HBox); |
916 | |
919 | |
917 | $hbox->add ($MODE_SLIDER = new DC::UI::Slider |
920 | $hbox->add ($MODE_SLIDER = new DC::UI::Slider |
918 | force_w => $WIDTH * 0.1, expand => 1, |
921 | force_w => $WIDTH * 0.1, expand => 1, |
919 | range => [ ($CFG->{sdl_mode}) x 3 ], |
922 | range => [ ($CFG->{sdl_mode}) x 3 ], |
920 | tooltip => $vidmode_tooltip); |
923 | tooltip => $vidmode_tooltip); |
921 | $hbox->add (my $mode_label = new DC::UI::Label |
924 | $hbox->add (my $mode_label = new DC::UI::Label |
922 | height => 0.8, template => "9999x9999@9+9", |
925 | height => 0.8, template => "9999x9999@9+9", |
923 | can_events => 1, tooltip => $vidmode_tooltip); |
926 | can_events => 1, tooltip => $vidmode_tooltip); |
924 | |
927 | |
925 | $MODE_SLIDER->connect (changed => sub { |
928 | $MODE_SLIDER->connect (changed => sub { |
926 | my ($self, $value) = @_; |
|
|
927 | |
|
|
928 | $CFG->{sdl_mode} = $self->{range}[0] = $value = int $value; |
|
|
929 | $mode_label->set_text (sprintf '%dx%d@%d+%d', @{$SDL_MODES[$value]}); |
|
|
930 | }); |
|
|
931 | $MODE_SLIDER->emit (changed => $MODE_SLIDER->{range}[0]); |
|
|
932 | |
|
|
933 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Fullscreen"); |
|
|
934 | $table->add_at (1, $row++, $FULLSCREEN_ENABLE = new DC::UI::CheckBox |
|
|
935 | state => $CFG->{fullscreen}, |
|
|
936 | tooltip => "Bring the client into fullscreen mode.", |
|
|
937 | on_changed => sub { my ($self, $value) = @_; $CFG->{fullscreen} = $value; 0 } |
|
|
938 | ); |
|
|
939 | |
|
|
940 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Force OpenGL 1.1"); |
|
|
941 | $table->add_at (1, $row++, new DC::UI::CheckBox |
|
|
942 | state => $CFG->{force_opengl11}, |
|
|
943 | tooltip => "Limit Deliantra to use OpenGL 1.1 features only. This will normally result in " |
|
|
944 | . "higher memory usage and slower performance. It will, however, help tremendously on " |
|
|
945 | . "cards that claim to support a feature but fall back to software rendering. " |
|
|
946 | . "Nvidia Geforce FX cards are known to claim features the hardware doesn't support, " |
|
|
947 | . "but cards and drivers from other vendors (ATI) are often just as bad. " |
|
|
948 | . "<b>If you experience extremely low framerates and your card should do better, try this option.</b>", |
|
|
949 | on_changed => sub { my ($self, $value) = @_; $CFG->{force_opengl11} = $value; 0 } |
|
|
950 | ); |
|
|
951 | |
|
|
952 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Forbid Alpha"); |
|
|
953 | $table->add_at (1, $row++, new DC::UI::CheckBox |
|
|
954 | state => $CFG->{disable_alpha}, |
|
|
955 | tooltip => "Forbid off the use of the alpha channel. This makes Deliantra look a lot worse " |
|
|
956 | . "by disabling a number of textures and transparency effects. Normally, these " |
|
|
957 | . "effects do not cost a lot of resources, but some graphics cards might fall " |
|
|
958 | . "back to etxremely slow rendering if this is enabled. If disabling this option " |
|
|
959 | . "noticably improves the framerate of the client please report this! " |
|
|
960 | . "<b>If you experience extremely low framerates and your card should do better, try this option.</b>", |
|
|
961 | on_changed => sub { |
|
|
962 | my ($self, $value) = @_; |
929 | my ($self, $value) = @_; |
|
|
930 | |
|
|
931 | $CFG->{sdl_mode} = $self->{range}[0] = $value = int $value; |
|
|
932 | $mode_label->set_text (sprintf '%dx%d@%d+%d', @{$SDL_MODES[$value]}); |
|
|
933 | }); |
|
|
934 | $MODE_SLIDER->emit (changed => $MODE_SLIDER->{range}[0]); |
|
|
935 | |
|
|
936 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Fullscreen"); |
|
|
937 | $table->add_at (1, $row++, $FULLSCREEN_ENABLE = new DC::UI::CheckBox |
|
|
938 | state => $CFG->{fullscreen}, |
|
|
939 | tooltip => "Bring the client into fullscreen mode.", |
|
|
940 | on_changed => sub { my ($self, $value) = @_; $CFG->{fullscreen} = $value; 0 } |
|
|
941 | ); |
|
|
942 | |
|
|
943 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Force OpenGL 1.1"); |
|
|
944 | $table->add_at (1, $row++, new DC::UI::CheckBox |
|
|
945 | state => $CFG->{force_opengl11}, |
|
|
946 | tooltip => "Limit Deliantra to use OpenGL 1.1 features only. This will normally result in " |
|
|
947 | . "higher memory usage and slower performance. It will, however, help tremendously on " |
|
|
948 | . "cards that claim to support a feature but fall back to software rendering. " |
|
|
949 | . "Nvidia Geforce FX cards are known to claim features the hardware doesn't support, " |
|
|
950 | . "but cards and drivers from other vendors (ATI) are often just as bad. " |
|
|
951 | . "<b>If you experience extremely low framerates and your card should do better, try this option.</b>", |
|
|
952 | on_changed => sub { my ($self, $value) = @_; $CFG->{force_opengl11} = $value; 0 } |
|
|
953 | ); |
|
|
954 | |
|
|
955 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Forbid Alpha"); |
|
|
956 | $table->add_at (1, $row++, new DC::UI::CheckBox |
|
|
957 | state => $CFG->{disable_alpha}, |
|
|
958 | tooltip => "Forbid off the use of the alpha channel. This makes Deliantra look a lot worse " |
|
|
959 | . "by disabling a number of textures and transparency effects. Normally, these " |
|
|
960 | . "effects do not cost a lot of resources, but some graphics cards might fall " |
|
|
961 | . "back to extremely slow rendering if this is enabled. If disabling this option " |
|
|
962 | . "noticably improves the framerate of the client please report this! " |
|
|
963 | . "<b>If you experience extremely low framerates and your card should do better, try this option.</b>", |
|
|
964 | on_changed => sub { |
|
|
965 | my ($self, $value) = @_; |
963 | $CFG->{disable_alpha} = $value; |
966 | $CFG->{disable_alpha} = $value; |
964 | $SDL_REINIT = 1; # SDL_SetVideoMode ignores GL attr changes |
967 | $SDL_REINIT = 1; # SDL_SetVideoMode ignores GL attr changes |
|
|
968 | 0 |
965 | 0 |
969 | } |
966 | } |
970 | ); |
967 | ); |
|
|
968 | |
971 | |
969 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Compress Textures"); |
972 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Compress Textures"); |
970 | $table->add_at (1, $row++, new DC::UI::CheckBox |
973 | $table->add_at (1, $row++, new DC::UI::CheckBox |
971 | state => $CFG->{texture_compression}, |
974 | state => $CFG->{texture_compression}, |
972 | tooltip => "Use texture compression. Normally this will not reduce visual quality noticable but " |
975 | tooltip => "Use texture compression. Normally this will not reduce visual quality noticable but " |
973 | . "will save a lot of memory and increase performance (and also fall prey to the ever-buggy Mac OS X software renderer). " |
976 | . "will save a lot of memory and increase performance (and also fall prey to the ever-buggy Mac OS X software renderer). " |
974 | . "The compression algorithm can differ form card to card, so your mileage may vary. This setting is ignored in " |
977 | . "The compression algorithm can differ form card to card, so your mileage may vary. This setting is ignored in " |
975 | . "forced OpenGL 1.1 mode and when using the Apple renderer.", |
978 | . "forced OpenGL 1.1 mode and when using the Apple renderer.", |
976 | on_changed => sub { my ($self, $value) = @_; $CFG->{texture_compression} = $value; 0 } |
979 | on_changed => sub { my ($self, $value) = @_; $CFG->{texture_compression} = $value; 0 } |
977 | ); |
980 | ); |
978 | |
981 | |
979 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Fast & Ugly"); |
982 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Fast & Ugly"); |
980 | $table->add_at (1, $row++, new DC::UI::CheckBox |
983 | $table->add_at (1, $row++, new DC::UI::CheckBox |
981 | state => $CFG->{fast}, |
984 | state => $CFG->{fast}, |
982 | tooltip => "Lower the visual quality considerably to speed up rendering.", |
985 | tooltip => "Lower the visual quality considerably to speed up rendering.", |
983 | on_changed => sub { my ($self, $value) = @_; $CFG->{fast} = $value; 0 } |
986 | on_changed => sub { my ($self, $value) = @_; $CFG->{fast} = $value; 0 } |
984 | ); |
987 | ); |
985 | |
988 | |
986 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "GUI Fontsize"); |
989 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "GUI Fontsize"); |
987 | $table->add_at (1, $row++, new DC::UI::Slider |
990 | $table->add_at (1, $row++, new DC::UI::Slider |
988 | range => [$CFG->{gui_fontsize}, 0.5, 2, 0, 0.1], |
991 | range => [$CFG->{gui_fontsize}, 0.5, 2, 0, 0.1], |
989 | tooltip => "The base font size used by most GUI elements that do not have their own setting.", |
992 | tooltip => "The base font size used by most GUI elements that do not have their own setting.", |
990 | on_changed => sub { $CFG->{gui_fontsize} = $_[1]; 0 }, |
993 | on_changed => sub { $CFG->{gui_fontsize} = $_[1]; 0 }, |
991 | ); |
994 | ); |
992 | |
995 | |
993 | $table->add_at (1, $row++, new DC::UI::Button |
996 | $table->add_at (1, $row++, new DC::UI::Button |
994 | expand => 1, text => "Apply", |
997 | expand => 1, text => "Apply", |
995 | tooltip => "Apply the video settings above.", |
998 | tooltip => "Apply the video settings above.", |
996 | on_activate => sub { |
999 | on_activate => sub { |
997 | video_shutdown (); |
1000 | video_shutdown (); |
998 | video_init (); |
1001 | video_init (); |
|
|
1002 | 0 |
999 | 0 |
1003 | } |
1000 | } |
1004 | ); |
1001 | ); |
1005 | } |
1002 | |
1006 | |
|
|
1007 | { |
|
|
1008 | $vbox->add (my $frame = new DC::UI::FancyFrame expand => 1, label => "Other Settings"); |
|
|
1009 | |
|
|
1010 | $frame->add (my $table = new DC::UI::Table expand => 1, col_expand => [0, 1]); |
|
|
1011 | |
|
|
1012 | my $row = 0; |
1003 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Smooth Movement"); |
1013 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Smooth Movement"); |
1004 | $table->add_at (1, $row++, new DC::UI::CheckBox |
1014 | $table->add_at (1, $row++, new DC::UI::CheckBox |
1005 | state => $CFG->{smooth_movement}, |
1015 | state => $CFG->{smooth_movement}, |
1006 | tooltip => "<b>Smooth Movement</b> tries to make movement, well, smoother, but also increases the framerate. " |
1016 | tooltip => "<b>Smooth Movement</b> tries to make movement, well, smoother, but also increases the framerate. " |
1007 | . "If you have a very slow system, non-accelerated drivers or plain dislike smooth scrolling, " |
1017 | . "If you have a very slow system, non-accelerated drivers or plain dislike smooth scrolling, " |
1008 | . "then disable this option. Changes take effect immdiately.", |
1018 | . "then disable this option. Changes take effect immdiately.", |
1009 | on_changed => sub { my ($self, $value) = @_; $CFG->{smooth_movement} = $value; 0 } |
1019 | on_changed => sub { my ($self, $value) = @_; $CFG->{smooth_movement} = $value; 0 } |
1010 | ); |
1020 | ); |
1011 | |
1021 | |
1012 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Map Scale"); |
1022 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Map Scale"); |
1013 | $table->add_at (1, $row++, new DC::UI::Slider |
1023 | $table->add_at (1, $row++, new DC::UI::Slider |
1014 | range => [(log $CFG->{map_scale}) / (log 2), -3, 1, 0, 1], |
1024 | range => [(log $CFG->{map_scale}) / (log 2), -3, 1, 0, 1], |
1015 | tooltip => "Enlarge or shrink the displayed map. Changes are instant.", |
1025 | tooltip => "Enlarge or shrink the displayed map. Changes are instant.", |
1016 | on_changed => sub { my ($self, $value) = @_; $CFG->{map_scale} = 2 ** $value; 0 } |
1026 | on_changed => sub { my ($self, $value) = @_; $CFG->{map_scale} = 2 ** $value; 0 } |
1017 | ); |
1027 | ); |
1018 | |
1028 | |
1019 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Map Smoothing"); |
1029 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Map Smoothing"); |
1020 | $table->add_at (1, $row++, new DC::UI::CheckBox |
1030 | $table->add_at (1, $row++, new DC::UI::CheckBox |
1021 | state => $CFG->{map_smoothing}, |
1031 | state => $CFG->{map_smoothing}, |
1022 | tooltip => "<b>Map Smoothing</b> tries to make tile borders less square. " |
1032 | tooltip => "<b>Map Smoothing</b> tries to make tile borders less square. " |
1023 | . "This increases load on the graphics subsystem and works only with TRT servers. " |
1033 | . "This increases load on the graphics subsystem and works only with TRT servers. " |
1024 | . "Changes take effect at next login only.", |
1034 | . "Changes take effect at next login only.", |
1025 | on_changed => sub { my ($self, $value) = @_; $CFG->{map_smoothing} = $value; 0 } |
1035 | on_changed => sub { my ($self, $value) = @_; $CFG->{map_smoothing} = $value; 0 } |
1026 | ); |
1036 | ); |
1027 | |
1037 | |
1028 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Fog of War"); |
1038 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Fog of War"); |
1029 | $table->add_at (1, $row++, new DC::UI::CheckBox |
1039 | $table->add_at (1, $row++, new DC::UI::CheckBox |
1030 | state => $CFG->{fow_enable}, |
1040 | state => $CFG->{fow_enable}, |
1031 | tooltip => "<b>Fog-of-War</b> marks areas that cannot be seen by the player. Changes are instant.", |
1041 | tooltip => "<b>Fog-of-War</b> marks areas that cannot be seen by the player. Changes are instant.", |
1032 | on_changed => sub { my ($self, $value) = @_; $CFG->{fow_enable} = $value; 0 } |
1042 | on_changed => sub { my ($self, $value) = @_; $CFG->{fow_enable} = $value; 0 } |
1033 | ); |
1043 | ); |
1034 | |
1044 | |
1035 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "FoW Intensity"); |
1045 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "FoW Intensity"); |
1036 | $table->add_at (1, $row++, new DC::UI::Slider |
1046 | $table->add_at (1, $row++, new DC::UI::Slider |
1037 | range => [$CFG->{fow_intensity}, 0, 1, 0, 1 / 256], |
1047 | range => [$CFG->{fow_intensity}, 0, 1, 0, 1 / 256], |
1038 | tooltip => "<b>Fog of War Lightness.</b> The higher the intensity, the lighter the Fog-of-War color. Changes are instant.", |
1048 | tooltip => "<b>Fog of War Lightness.</b> The higher the intensity, the lighter the Fog-of-War color. Changes are instant.", |
1039 | on_changed => sub { my ($self, $value) = @_; $CFG->{fow_intensity} = $value; 0 } |
1049 | on_changed => sub { my ($self, $value) = @_; $CFG->{fow_intensity} = $value; 0 } |
1040 | ); |
1050 | ); |
1041 | |
1051 | |
1042 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Message Fontsize"); |
1052 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Message Fontsize"); |
1043 | $table->add_at (1, $row++, new DC::UI::Slider |
1053 | $table->add_at (1, $row++, new DC::UI::Slider |
1044 | range => [$CFG->{log_fontsize}, 0.5, 2, 0, 0.1], |
1054 | range => [$CFG->{log_fontsize}, 0.5, 2, 0, 0.1], |
1045 | tooltip => "The font size used by the <b>message/server log</b> window only. Changes are instant, " |
1055 | tooltip => "The font size used by the <b>message/server log</b> window only. Changes are instant, " |
1046 | . "but you still need to press apply to correctly re-layout the widget.", |
1056 | . "but you still need to press apply to correctly re-layout the widget.", |
1047 | on_changed => sub { $MESSAGE_DIST->set_fontsize ($CFG->{log_fontsize} = $_[1]); 0 }, |
1057 | on_changed => sub { $MESSAGE_DIST->set_fontsize ($CFG->{log_fontsize} = $_[1]); 0 }, |
1048 | ); |
1058 | ); |
1049 | |
1059 | |
1050 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Gauge fontsize"); |
1060 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Gauge fontsize"); |
1051 | $table->add_at (1, $row++, new DC::UI::Slider |
1061 | $table->add_at (1, $row++, new DC::UI::Slider |
1052 | range => [$CFG->{gauge_fontsize}, 0.5, 2, 0, 0.1], |
1062 | range => [$CFG->{gauge_fontsize}, 0.5, 2, 0, 0.1], |
1053 | tooltip => "Adjusts the fontsize of the gauges at the bottom right. Changes are instant.", |
1063 | tooltip => "Adjusts the fontsize of the gauges at the bottom right. Changes are instant.", |
1054 | on_changed => sub { |
1064 | on_changed => sub { |
1055 | $CFG->{gauge_fontsize} = $_[1]; |
1065 | $CFG->{gauge_fontsize} = $_[1]; |
1056 | &set_gauge_window_fontsize; |
1066 | &set_gauge_window_fontsize; |
|
|
1067 | 0 |
1057 | 0 |
1068 | } |
1058 | } |
1069 | ); |
1059 | ); |
|
|
1060 | |
1070 | |
1061 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Gauge size"); |
1071 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Gauge size"); |
1062 | $table->add_at (1, $row++, new DC::UI::Slider |
1072 | $table->add_at (1, $row++, new DC::UI::Slider |
1063 | range => [$CFG->{gauge_size}, 0.2, 0.8], |
1073 | range => [$CFG->{gauge_size}, 0.2, 0.8], |
1064 | tooltip => "Adjust the size of the stats gauges at the bottom right. Changes are instant.", |
1074 | tooltip => "Adjust the size of the stats gauges at the bottom right. Changes are instant.", |
1065 | on_changed => sub { |
1075 | on_changed => sub { |
1066 | $CFG->{gauge_size} = $_[1]; |
1076 | $CFG->{gauge_size} = $_[1]; |
1067 | $GAUGES->{win}->set_size ($WIDTH, int $HEIGHT * $CFG->{gauge_size}); |
1077 | $GAUGES->{win}->set_size ($WIDTH, int $HEIGHT * $CFG->{gauge_size}); |
|
|
1078 | 0 |
1068 | 0 |
1079 | } |
1069 | } |
1080 | ); |
1070 | ); |
1081 | } |
1071 | |
1082 | |
1072 | $vbox |
1083 | $vbox |
1073 | } |
1084 | } |
1074 | |
1085 | |
1075 | our $AUDIO_HW_CHUNKSIZE; |
1086 | our $AUDIO_HW_CHUNKSIZE; |