Changeset 681
- Timestamp:
- Jul 26, 2025, 6:31:47 PM (12 hours ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Language.txt
r676 r681 968 968 DPI 969 969 Music 970 Volume -
trunk/Localization/cs/Language.txt
r676 r681 968 968 DPI 969 969 Hudba 970 Hlasitost -
trunk/Localization/de/Language.txt
r676 r681 986 986 DPI 987 987 Musik 988 Volume -
trunk/Localization/fr/Language.txt
r676 r681 968 968 DPI 969 969 Musique 970 Volume -
trunk/Localization/it/Language.txt
r676 r681 958 958 DPI 959 959 Musica 960 Volume -
trunk/Localization/ru/Language.txt
r676 r681 993 993 DPI 994 994 Музыка 995 Volume -
trunk/Localization/zh-Hans/Language.txt
r676 r681 985 985 DPI 986 986 Music 987 Volume -
trunk/Localization/zh-Hant/Language.txt
r676 r681 985 985 DPI 986 986 Music 987 Volume -
trunk/Settings.lfm
r674 r681 15 15 FormStyle = fsStayOnTop 16 16 Position = poScreenCenter 17 LCLVersion = '4. 0.0.4'17 LCLVersion = '4.2.0.0' 18 18 Scaled = False 19 19 OnClose = FormClose … … 63 63 end 64 64 object ButtonFullscreen: TButtonC 65 Left = 1 665 Left = 176 66 66 Height = 18 67 Top = 36 867 Top = 366 68 68 Width = 18 69 69 Down = False … … 161 161 object ButtonMusicVolumeDown: TButtonC 162 162 Tag = 6912 163 Left = 1 36164 Height = 12 165 Top = 3 40163 Left = 144 164 Height = 12 165 Top = 372 166 166 Width = 12 167 167 Down = False … … 172 172 object ButtonMusicVolumeUp: TButtonC 173 173 Tag = 6912 174 Left = 1 36175 Height = 12 176 Top = 3 28174 Left = 144 175 Height = 12 176 Top = 360 177 177 Width = 12 178 178 Down = False … … 180 180 OnClick = ButtonMusicVolumeUpClick 181 181 ButtonIndex = 1 182 end 183 object ButtonMusic: TButtonC 184 Left = 16 185 Height = 18 186 Top = 334 187 Width = 18 188 Down = False 189 Permanent = False 190 OnClick = ButtonMusicClick 191 ButtonIndex = 0 182 192 end 183 193 object EditShortCutPrimary: TEdit -
trunk/Settings.pas
r674 r681 13 13 14 14 TSettingsDlg = class(TDrawDlg) 15 ButtonMusic: TButtonC; 15 16 ButtonMusicVolumeDown: TButtonC; 16 17 ButtonMusicVolumeUp: TButtonC; … … 33 34 procedure ButtonFullscreenClick(Sender: TObject); 34 35 procedure ButtonCancelClick(Sender: TObject); 36 procedure ButtonMusicClick(Sender: TObject); 35 37 procedure ButtonMusicVolumeDownClick(Sender: TObject); 36 38 procedure ButtonMusicVolumeUpClick(Sender: TObject); … … 54 56 LocalGamma: Integer; 55 57 LocalKeyBindings: TKeyBindings; 58 LocalMusicEnabled: Integer; 56 59 LocalMusicVolume: Integer; 57 60 CurrentKeyBinding: TKeyBinding; … … 59 62 procedure UpdateShortCutItem; 60 63 function GetLocalCustomDpiEnabled: Boolean; 64 function GetLocalMusicEnabled: Boolean; 61 65 procedure UpdateInterface; 62 66 public … … 86 90 var 87 91 SFullScreen, SGamma, SRestartMsg, SShortCutPrimary, SShortCutSecondary, 88 SLanguages, SKeyBindings, SCustomDpi, SDpi, SMusic : string;92 SLanguages, SKeyBindings, SCustomDpi, SDpi, SMusic, SMusicVolume: string; 89 93 90 94 procedure ReloadLanguages; … … 100 104 SDpi := Phrases.Lookup('SETTINGS', 8); 101 105 SMusic := Phrases.Lookup('SETTINGS', 9); 106 SMusicVolume := Phrases.Lookup('SETTINGS', 10); 102 107 end; 103 108 … … 123 128 end; 124 129 130 procedure TSettingsDlg.ButtonMusicClick(Sender: TObject); 131 begin 132 ButtonMusic.ButtonIndex := ButtonMusic.ButtonIndex xor 1; 133 UpdateInterface; 134 end; 135 125 136 procedure TSettingsDlg.ButtonMusicVolumeDownClick(Sender: TObject); 126 137 begin … … 142 153 ListLanguages.ItemIndex := 0; 143 154 ButtonFullscreen.ButtonIndex := 3; 155 ButtonMusic.ButtonIndex := 3; 144 156 LocalMusicVolume := 50; 145 157 ButtonCustomDpi.ButtonIndex := 2; … … 258 270 {$ENDIF} 259 271 260 UnderlinedTitleValue(Canvas, SMusic, IntToStr(LocalMusicVolume) + '%', 272 RFrame(Canvas, ButtonMusic.Left - 1, ButtonMusic.Top - 1, 273 ButtonMusic.Left + 12, ButtonMusic.Top + 12, MainTexture.ColorBevelShade, 274 MainTexture.ColorBevelLight); 275 LoweredTextOut(Canvas, -2, MainTexture, ButtonMusic.Left + TextDistanceX, 276 ButtonMusic.Top - 4, SMusic); 277 UnderlinedTitleValue(Canvas, SMusicVolume, IntToStr(LocalMusicVolume) + '%', 261 278 ButtonMusicVolumeUp.Left - UpDownTextWidth - 4, ButtonMusicVolumeUp.Top + 2, UpDownTextWidth); 262 279 … … 367 384 end; 368 385 386 function TSettingsDlg.GetLocalMusicEnabled: Boolean; 387 begin 388 Result := (ButtonMusic.ButtonIndex and 1) = 1; 389 end; 390 369 391 procedure TSettingsDlg.UpdateInterface; 370 392 begin 371 393 ButtonDpiUp.Enabled := GetLocalCustomDpiEnabled; 372 394 ButtonDpiDown.Enabled := GetLocalCustomDpiEnabled; 395 ButtonMusicVolumeDown.Enabled := GetLocalMusicEnabled; 396 ButtonMusicVolumeUp.Enabled := GetLocalMusicEnabled; 373 397 end; 374 398 … … 381 405 if FullScreen then ButtonFullscreen.ButtonIndex := 3 382 406 else ButtonFullscreen.ButtonIndex := 2; 383 if MusicEnabled then LocalMusicVolume := Round(MusicVolume * 100) 384 else LocalMusicVolume := 0; 407 if MusicEnabled then ButtonMusic.ButtonIndex := 3 408 else ButtonMusic.ButtonIndex := 2; 409 LocalMusicVolume := Round(MusicVolume * 100); 385 410 LocalGamma := Gamma; 386 411 LocalKeyBindings.Assign(KeyBindings.KeyBindings); … … 406 431 end; 407 432 FullScreen := (ButtonFullscreen.ButtonIndex and 1) = 1; 408 MusicEnabled := LocalMusicVolume > 0;433 MusicEnabled := GetLocalMusicEnabled; 409 434 MusicVolume := LocalMusicVolume / 100; 410 435 Gamma := LocalGamma;
Note:
See TracChangeset
for help on using the changeset viewer.