Changeset 317
- Timestamp:
- Mar 19, 2021, 9:59:02 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Integrated.lpi
r292 r317 380 380 <Other> 381 381 <CompilerMessages> 382 <IgnoredMessages idx 5024="True"/>382 <IgnoredMessages idx6058="True" idx5024="True"/> 383 383 </CompilerMessages> 384 384 <CustomOptions Value="-dDEBUG"/> -
trunk/Language.txt
r167 r317 945 945 #SETTINGS 946 946 Full screen 947 Gamma 948 Restart is needed to apply changes -
trunk/Localization/cs/Language.txt
r167 r317 945 945 #SETTINGS 946 946 Celá obrazovka 947 Gamma 948 Pro projevení změn je potřeba restart -
trunk/Packages/CevoComponents/BaseWin.pas
r290 r317 153 153 begin 154 154 if FWindowMode = wmSubmodal then 155 Close 155 Close; 156 156 end; 157 157 … … 316 316 else 317 317 MainTexture := MainTexture; 318 MainTexture := MainTexture 318 MainTexture := MainTexture; 319 319 end; 320 320 Canvas.Font.Assign(UniFont[ftCaption]); … … 330 330 begin 331 331 FrameTop := 0; 332 FrameBottom := ClientHeight 332 FrameBottom := ClientHeight; 333 333 end 334 334 else … … 338 338 FrameBottom := ClientHeight - (WideFrame - NarrowFrame) 339 339 else 340 FrameBottom := ClientHeight 340 FrameBottom := ClientHeight; 341 341 end; 342 342 Fill(Canvas, 3, InnerBottom + 1, ClientWidth - 6, ClientHeight - InnerBottom - … … 386 386 MoveTo(ClientWidth - 3 - ModalFrameIndent, 3); 387 387 LineTo(ClientWidth - 3 - ModalFrameIndent, TitleHeight); 388 end 388 end; 389 389 end 390 390 else … … 441 441 LineTo(ClientWidth - CaptionLeft - 2, FrameBottom - 2); 442 442 end; 443 end 443 end; 444 444 end; 445 445 RisedTextOut(Canvas, Cut - 1, 7, Caption); -
trunk/Packages/CevoComponents/ScreenTools.pas
r316 r317 92 92 procedure VLightGradient(ca: TCanvas; x, y, Height, Color: integer); 93 93 procedure VDarkGradient(ca: TCanvas; x, y, Height, Kind: integer); 94 procedure UnderlinedTitleValue(Canvas: TCanvas; Title, Value: string; X, Y, Width: Integer); 94 95 procedure NumberBar(dst: TBitmap; x, y: integer; Cap: string; val: integer; 95 96 const T: TTexture); … … 1313 1314 Gradient(ca, x, y, 1, 0, 0, Height, 1314 1315 HGrSystem.Data.Canvas.Pixels[187, 137 + Kind], Brightness); 1316 end; 1317 1318 procedure UnderlinedTitleValue(Canvas: TCanvas; Title, Value: string; X, Y, Width: Integer); 1319 begin 1320 DLine(Canvas, X, X + Width, Y + 19, MainTexture.clBevelLight, MainTexture.clBevelShade); 1321 RisedTextOut(Canvas, X, Y, Title); 1322 RisedTextOut(Canvas, X + Width - BiColorTextWidth(Canvas, Value), Y, Value); 1315 1323 end; 1316 1324 -
trunk/Packages/CevoComponents/Sound.pas
r290 r317 11 11 type 12 12 TPlayStyle = (psAsync, psSync); 13 TSoundMode = (smOff, smOn, smOnAlt); 13 14 14 15 { TSoundPlayer } … … 50 51 procedure PreparePlay(Item: string; Index: Integer = -1); 51 52 52 const53 // sound modes54 smOff = 0;55 smOn = 1;56 smOnAlt = 2;57 58 53 var 59 54 Sounds: TStringTable; 60 SoundMode: Integer;55 SoundMode: TSoundMode; 61 56 SoundPlayer: TSoundPlayer; 62 57 SoundList: TFPGObjectList<TSound>; -
trunk/Settings.lfm
r259 r317 14 14 OnPaint = FormPaint 15 15 OnShow = FormShow 16 LCLVersion = '2.0.2.0'17 16 Position = poScreenCenter 18 PixelsPerInch = 9617 LCLVersion = '2.0.12.0' 19 18 Scaled = False 20 19 object List: TListBox 21 20 Tag = 15360 22 21 Left = 24 23 Height = 3 3622 Height = 304 24 23 Top = 16 25 24 Width = 424 … … 68 67 ButtonIndex = 0 69 68 end 69 object Up2Btn: TButtonC 70 Tag = 6912 71 Left = 432 72 Height = 12 73 Top = 328 74 Width = 12 75 Down = False 76 Permanent = False 77 OnClick = Up2BtnClick 78 ButtonIndex = 1 79 end 80 object Down2Btn: TButtonC 81 Tag = 6912 82 Left = 432 83 Height = 12 84 Top = 340 85 Width = 12 86 Down = False 87 Permanent = False 88 OnClick = Down2BtnClick 89 ButtonIndex = 0 90 end 70 91 end -
trunk/Settings.pas
r309 r317 28 28 TSettingsDlg = class(TDrawDlg) 29 29 ButtonFullscreen: TButtonC; 30 Down2Btn: TButtonC; 30 31 List: TListBox; 31 32 OKBtn: TButtonA; 32 33 CancelBtn: TButtonA; 34 Up2Btn: TButtonC; 33 35 procedure ButtonFullscreenClick(Sender: TObject); 34 36 procedure CancelBtnClick(Sender: TObject); 37 procedure Down2BtnClick(Sender: TObject); 35 38 procedure FormCreate(Sender: TObject); 36 39 procedure FormDestroy(Sender: TObject); … … 38 41 procedure FormShow(Sender: TObject); 39 42 procedure OKBtnClick(Sender: TObject); 43 procedure Up2BtnClick(Sender: TObject); 40 44 private 41 { private declarations }45 LocalGamma: Integer; 42 46 public 43 47 Languages: TLanguages; … … 111 115 end; 112 116 117 procedure TSettingsDlg.Down2BtnClick(Sender: TObject); 118 begin 119 if LocalGamma > 50 then 120 begin 121 Dec(LocalGamma); 122 Invalidate; 123 end; 124 end; 125 113 126 procedure TSettingsDlg.ButtonFullscreenClick(Sender: TObject); 114 127 begin … … 139 152 MainTexture.clBevelLight); 140 153 141 s:= Phrases.Lookup('SETTINGS', 0);154 S := Phrases.Lookup('SETTINGS', 0); 142 155 LoweredTextOut(Canvas, -2, MainTexture, ButtonFullscreen.Left + 32, 143 ButtonFullscreen.Top - 4, s); 156 ButtonFullscreen.Top - 4, S); 157 158 // Gamma 159 UnderlinedTitleValue(Canvas, Phrases.Lookup('SETTINGS', 1), IntToStr(LocalGamma) + '%', 160 Up2Btn.Left - 150 - 4, Up2Btn.Top + 2, 150); 144 161 end; 145 162 … … 155 172 SaveData; 156 173 ModalResult := mrOk; 174 end; 175 176 procedure TSettingsDlg.Up2BtnClick(Sender: TObject); 177 begin 178 if LocalGamma < 150 then begin 179 Inc(LocalGamma); 180 Invalidate; 181 end; 157 182 end; 158 183 … … 164 189 if FullScreen then ButtonFullscreen.ButtonIndex := 3 165 190 else ButtonFullscreen.ButtonIndex := 2; 191 LocalGamma := Gamma; 166 192 end; 167 193 168 194 procedure TSettingsDlg.SaveData; 169 begin 195 var 196 NeedRestart: Boolean; 197 begin 198 NeedRestart := Gamma <> LocalGamma; 170 199 LocaleCode := Languages[List.ItemIndex].ShortName; 171 200 FullScreen := (ButtonFullscreen.ButtonIndex and 1) = 1; 201 Gamma := LocalGamma; 202 if NeedRestart then SimpleMessage(Phrases.Lookup('SETTINGS', 2)); 172 203 end; 173 204 -
trunk/Start.pas
r316 r317 894 894 else if Page in [pgStartRandom, pgStartMap] then 895 895 begin 896 DLine(Canvas, 344, 514, y0Mini + 61 + 19, MainTexture.clBevelLight, 897 MainTexture.clBevelShade); 898 RisedTextOut(Canvas, 344, y0Mini + 61, Phrases.Lookup('STARTCONTROLS', 10)); 899 s := TurnToString(MaxTurn); 900 RisedTextOut(Canvas, 514 - BiColorTextWidth(Canvas, s), y0Mini + 61, s); 896 UnderlinedTitleValue(Canvas, Phrases.Lookup('STARTCONTROLS', 10), 897 TurnToString(MaxTurn), 344, y0Mini + 61, 170); 898 901 899 s := Phrases.Lookup('STARTCONTROLS', 7); 902 900 w := Canvas.TextWidth(s); … … 974 972 s := IntToStr(nMapStartPositions - 1); 975 973 RisedTextOut(Canvas, 198 - BiColorTextWidth(Canvas, s), yMain + 140, s); 974 976 975 DLine(Canvas, 24, xDefault - 6, yMain + 164 + 19, 977 976 MainTexture.clBevelLight, MainTexture.clBevelShade); … … 986 985 DLine(Canvas, 56, 272, y0Mini + 61 + 19, MainTexture.clBevelLight, 987 986 MainTexture.clBevelShade); 987 988 988 RisedTextOut(Canvas, 56, y0Mini + 61, 989 989 Phrases.Lookup('STARTCONTROLS', 14)); … … 1024 1024 else if Page = pgEditRandom then 1025 1025 begin 1026 DLine(Canvas, 344, 514, y0Mini - 77 + 19, MainTexture.clBevelLight, 1027 MainTexture.clBevelShade); 1028 RisedTextOut(Canvas, 344, y0Mini - 77, Phrases.Lookup('STARTCONTROLS', 5)); 1029 s := IntToStr((WorldSizes[WorldSize].X * WorldSizes[WorldSize].Y * 20 + 1030 DefaultWorldTiles div 2) div DefaultWorldTiles * 5) + '%'; 1031 RisedTextOut(Canvas, 514 - BiColorTextWidth(Canvas, s), y0Mini - 77, s); 1032 DLine(Canvas, 344, 514, y0Mini + 61 + 19, MainTexture.clBevelLight, 1033 MainTexture.clBevelShade); 1034 RisedTextOut(Canvas, 344, y0Mini + 61, Phrases.Lookup('STARTCONTROLS', 6)); 1035 s := IntToStr(StartLandMass) + '%'; 1036 RisedTextOut(Canvas, 514 - BiColorTextWidth(Canvas, s), y0Mini + 61, s); 1026 UnderlinedTitleValue(Canvas, Phrases.Lookup('STARTCONTROLS', 5), 1027 IntToStr((WorldSizes[WorldSize].X * WorldSizes[WorldSize].Y * 20 + 1028 DefaultWorldTiles div 2) div DefaultWorldTiles * 5) + '%', 1029 344, y0Mini - 77, 170); 1030 UnderlinedTitleValue(Canvas, Phrases.Lookup('STARTCONTROLS', 6), 1031 IntToStr(StartLandMass) + '%', 344, y0Mini + 61, 170); 1037 1032 end 1038 1033 else if Page = pgEditMap then
Note:
See TracChangeset
for help on using the changeset viewer.