Changeset 473
- Timestamp:
- Dec 4, 2023, 12:13:15 PM (13 months ago)
- Location:
- trunk
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Integrated.lpi
r469 r473 77 77 </Item2> 78 78 <SharedMatrixOptions Count="2"> 79 <Item1 ID="151739052537" Targets="CevoComponents,Common,DpiControls" Modes="Debug" Value="-g -gl -gh -O1 "/>79 <Item1 ID="151739052537" Targets="CevoComponents,Common,DpiControls" Modes="Debug" Value="-g -gl -gh -O1 -dDPI"/> 80 80 <Item2 ID="186701832267" Targets="CevoComponents,Common,DpiControls" Modes="Release" Value="-CX -XX -O3"/> 81 81 </SharedMatrixOptions> … … 415 415 <IgnoredMessages idx6058="True" idx5024="True"/> 416 416 </CompilerMessages> 417 <CustomOptions Value="-dDEBUG"/> 417 <CustomOptions Value="-dDEBUG 418 -dDPI"/> 418 419 <OtherDefines Count="2"> 419 420 <Define0 Value="DEBUG"/> -
trunk/Integrated.lpr
r471 r473 8 8 Interfaces, SysUtils, Protocol, GameServer, Direct, Start, Messg, Inp, 9 9 Back, Log, LocalPlayer, ClientTools, Tribes, IsoEngine, Term, CityScreen, Nego, 10 NoTerm, ScreenTools, Directories, 10 NoTerm, ScreenTools, Directories, Global, 11 11 {$IFDEF DPI}Dpi.Forms{$ELSE}Forms{$ENDIF}; 12 12 … … 29 29 Application.Title := 'C-evo'; 30 30 Application.TaskBarBehavior := TTaskBarBehavior.tbMultiButton; 31 ScreenTools.LoadConfig(AppRegistryKey); 31 32 Directories.UnitInit; 32 33 ScreenTools.UnitInit; -
trunk/Language.txt
r426 r473 167 167 #EXPEL Units have been expelled from #a territory. 168 168 #DISPOSE %s\\Shall we rebuild this building? 169 #SPDESTRUCTQUERY \(Note: We will lose control of our colony ship when we dismantle the space port!) 169 #SPDESTRUCTQUERY \(Note: We will lose control of our colony ship when we dismantle the space port!) 170 170 #SELL %s\\Shall we sell this building? 171 171 #LOSEMAT A complete change in project type means to start a new project. %d%%p will be sold for %d%%c. 172 172 #LOSEMAT3 Changing the project will result in a loss of 1/3 of the material collected for the project. Continue? 173 #DOUBLESTATEIMP %s\\This state improvement already exists in the city of %s. Shall we move it to this city and sell the former building when finished? 173 #DOUBLESTATEIMP %s\\This state improvement already exists in the city of %s. Shall we move it to this city and sell the former building when finished? 174 174 #READY The project will be completed next turn. 175 175 #NOMONEY We don't have enough money\to complete this project next turn.\(%d%%c needed, %d%%c available) … … 180 180 #GLIDERLOST Our glider was lost at sea. 181 181 #PLANELOST Our aircraft has run out of fuel. 182 #DAMAGED_UTILIZE Utilizing a damaged unit has reduced benefit. Continue? 182 #DAMAGED_UTILIZE Utilizing a damaged unit has reduced benefit. Continue? 183 183 #NOBB We lack the technology of building bridges across rivers. 184 184 #NOCITY This type of terrain is not suitable for settlement. We should look for terrain that allows irrigation. … … 257 257 #SHAREDWIN_CONCAT %s, %s 258 258 #NOAI No AI installed! 259 #FILENOTFOUND File "%s" was not found. 259 #FILENOTFOUND File "%s" was not found. 260 260 #AIEXCEPTION Unhandled exception in AI module %s! 261 261 #LOADERR This book is not compatible with this version of C-evo. … … 291 291 #MAX2OFFERS You can't combine more than two offers in one proposal. 292 292 #NOOFFER This proposal is invalid! 293 #CANCELTREATYRUSH Cancelling more than one treaty with the same nation within 3 turns is not allowed. 294 #NOSPACEPORT We do not have a space port, so we'd lose all colony ship parts that we receive. Continue anyway? 293 #CANCELTREATYRUSH Cancelling more than one treaty with the same nation within 3 turns is not allowed. 294 #NOSPACEPORT We do not have a space port, so we'd lose all colony ship parts that we receive. Continue anyway? 295 295 #SUICIDE Shall we send these\men to death? 296 296 #RATES What shall we orient\our economy towards? … … 806 806 Fortified 807 807 Bomber armed 808 Moving in mountains 808 Moving in mountains 809 809 Conscripts 810 810 Withdrawn … … 960 960 Languages 961 961 Key bindings 962 Custom DPI 963 DPI -
trunk/LocalPlayer/MessgEx.pas
r471 r473 103 103 else 104 104 Button1.Left := 159; 105 RemoveBtn.Left := ClientWidth - 38;105 RemoveBtn.Left := Width - 38; 106 106 case Kind of 107 107 mkYesNo, mkYesNoCancel: … … 151 151 152 152 SplitText(True); 153 ClientHeight := 72 + Border + TopSpace + Lines * MessageLineSpacing;153 Height := 72 + Border + TopSpace + Lines * MessageLineSpacing; 154 154 if GameMode = cMovie then 155 ClientHeight := ClientHeight - 32;155 Height := Height - 32; 156 156 if Kind = mkModel then 157 ClientHeight := ClientHeight + 36;157 Height := Height + 36; 158 158 if IconKind in [mikMyArmy, mikEnemyArmy] then 159 159 begin 160 160 if nLostArmy > LostUnitsPerLine * 6 then 161 ClientHeight := ClientHeight + 6 * 48161 Height := Height + 6 * 48 162 162 else 163 ClientHeight := ClientHeight + ((nLostArmy - 1) div LostUnitsPerLine163 Height := Height + ((nLostArmy - 1) div LostUnitsPerLine 164 164 + 1) * 48; 165 165 end; … … 167 167 0: 168 168 begin 169 Left := (Screen.Width - ClientWidth) div 2;170 Top := (Screen.Height - ClientHeight) div 2 - MapCenterUp;169 Left := (Screen.Width - Width) div 2; 170 Top := (Screen.Height - Height) div 2 - MapCenterUp; 171 171 end; 172 172 1: 173 173 begin 174 Left := (Screen.Width - ClientWidth) div 4;175 Top := (Screen.Height - ClientHeight) * 2 div 3 - MapCenterUp;174 Left := (Screen.Width - Width) div 4; 175 Top := (Screen.Height - Height) * 2 div 3 - MapCenterUp; 176 176 end; 177 177 -1: 178 178 begin 179 Left := (Screen.Width - ClientWidth) div 4;180 Top := (Screen.Height - ClientHeight) div 3 - MapCenterUp;179 Left := (Screen.Width - Width) div 4; 180 Top := (Screen.Height - Height) div 3 - MapCenterUp; 181 181 end; 182 182 end; 183 183 for I := 0 to ControlCount - 1 do 184 Controls[I].Top := ClientHeight - (34 + Border);184 Controls[I].Top := Height - (34 + Border); 185 185 if Kind = mkModel then 186 EInput.Top := ClientHeight - (76 + Border);186 EInput.Top := Height - (76 + Border); 187 187 end; 188 188 … … 321 321 for count := 0 to LostArmy[emix] - 1 do 322 322 begin 323 X := ClientWidth div 2 + ix * 64 - UnitsInLine * 32;323 X := Width div 2 + ix * 64 - UnitsInLine * 32; 324 324 Y := 26 + Border + TopSpace + Lines * MessageLineSpacing + iy * 48; 325 325 with MyRO.EnemyModel[emix], Tribe[Owner].ModelPicture[mix] do … … 371 371 BitBltCanvas(Buffer.Canvas, 0, 0, xSizeBig + 2 * GlowRange, 372 372 ySizeBig + 2 * GlowRange, Canvas, 373 ClientWidth div 2 - (28 + GlowRange), 24 - GlowRange);373 Width div 2 - (28 + GlowRange), 24 - GlowRange); 374 374 BitBltCanvas(Buffer.Canvas, GlowRange, GlowRange, xSizeBig, ySizeBig, 375 375 BigImp.Canvas, IconIndex mod 7 * xSizeBig, … … 380 380 GlowFrame(Buffer, GlowRange, GlowRange, xSizeBig, ySizeBig, 381 381 Tribe[p1].Color); 382 BitBltCanvas(Canvas, ClientWidth div 2 - (28 + GlowRange),382 BitBltCanvas(Canvas, Width div 2 - (28 + GlowRange), 383 383 24 - GlowRange, xSizeBig + 2 * GlowRange, ySizeBig + 2 * GlowRange, 384 384 Buffer.Canvas, 0, 0); 385 385 end 386 386 else 387 ImpImage(Canvas, ClientWidth div 2 - 28, 24, IconIndex);387 ImpImage(Canvas, Width div 2 - 28, 24, IconIndex); 388 388 mikAge: 389 389 begin 390 390 if IconIndex = 0 then 391 ImpImage(Canvas, ClientWidth div 2 - 28, 24, -7)391 ImpImage(Canvas, Width div 2 - 28, 24, -7) 392 392 else 393 ImpImage(Canvas, ClientWidth div 2 - 28, 24, 24 + IconIndex)393 ImpImage(Canvas, Width div 2 - 28, 24, 24 + IconIndex) 394 394 end; 395 395 mikModel: 396 396 with Tribe[Me].ModelPicture[IconIndex] do 397 397 begin 398 FrameImage(Canvas, BigImp, ClientWidth div 2 - 28, 24, xSizeBig,398 FrameImage(Canvas, BigImp, Width div 2 - 28, 24, xSizeBig, 399 399 ySizeBig, 0, 0); 400 BitBltCanvas(Canvas, ClientWidth div 2 - 32, 20, 64, 44,400 BitBltCanvas(Canvas, Width div 2 - 32, 20, 64, 44, 401 401 HGr.Mask.Canvas, pix mod 10 * 65 + 1, 402 402 pix div 10 * 49 + 1, SRCAND); 403 BitBltCanvas(Canvas, ClientWidth div 2 - 32, 20, 64, 44,403 BitBltCanvas(Canvas, Width div 2 - 32, 20, 64, 44, 404 404 HGr.Data.Canvas, pix mod 10 * 65 + 1, 405 405 pix div 10 * 49 + 1, SRCPAINT); 406 406 end; 407 407 mikBook: 408 PaintBook(Canvas, ClientWidth div 2, 24, MainTexture.ColorPage,408 PaintBook(Canvas, Width div 2, 24, MainTexture.ColorPage, 409 409 MainTexture.ColorCover); 410 410 mikTribe: 411 411 if Assigned(Tribe[IconIndex].faceHGr) then 412 412 begin 413 Frame(Canvas, ClientWidth div 2 - 32 - 1, 24 - 1,414 ClientWidth div 2 + 32, 24 + 48, $000000, $000000);415 BitBltCanvas(Canvas, ClientWidth div 2 - 32, 24, 64, 48,413 Frame(Canvas, Width div 2 - 32 - 1, 24 - 1, 414 Width div 2 + 32, 24 + 48, $000000, $000000); 415 BitBltCanvas(Canvas, Width div 2 - 32, 24, 64, 48, 416 416 Tribe[IconIndex].faceHGr.Data.Canvas, 417 417 1 + Tribe[IconIndex].facepix mod 10 * 65, … … 419 419 end; 420 420 mikPureIcon: 421 FrameImage(Canvas, BigImp, ClientWidth div 2 - 28, 24, xSizeBig, ySizeBig,421 FrameImage(Canvas, BigImp, Width div 2 - 28, 24, xSizeBig, ySizeBig, 422 422 IconIndex mod 7 * xSizeBig, IconIndex div 7 * ySizeBig); 423 423 mikBigIcon: 424 FrameImage(Canvas, BigImp, ClientWidth div 2 - 3 * 28, 32, xSizeBig * 3,424 FrameImage(Canvas, BigImp, Width div 2 - 3 * 28, 32, xSizeBig * 3, 425 425 ySizeBig * 3, IconIndex mod 2 * 3 * xSizeBig, 426 426 IconIndex div 2 * 3 * ySizeBig); … … 428 428 begin 429 429 BitBltCanvas(Buffer.Canvas, 0, 0, 140, 120, Canvas, 430 ( ClientWidth - 140) div 2, 24);430 (Width - 140) div 2, 24); 431 431 ImageOp_BCC(Buffer, Templates.Data, Point(0, 0), StarshipDeparted.BoundsRect, 0, $FFFFFF); 432 BitBltCanvas(Canvas, ( ClientWidth - 140) div 2, 24, 140, 120,432 BitBltCanvas(Canvas, (Width - 140) div 2, 24, 140, 120, 433 433 Buffer.Canvas, 0, 0); 434 434 end; … … 438 438 PaintEnemyArmy; 439 439 mikFullControl: 440 Sprite(Canvas, HGrSystem2, ClientWidth div 2 - 31, 24, 63, 63, 1, 281);440 Sprite(Canvas, HGrSystem2, Width div 2 - 31, 24, 63, 63, 1, 281); 441 441 mikShip: 442 PaintColonyShip(Canvas, IconIndex, 17, ClientWidth - 34, 38);442 PaintColonyShip(Canvas, IconIndex, 17, Width - 34, 38); 443 443 end; 444 444 -
trunk/LocalPlayer/Select.pas
r471 r473 180 180 if S <> '' then 181 181 LoweredTextOut(Canvas, -1, MainTexture, 182 ( ClientWidth - BiColorTextWidth(Canvas, S)) div 2, 31, S);182 (Width - BiColorTextWidth(Canvas, S)) div 2, 31, S); 183 183 if not MultiPage and (Kind in [kProject, kAdvance, kFarAdvance]) and not Phrases2FallenBackToEnglish 184 184 then … … 186 186 S := Phrases2.Lookup('SHIFTCLICK'); 187 187 LoweredTextOut(Canvas, -2, MainTexture, 188 ( ClientWidth - BiColorTextWidth(Canvas, S)) div 2, ClientHeight - 29, S);188 (Width - BiColorTextWidth(Canvas, S)) div 2, Height - 29, S); 189 189 end; 190 190 end; … … 231 231 if Y + TextSize.cy >= TitleHeight + InnerHeight then 232 232 TextSize.cy := TitleHeight + InnerHeight - Y; 233 Fill(ca, X, Y, TextSize.cx, TextSize.cy, (Maintexture.Width - ClientWidth)234 div 2, (Maintexture.Height - ClientHeight) div 2);233 Fill(ca, X, Y, TextSize.cx, TextSize.cy, (Maintexture.Width - Width) 234 div 2, (Maintexture.Height - Height) div 2); 235 235 end; 236 236 LoweredTextOut(ca, Color, MainTexture, X, Y, S); … … 811 811 if ScienceNation <> OldScienceNation then 812 812 begin 813 Fill(Canvas, 9, ClientHeight - 29, ClientWidth - 18, 24,814 (Maintexture.Width - ClientWidth) div 2,815 (Maintexture.Height - ClientHeight) div 2);813 Fill(Canvas, 9, Height - 29, Width - 18, 24, 814 (Maintexture.Width - Width) div 2, 815 (Maintexture.Height - Height) div 2); 816 816 if ScienceNation >= 0 then 817 817 begin … … 823 823 S := S + ' (' + TurnToString(MyRO.EnemyReport[ScienceNation] 824 824 .TurnOfCivilReport) + ')'; // old report 825 xScreen := ( ClientWidth - BiColorTextWidth(Canvas, S)) div 2;825 xScreen := (Width - BiColorTextWidth(Canvas, S)) div 2; 826 826 LoweredTextOut(Canvas, -1, MainTexture, xScreen + 10, 827 ClientHeight - 29, S);827 Height - 29, S); 828 828 BitBltCanvas(ScienceNationDotBuffer.Canvas, 0, 0, ScienceNationDot.Width, 829 ScienceNationDot.Height, Canvas, xScreen - 10, ClientHeight - 27);829 ScienceNationDot.Height, Canvas, xScreen - 10, Height - 27); 830 830 ImageOp_BCC(ScienceNationDotBuffer, Templates.Data, Point(0, 0), 831 831 ScienceNationDot.BoundsRect, MainTexture.ColorBevelShade, Tribe[ScienceNation].Color); 832 BitBltCanvas(Canvas, xScreen - 10, ClientHeight - 27, ScienceNationDot.Width,832 BitBltCanvas(Canvas, xScreen - 10, Height - 27, ScienceNationDot.Width, 833 833 ScienceNationDot.Height, ScienceNationDotBuffer.Canvas, 0, 0); 834 834 end; … … 1577 1577 DispLines := MaxLines; 1578 1578 InnerHeight := LineDistance * (DispLines + 1) + 24; 1579 ClientHeight := InnerHeight + TitleHeight + WideFrame;1579 Height := InnerHeight + TitleHeight + WideFrame; 1580 1580 end 1581 1581 else … … 1584 1584 DispLines := MaxLines; 1585 1585 InnerHeight := LineDistance * (DispLines + 1) + 24; 1586 ClientHeight := InnerHeight + TitleHeight + NarrowFrame;1587 end; 1588 Assert( ClientHeight <= Maintexture.Height);1586 Height := InnerHeight + TitleHeight + NarrowFrame; 1587 end; 1588 Assert(Height <= Maintexture.Height); 1589 1589 1590 1590 TechNameSpace := 224; … … 1618 1618 InnerWidth := 363; 1619 1619 end; 1620 ClientWidth := InnerWidth + 2 * SideFrame;1621 1622 CloseBtn.Left := ClientWidth - 38;1620 Width := InnerWidth + 2 * SideFrame; 1621 1622 CloseBtn.Left := Width - 38; 1623 1623 CaptionLeft := ToggleBtn.Left + ToggleBtn.Width; 1624 1624 CaptionRight := CloseBtn.Left; … … 1645 1645 if Kind = kProject then 1646 1646 begin 1647 Layer0Btn.Top := ClientHeight - 31;1648 Layer0Btn.Left := ClientWidth div 2 - (12 + 29);1647 Layer0Btn.Top := Height - 31; 1648 Layer0Btn.Left := Width div 2 - (12 + 29); 1649 1649 Layer0Btn.Down := True; 1650 Layer1Btn.Top := ClientHeight - 31;1651 Layer1Btn.Left := ClientWidth div 2 - (12 - 29);1650 Layer1Btn.Top := Height - 31; 1651 Layer1Btn.Left := Width div 2 - (12 - 29); 1652 1652 Layer1Btn.Down := False; 1653 Layer2Btn.Top := ClientHeight - 31;1654 Layer2Btn.Left := ClientWidth div 2 - 12;1653 Layer2Btn.Top := Height - 31; 1654 Layer2Btn.Left := Width div 2 - 12; 1655 1655 Layer2Btn.Down := False; 1656 1656 end; … … 1667 1667 var 1668 1668 I: Integer; 1669 ShowFocus, forceclose: Boolean;1670 begin 1671 forceclose := (ListKind <> Kind) and1669 ShowFocus, ForceClose: Boolean; 1670 begin 1671 ForceClose := (ListKind <> Kind) and 1672 1672 not((Kind = kCities) and (ListKind = kCityEvents)) and 1673 1673 not((Kind = kCityEvents) and (ListKind = kCities)) and … … 1746 1746 CloseBtn.Visible := not(Kind in MustChooseKind); 1747 1747 1748 inherited ShowNewContent(NewMode, forceclose);1748 inherited ShowNewContent(NewMode, ForceClose); 1749 1749 end; 1750 1750 -
trunk/Localization/cs/Language.txt
r436 r473 167 167 #EXPEL Jednotky byly vyhnány z #e území. 168 168 #DISPOSE %s\\Máme přestavět tuto budovu? 169 #SPDESTRUCTQUERY \(Poznámka: Pokud zbouráme vesmírné středisko, ztratíme kontrolu nad naší kolonizační lodí!) 169 #SPDESTRUCTQUERY \(Poznámka: Pokud zbouráme vesmírné středisko, ztratíme kontrolu nad naší kolonizační lodí!) 170 170 #SELL %s\\Máme prodat tuto budovu? 171 171 #LOSEMAT Úplná změna projektu znamená zahájení nového projektu. %d%%p bude prodán za %d%%c. 172 172 #LOSEMAT3 Změna projektu bude znamenat ztrátu 1/3 spotřebovaného materiálu. Chcete pokračovat? 173 #DOUBLESTATEIMP %s\\Toto národní vylepšení již postavilo město %s. Máme je sem přesunout a po dokončení stavby prodat národní vylepšení v původním městě? 173 #DOUBLESTATEIMP %s\\Toto národní vylepšení již postavilo město %s. Máme je sem přesunout a po dokončení stavby prodat národní vylepšení v původním městě? 174 174 #READY Projekt bude dokončen v příštím kole. 175 175 #NOMONEY Nemáme dost peněz, abychom\projekt dokončili v dalším tahu.\(%d%%c potřeba, %d%%c k dispozici) … … 180 180 #GLIDERLOST Náš kluzák se ztratil nad mořem. 181 181 #PLANELOST Našemu letadlu došlo palivo. 182 #DAMAGED_UTILIZE Využití poškozené jednotky nám přinese méně zisku. Chcete pokračovat? 182 #DAMAGED_UTILIZE Využití poškozené jednotky nám přinese méně zisku. Chcete pokračovat? 183 183 #NOBB Schází nám technologie pro budování mostů přes řeky. 184 184 #NOCITY Tento typ terénu není vhodný k osídlení. Měli bychom vyhledat místa, na kterých můžeme postavit zavlažování. … … 257 257 #SHAREDWIN_CONCAT %s, %s 258 258 #NOAI Není nainstalován žádný AI modul! 259 #FILENOTFOUND Soubor "%s" nebyl nalezen. 259 #FILENOTFOUND Soubor "%s" nebyl nalezen. 260 260 #AIEXCEPTION Došlo k výjimce v AI modulu %s! 261 261 #LOADERR Tato kniha není kompatibilní s touto verzí C-evo. … … 291 291 #MAX2OFFERS Nelze kombinovat více než dvě nabídky v jednom návrhu. 292 292 #NOOFFER Tento návrh není platný! 293 #CANCELTREATYRUSH Není povoleno během 3 tahů ukončit více než jednu smlouvu se stejným národem. 293 #CANCELTREATYRUSH Není povoleno během 3 tahů ukončit více než jednu smlouvu se stejným národem. 294 294 #NOSPACEPORT Nemáme vesmírné středisko, takže bychom ztratili všechny dojednané části kolonizační lodi. Chcete přesto pokračovat? 295 295 #SUICIDE Máme poslat tyto\muže na smrt? … … 806 806 Opevněný 807 807 Bomby 808 Pohyb v horách 808 Pohyb v horách 809 809 Branci 810 810 Odvolaný … … 960 960 Jazyky 961 961 Klávesové zkratky 962 Vlastní DPI 963 DPI -
trunk/Localization/de/Language.txt
r426 r473 164 164 #EXPEL Unsere Einheiten wurden vom Territorium der #S ausgewiesen. 165 165 #DISPOSE %s abreißen und 2/3 der %%p\\der aktuellen Produktion zuführen? 166 #SPDESTRUCTQUERY \(Anmerkung: Wir verlieren alle Bauteile des Raumschiffs, falls wir den Weltraumbahnhof demontieren!) 166 #SPDESTRUCTQUERY \(Anmerkung: Wir verlieren alle Bauteile des Raumschiffs, falls wir den Weltraumbahnhof demontieren!) 167 167 #SELL %s\\Dieses Bauwerk verkaufen? 168 168 #LOSEMAT Ein Wechsel in einen anderen Projekttyp startet ein neues Projekt. Die %d%%p werden in %d%%c umgewandelt. Weiter? … … 231 231 #FAMINE_TILES Vorsicht!\Die Stadt %s steht kurz vor einer Hungersnot. Es sind zu zuwenig fruchtbare Landschaften verfügbar.\Einfach weitermachen wie bisher? 232 232 #FAMINE_UNREST Vorsicht!\Die Stadt %s steht kurz vor einer Hungersnot. Teile der Bevölkerung verlangen einen verstärkten Polizeieinsatz zur Bekämpfung der Unruhen. Die Schwächung der Wirtschaft hat ein solches Ausmaß erreicht, dass nicht mehr genug Nahrung produziert wird.\\Einfach weitermachen wie bisher? 233 #LOWSUPPORT Achtung!\Die Stadt %s produziert nicht genug Material um alle ihre Einheiten unterstützen zu können. Trotzdem weitermachen wie bisher? 233 #LOWSUPPORT Achtung!\Die Stadt %s produziert nicht genug Material um alle ihre Einheiten unterstützen zu können. Trotzdem weitermachen wie bisher? 234 234 #LOWSUPPORT_TILES Achtung!\Die Stadt %s produziert nicht genug Material um alle ihre Einheiten unterstützen zu können. Es sind zu zuwenig produktive Landschaften verfügbar.\Einfach weitermachen wie bisher? 235 235 #LOWSUPPORT_UNREST Achtung!\Die Stadt %s produziert nicht genug Material um alle ihre Einheiten unterstützen zu können. Teile der Bevölkerung verlangen einen verstärkten Polizeieinsatz zur Bekämpfung der Unruhen. Die Schwächung der Wirtschaft hat ein solches Ausmaß erreicht, dass nicht mehr genug Material produziert wird.\\Einfach weitermachen wie bisher? … … 254 254 #SHAREDWIN_CONCAT %s, %s 255 255 #NOAI Es ist keine KI installiert! 256 #FILENOTFOUND Die Datei "%s" wurde nicht gefunden. 256 #FILENOTFOUND Die Datei "%s" wurde nicht gefunden. 257 257 #AIEXCEPTION Unerwarteter Fehler im KI module %s! 258 258 #LOADERR Dies ist kein Buch der aktuellen C-evo Version. … … 289 289 #NOOFFER Dieser Antrag ist ungültig. 290 290 #CANCELTREATYRUSH Die Aufhebung von mehr als einem Abkommen mit der gleichen Nation innerhalb von 3 Runden, ist nicht erlaubt. 291 #NOSPACEPORT Da wir keinen Weltraumbahnhof besitzen, würden wir alle Teile für das Raumschiff verlieren. Trotzdem fortfahren? 291 #NOSPACEPORT Da wir keinen Weltraumbahnhof besitzen, würden wir alle Teile für das Raumschiff verlieren. Trotzdem fortfahren? 292 292 #SUICIDE Soll diese Einheit\in den sicheren Tod geschickt werden? 293 293 #RATES Wie sollen wir\unsere Wirtschaft ausrichten? … … 978 978 Languages 979 979 Key bindings 980 Custom DPI 981 DPI -
trunk/Localization/fr/Language.txt
r453 r473 166 166 #EXPEL Des unités ont été expulsées de #a territoire. 167 167 #DISPOSE %s\\Devons-nous reconstruire ce bâtiment? 168 #SPDESTRUCTQUERY \(Note: Nous allons perdre le contrôle de notre vaisseau colonial lorsque nous démantèlerons le port spatial!) 168 #SPDESTRUCTQUERY \(Note: Nous allons perdre le contrôle de notre vaisseau colonial lorsque nous démantèlerons le port spatial!) 169 169 #SELL %s\\Allons-nous vendre ce bâtiment? 170 170 #LOSEMAT Un changement complet de type de projet signifie le lancement d'un nouveau projet. %d%%p sera vendu pour %d%%c. 171 171 #LOSEMAT3 La modification du projet entraînera une perte de 1/3 du matériel collecté pour le projet. Continuer? 172 #DOUBLESTATEIMP %s\\Cette amélioration de l'état existe déjà dans la ville de %s. Devrions-nous le déplacer dans cette ville et vendre l'ancien bâtiment une fois terminé? 172 #DOUBLESTATEIMP %s\\Cette amélioration de l'état existe déjà dans la ville de %s. Devrions-nous le déplacer dans cette ville et vendre l'ancien bâtiment une fois terminé? 173 173 #READY Le projet sera achevé au prochain tour. 174 174 #NOMONEY Nous n'avons pas assez d'argent\pour mener à bien ce projet au prochain tour.\(%d%%c nécessaire, %d%%c disponible sur) … … 179 179 #GLIDERLOST Notre planeur a été perdu en mer. 180 180 #PLANELOST Notre avion est tombé en panne de carburant. 181 #DAMAGED_UTILIZE L'utilisation d'un appareil endommagé a réduit les bénéfices. Continuer? 181 #DAMAGED_UTILIZE L'utilisation d'un appareil endommagé a réduit les bénéfices. Continuer? 182 182 #NOBB Nous ne disposons pas de la technologie nécessaire pour construire des ponts sur les rivières. 183 183 #NOCITY Ce type de terrain n'est pas adapté à la colonisation. Nous devrions chercher un terrain qui permette l'irrigation. … … 256 256 #SHAREDWIN_CONCAT %s, %s 257 257 #NOAI Pas d'IA installée! 258 #FILENOTFOUND Dossier "%s" n'a pas été trouvé. 258 #FILENOTFOUND Dossier "%s" n'a pas été trouvé. 259 259 #AIEXCEPTION Exception non gérée dans le module IA %s! 260 260 #LOADERR Ce livre n'est pas compatible avec cette version de C-evo. … … 290 290 #MAX2OFFERS Vous ne pouvez pas combiner plus de deux offres dans une proposition. 291 291 #NOOFFER Cette proposition n'est pas valable! 292 #CANCELTREATYRUSH L'annulation de plus d'un traité avec la même nation au sein de l 3 n'est pas autorisé. 293 #NOSPACEPORT Nous n'avons pas de port spatial, donc nous perdrions toutes les pièces de vaisseaux de la colonie que nous recevrions. Continuez quand même? 292 #CANCELTREATYRUSH L'annulation de plus d'un traité avec la même nation au sein de l 3 n'est pas autorisé. 293 #NOSPACEPORT Nous n'avons pas de port spatial, donc nous perdrions toutes les pièces de vaisseaux de la colonie que nous recevrions. Continuez quand même? 294 294 #SUICIDE Devons-nous envoyer ces\des hommes à la mort? 295 295 #RATES Que devons-nous orienter\notre économie vers? … … 797 797 Fortifié 798 798 Bombardier armé 799 Se déplacer en montagne 799 Se déplacer en montagne 800 800 Conscrits 801 801 Retiré … … 945 945 #SETTINGS 946 946 Plein écran 947 Gamma 948 Restart is needed to apply changes 949 Primary 950 Secondary 951 Languages 952 Key bindings 953 Custom DPI 954 DPI -
trunk/Localization/it/Language.txt
r426 r473 61 61 #FROLDCIVILREP (vecchio rapporto datato %s) 62 62 #FRNOCIVILREP (nessun rapporto disponibile) 63 #FREXTINCT Sconfitti nel 63 #FREXTINCT Sconfitti nel 64 64 #FRTREATY Relazione: 65 65 #FRAND , … … 115 115 #TITLE_DIAGRAMS Grafici 116 116 #TITLE_SHIPS Astronavi 117 #TITLE_SHIP Astronave dell'impero #A 117 #TITLE_SHIP Astronave dell'impero #A 118 118 #TITLE_EMODELS Modelli unità straniere 119 119 #TITLE_RATES Economia … … 158 158 #EXPEL Unità espulse dal territorio #a. 159 159 #DISPOSE %s\\Vuoi smantellare questo edificio? 160 #SPDESTRUCTQUERY \(nota: perderemo la nostra astronave se smantelliamo la base aerospaziale!) 160 #SPDESTRUCTQUERY \(nota: perderemo la nostra astronave se smantelliamo la base aerospaziale!) 161 161 #SELL %s\\Dobbiamo svendere questo edificio? 162 162 #LOSEMAT Un cambio totale del tipo di progetto comporta l'inizio di un progetto ex novo. %d%%p verrà smantellato per %d%%c. 163 163 #LOSEMAT3 Il cambio di progetto comporterà una perdita di 1/3 delle materie prime investite finora. Continuare? 164 #DOUBLESTATEIMP %s\\Questa opera nazionale esiste già nella città di %s. Dobbiamo spostarla a questa città e smantellare quella vecchia al termine? 164 #DOUBLESTATEIMP %s\\Questa opera nazionale esiste già nella città di %s. Dobbiamo spostarla a questa città e smantellare quella vecchia al termine? 165 165 #READY Il progetto sarà terminato il prossimo turno. 166 166 #NOMONEY Non abbiamo abbastanza soldi\per completare il progetto al prossimo turno.\(%d%%c necessari, %d%%c disponibili) … … 171 171 #GLIDERLOST Il nostro aliante è finito a mollo. 172 172 #PLANELOST Il nostro velivolo è rimasto a secco di carburante. 173 #DAMAGED_UTILIZE Riciclare una unità danneggiata ha benefici ridotti. Continuare? 173 #DAMAGED_UTILIZE Riciclare una unità danneggiata ha benefici ridotti. Continuare? 174 174 #NOBB Non abbiamo le conoscenze per costruire ponti sopra i fiumi. 175 175 #NOCITY Questo tipo di terreno non è adatto a fondare una città. Dovremmo cercare un terreno che consenta l'irrigazione. … … 209 209 #WONDEREXP Una Meraviglia del mondo ha terminato il suo effetto:\%s 210 210 #WONDERDEST Una Meraviglia del mondo è stata distrutta:\%s 211 #COLDWAR Con la minaccia nucleare, le posizioni diplomatiche di tutte le nazioni si sono congelate. Le negoziazioni non sono più possibili: è cominciata la Guerra Fredda. 211 #COLDWAR Con la minaccia nucleare, le posizioni diplomatiche di tutte le nazioni si sono congelate. Le negoziazioni non sono più possibili: è cominciata la Guerra Fredda. 212 212 #COLDWAREND L'etica mondiale è ormai contraria alle armi nucleari. La Guerra Fredda è finita. 213 213 #SHIPBUILT #N hanno ultimato una parte della loro astronave interstellare. … … 216 216 #SHIPUNITRADE1 #N ricevono 217 217 #SHIPUNITRADE2 parti dell'astronave da #s. 218 #SHIPCAPTURE1 #N prendono il controllo dell'Astronave 218 #SHIPCAPTURE1 #N prendono il controllo dell'Astronave 219 219 #SHIPCAPTURE2 dello stato #a! 220 220 #SHIPDESTROYED #N hanno perso il controllo della loro astronave. … … 225 225 #FAMINE_TILES %s è a rischio di carestia. La città ha troppe poche caselle fertili disponibili.\Continuare lo stesso? 226 226 #FAMINE_UNREST %s è a rischio di carestia. Parte della popolazione è stata impiegata per mantenere il malcontento sotto controllo; questo indebolimento dell'economia ha fatto sì che la produzione di cibo non sia più sufficiente.\\Continuare lo stesso? 227 #LOWSUPPORT %s non produce abbastanza risorse per supportare tutte le sue unità.\Continuare lo stesso? 228 #LOWSUPPORT_TILES %s non produce abbastanza risorse per supportare tutte le sue unità. La città ha troppe poche caselle produttive disponibili.\Continuare lo stesso? 229 #LOWSUPPORT_UNREST %s non produce abbastanza risorse per supportare tutte le sue unità. Parte della popolazione è stata impiegata per mantenere il malcontento sotto controllo; questo indebolimento dell'economia ha fatto sì che la produzione di risorse non sia più sufficiente.\\Continuare lo stesso? 227 #LOWSUPPORT %s non produce abbastanza risorse per supportare tutte le sue unità.\Continuare lo stesso? 228 #LOWSUPPORT_TILES %s non produce abbastanza risorse per supportare tutte le sue unità. La città ha troppe poche caselle produttive disponibili.\Continuare lo stesso? 229 #LOWSUPPORT_UNREST %s non produce abbastanza risorse per supportare tutte le sue unità. Parte della popolazione è stata impiegata per mantenere il malcontento sotto controllo; questo indebolimento dell'economia ha fatto sì che la produzione di risorse non sia più sufficiente.\\Continuare lo stesso? 230 230 #RESIGN Stai per chiudere questa partita.\La vuoi salvare? 231 231 #ENDTOUR Vuoi salvare la partita in questo turno, così puoi aprirla in modalità Guardone? … … 235 235 #ORACLEINCOME Entrate: %d%%c 236 236 #NOSELLAGAIN %s\\Una città non può smantellare più di un edificio per turno. 237 #OUTOFCONTROL %s\\Questa città non è ancora sotto controllo. 237 #OUTOFCONTROL %s\\Questa città non è ancora sotto controllo. 238 238 #NOCHANGEINANARCHY Siamo in anarchia, tutte le funzioni delle città sono bloccate. 239 239 #EXTINCT = %s =\Lo stato de#n è caduto. Solo le leggende rimarranno della loro grande cultura. … … 248 248 #SHAREDWIN_CONCAT %s, %s 249 249 #NOAI Nessuna I.A. installata! 250 #FILENOTFOUND File "%s" non trovato. 250 #FILENOTFOUND File "%s" non trovato. 251 251 #AIEXCEPTION Errore sconosciuto nel modulo di I.A. %s! 252 252 #LOADERR Questa partita non è compatibile con questa versione di C-evo. … … 281 281 #MAX2OFFERS Una proposta può contenere al massimo 2 offerte. 282 282 #NOOFFER Questa proposta non è valida! 283 #CANCELTREATYRUSH Non è possibile annullare più di un trattato con la stessa nazione nell'intervallo di 3 turni. 284 #NOSPACEPORT Non abbiamo una base aerospaziale, tutte le parti di astronave che ci daranno andranno perse. Continuare? 283 #CANCELTREATYRUSH Non è possibile annullare più di un trattato con la stessa nazione nell'intervallo di 3 turni. 284 #NOSPACEPORT Non abbiamo una base aerospaziale, tutte le parti di astronave che ci daranno andranno perse. Continuare? 285 285 #SUICIDE Dobbiamo mandare a morire\questi uomini? 286 286 #RATES Come dobbiamo orientare\la nostra economia? … … 950 950 Languages 951 951 Key bindings 952 Custom DPI 953 DPI -
trunk/Localization/ru/Language.txt
r426 r473 153 153 #AGE0 = %s =\Каменный Век позади. Настало время завершить кочевой образ жизни. Мы решили остановиться на этих плодородных равнинах и основать здесь поселение, которое назовем %s. 154 154 #AGE1 = %s =\В течении многих столетий, мы смогли построить сильное общество на основе философии природы, религии. Но природа диктует нам все новые и новые законы. Поэтому в старый уклад жизни было включено эмпирическое, рациональное мышление: Наука. 155 #AGE2 = %s =\С открытием массового производства, впервые в Истории, богатство 156 больше не привелегия избранного меньшинства. Грядут невероятные перемены. 155 #AGE2 = %s =\С открытием массового производства, впервые в Истории, богатство 156 больше не привелегия избранного меньшинства. Грядут невероятные перемены. 157 157 Благодаря развитию мирового рынка, в новые технологии вкладываются биллионные 158 158 инвестиции. Ещё вчера это казалось невозможным. … … 169 169 #EXPEL Юниты были исключены с #a территории. 170 170 #DISPOSE %s\\Произвести реконструкцию здания? 171 #SPDESTRUCTQUERY \(Примечание: Мы потеряем контроль над космическим кораблем, если демонтируем космопорт!) 171 #SPDESTRUCTQUERY \(Примечание: Мы потеряем контроль над космическим кораблем, если демонтируем космопорт!) 172 172 #SELL %s\\Продать это здание? 173 173 #LOSEMAT Закончились средства для нового проекта. %d%%p будет продан за %d%%c. … … 182 182 #GLIDERLOST Наш планер потерялся в море. 183 183 #PLANELOST У авиации закончилось топливо. 184 #DAMAGED_UTILIZE Использование поврежденного юнита приносит меньше пользы. Продолжить? 184 #DAMAGED_UTILIZE Использование поврежденного юнита приносит меньше пользы. Продолжить? 185 185 #NOBB Мы пока не умеем строить мосты через реки. Нужно изучить соответствующую технологию. 186 186 #NOCITY Этот тип местности непригоден для поселения. Мы должны поискать местность, на которой возможно орошение. … … 259 259 #SHAREDWIN_CONCAT %s, %s 260 260 #NOAI ИИ не установлен! 261 #FILENOTFOUND Файл "%s" не найден. 261 #FILENOTFOUND Файл "%s" не найден. 262 262 #AIEXCEPTION Ошибка ИИ в модуле %s! 263 263 #LOADERR Эта книга другой версии c-Evo. … … 295 295 #MAX2OFFERS Вы не можете объединять более, чем два предложения в одно предложение. 296 296 #NOOFFER Это предложение недействительно! 297 #CANCELTREATYRUSH Отмена одного договора с одной и той же страной в пределах 3 ходов не допущена. 298 #NOSPACEPORT У нас нет космического порта, так что мы теряем все имеющиеся части космического корабля. Продолжить? 297 #CANCELTREATYRUSH Отмена одного договора с одной и той же страной в пределах 3 ходов не допущена. 298 #NOSPACEPORT У нас нет космического порта, так что мы теряем все имеющиеся части космического корабля. Продолжить? 299 299 #SUICIDE Послать\людей на верную смерть? 300 300 #RATES Что если мы сориентируем\нашу экономику? … … 985 985 Languages 986 986 Key bindings 987 Custom DPI 988 DPI -
trunk/Localization/zh-Hans/Language.txt
r457 r473 977 977 Languages 978 978 Key bindings 979 Custom DPI 980 DPI -
trunk/Localization/zh-Hant/Language.txt
r457 r473 977 977 Languages 978 978 Key bindings 979 Custom DPI 980 DPI -
trunk/Packages/CevoComponents/ScreenTools.pas
r468 r473 104 104 procedure UnshareBitmap(Bitmap: TBitmap); 105 105 procedure Gtk2Fix; 106 procedure LoadConfig(Key: string); 107 procedure SaveConfig(Key: string); 106 108 107 109 const … … 193 195 UniFont: array [TFontType] of TFont; 194 196 Gamma: Integer; // global gamma correction (cent) 197 CustomDpiEnabled: Boolean; 198 CustomDpi: Integer; 195 199 196 200 procedure LoadAssets; … … 204 208 uses 205 209 {$IFDEF DPI}Dpi.PixelPointer,{$ELSE}PixelPointer,{$ENDIF} 206 Directories, Sound ;210 Directories, Sound, Registry; 207 211 208 212 var … … 1550 1554 procedure PaintLogo(Canvas: TCanvas; X, Y, LightColor, ShadeColor: Integer); 1551 1555 begin 1556 if not Assigned(LogoBuffer) then Exit; 1552 1557 UnshareBitmap(LogoBuffer); 1553 1558 BitBltCanvas(LogoBuffer.Canvas, 0, 0, Logo.Width, Logo.Height, Canvas, X, Y); … … 1732 1737 end; 1733 1738 1739 procedure LoadConfig(Key: string); 1740 var 1741 Reg: TRegistry; 1742 begin 1743 Reg := TRegistry.Create; 1744 with Reg do try 1745 OpenKey(Key, True); 1746 if ValueExists('Gamma') then Gamma := ReadInteger('Gamma') 1747 else Gamma := 100; 1748 if Gamma <> 100 then InitGammaLookupTable; 1749 if ValueExists('CustomDpiEnabled') then CustomDpiEnabled := Reg.ReadBool('CustomDpiEnabled') 1750 else CustomDpiEnabled := False; 1751 if ValueExists('CustomDpi') then CustomDpi := Reg.ReadInteger('CustomDpi') 1752 else CustomDpi := 96; 1753 {$IFDEF DPI} 1754 if CustomDpiEnabled then Screen.Dpi := CustomDpi 1755 else Screen.Dpi := Screen.GetSystemDpi; 1756 {$ENDIF} 1757 finally 1758 Reg.Free; 1759 end; 1760 end; 1761 1762 procedure SaveConfig(Key: string); 1763 var 1764 Reg: TRegistry; 1765 begin 1766 Reg := TRegistry.Create; 1767 with Reg do try 1768 OpenKey(Key, True); 1769 WriteInteger('Gamma', Gamma); 1770 WriteBool('CustomDpiEnabled', CustomDpiEnabled); 1771 WriteInteger('CustomDpi', CustomDpi); 1772 finally 1773 Free; 1774 end; 1775 end; 1776 1734 1777 procedure LoadAssets; 1735 1778 begin … … 1752 1795 end; 1753 1796 1797 LogoBuffer := TBitmap.Create; 1798 LogoBuffer.PixelFormat := TPixelFormat.pf24bit; 1799 LogoBuffer.SetSize(BigBook.Width, BigBook.Height); 1800 1754 1801 LoadGraphicFile(Colors, GetGraphicsDir + DirectorySeparator + 'Colors.png'); 1755 1802 LoadGraphicFile(Paper, GetGraphicsDir + DirectorySeparator + 'Paper.jpg'); … … 1801 1848 1802 1849 LoadAssets; 1803 1804 LogoBuffer := TBitmap.Create;1805 LogoBuffer.PixelFormat := TPixelFormat.pf24bit;1806 LogoBuffer.SetSize(BigBook.Width, BigBook.Height);1807 1850 end; 1808 1851 … … 1814 1857 FreeAndNil(Phrases); 1815 1858 FreeAndNil(Phrases2); 1816 FreeAndNil(LogoBuffer);1859 if Assigned(LogoBuffer) then FreeAndNil(LogoBuffer); 1817 1860 FreeAndNil(BigImp); 1818 1861 FreeAndNil(Paper); -
trunk/Packages/DpiControls/Dpi.Common.pas
r468 r473 7 7 8 8 const 9 FixedDpi = 2*96;10 9 DpiControlsComponentPaletteName = 'DpiControls'; 11 10 -
trunk/Packages/DpiControls/Dpi.Forms.pas
r468 r473 228 228 constructor Create; 229 229 destructor Destroy; override; 230 procedure UpdateScreen;231 230 procedure UpdateActiveFormFromNativeScreen; 232 231 function DisableForms(SkipForm: TForm; DisabledList: Classes.TList = nil): Classes.TList; 233 232 procedure EnableForms(var AFormList: Classes.TList); 233 function GetSystemDpi: Integer; 234 234 property FormCount: Integer read GetFormCount; 235 235 property Forms[Index: Integer]: TForm read GetForms; … … 400 400 begin 401 401 GetNativeApplication.Initialize; 402 Screen.UpdateScreen;403 402 end; 404 403 … … 442 441 FCreatingForm := TForm(Instance); 443 442 Instance.Create(Self); 444 Ok := true;443 Ok := True; 445 444 finally 446 445 if not Ok then begin … … 978 977 end; 979 978 979 function TScreen.GetSystemDpi: Integer; 980 begin 981 Result := LCLScreen.PixelsPerInch; 982 end; 983 980 984 constructor TScreen.Create; 981 985 begin … … 993 997 FreeAndNil(FPrevActiveForms); 994 998 inherited; 995 end;996 997 procedure TScreen.UpdateScreen;998 begin999 if FixedDpi = -1 then Dpi := LCLScreen.PixelsPerInch1000 else Dpi := FixedDpi;1001 999 end; 1002 1000 -
trunk/Settings.lfm
r433 r473 17 17 OnShow = FormShow 18 18 Position = poScreenCenter 19 LCLVersion = '2.2. 0.4'19 LCLVersion = '2.2.6.0' 20 20 Scaled = False 21 21 object ListLanguages: TListBox 22 22 Tag = 15360 23 23 Left = 16 24 Height = 32024 Height = 291 25 25 Top = 32 26 26 Width = 144 … … 68 68 ButtonIndex = 0 69 69 end 70 object Up2Btn: TButtonC70 object ButtonGammaUp: TButtonC 71 71 Tag = 6912 72 72 Left = 452 … … 76 76 Down = False 77 77 Permanent = False 78 OnClick = Up2BtnClick78 OnClick = ButtonGammaUpClick 79 79 ButtonIndex = 1 80 80 end 81 object Down2Btn: TButtonC81 object ButtonGammaDown: TButtonC 82 82 Tag = 6912 83 83 Left = 452 … … 87 87 Down = False 88 88 Permanent = False 89 OnClick = Down2BtnClick89 OnClick = ButtonGammaDownClick 90 90 ButtonIndex = 0 91 91 end … … 93 93 Tag = 15360 94 94 Left = 176 95 Height = 2 6495 Height = 232 96 96 Top = 32 97 97 Width = 288 … … 115 115 Left = 176 116 116 Height = 27 117 Top = 325117 Top = 296 118 118 Width = 136 119 119 BorderStyle = bsNone … … 131 131 Left = 328 132 132 Height = 27 133 Top = 325133 Top = 296 134 134 Width = 136 135 135 BorderStyle = bsNone … … 153 153 OnClick = ButtonResetClick 154 154 end 155 object ButtonCustomDpi: TButtonC 156 Left = 24 157 Height = 18 158 Top = 336 159 Width = 18 160 Down = False 161 Permanent = False 162 OnClick = ButtonCustomDpiClick 163 ButtonIndex = 0 164 end 165 object ButtonDpiUp: TButtonC 166 Tag = 6912 167 Left = 452 168 Height = 12 169 Top = 328 170 Width = 12 171 Down = False 172 Permanent = False 173 OnClick = ButtonDpiUpClick 174 ButtonIndex = 1 175 end 176 object ButtonDpiDown: TButtonC 177 Tag = 6912 178 Left = 452 179 Height = 12 180 Top = 340 181 Width = 12 182 Down = False 183 Permanent = False 184 OnClick = ButtonDpiDownClick 185 ButtonIndex = 0 186 end 155 187 end -
trunk/Settings.pas
r471 r473 14 14 TSettingsDlg = class(TDrawDlg) 15 15 ButtonFullscreen: TButtonC; 16 Down2Btn: TButtonC; 16 ButtonCustomDpi: TButtonC; 17 ButtonGammaDown: TButtonC; 18 ButtonDpiDown: TButtonC; 17 19 EditShortCutPrimary: TEdit; 18 20 EditShortCutSecondary: TEdit; … … 22 24 ButtonCancel: TButtonA; 23 25 ButtonReset: TButtonA; 24 Up2Btn: TButtonC; 26 ButtonGammaUp: TButtonC; 27 ButtonDpiUp: TButtonC; 28 procedure ButtonCustomDpiClick(Sender: TObject); 29 procedure ButtonDpiDownClick(Sender: TObject); 30 procedure ButtonDpiUpClick(Sender: TObject); 25 31 procedure ButtonFullscreenClick(Sender: TObject); 26 32 procedure ButtonCancelClick(Sender: TObject); 27 33 procedure ButtonResetClick(Sender: TObject); 28 procedure Down2BtnClick(Sender: TObject);34 procedure ButtonGammaDownClick(Sender: TObject); 29 35 procedure EditShortCutPrimaryKeyUp(Sender: TObject; var Key: Word; 30 36 Shift: TShiftState); … … 38 44 procedure ListKeyBindingsSelectionChange(Sender: TObject; User: Boolean); 39 45 procedure ButtonOkClick(Sender: TObject); 40 procedure Up2BtnClick(Sender: TObject);46 procedure ButtonGammaUpClick(Sender: TObject); 41 47 private 42 48 LocalGamma: Integer; 43 49 LocalKeyBindings: TKeyBindings; 44 50 CurrentKeyBinding: TKeyBinding; 51 LocalDpi: Integer; 45 52 procedure UpdateShortCutItem; 53 function GetLocalCustomDpiEnabled: Boolean; 46 54 public 47 55 procedure LoadData; … … 62 70 var 63 71 SFullScreen, SGamma, SRestartMsg, SShortCutPrimary, SShortCutSecondary, 64 SLanguages, SKeyBindings : string;72 SLanguages, SKeyBindings, SCustomDpi, SDpi: string; 65 73 66 74 procedure ReloadLanguages; … … 73 81 SLanguages := Phrases.Lookup('SETTINGS', 5); 74 82 SKeyBindings := Phrases.Lookup('SETTINGS', 6); 83 SCustomDpi := Phrases.Lookup('SETTINGS', 7); 84 SDpi := Phrases.Lookup('SETTINGS', 8); 75 85 end; 76 86 … … 108 118 end; 109 119 110 procedure TSettingsDlg. Down2BtnClick(Sender: TObject);120 procedure TSettingsDlg.ButtonGammaDownClick(Sender: TObject); 111 121 begin 112 122 if LocalGamma > 50 then … … 156 166 end; 157 167 168 procedure TSettingsDlg.ButtonDpiDownClick(Sender: TObject); 169 begin 170 if LocalDpi >= 105 then 171 begin 172 Dec(LocalDpi, 5); 173 Invalidate; 174 end; 175 end; 176 177 procedure TSettingsDlg.ButtonCustomDpiClick(Sender: TObject); 178 begin 179 ButtonCustomDpi.ButtonIndex := ButtonCustomDpi.ButtonIndex xor 1; 180 end; 181 182 procedure TSettingsDlg.ButtonDpiUpClick(Sender: TObject); 183 begin 184 if LocalDpi <= 495 then begin 185 Inc(LocalDpi, 5); 186 Invalidate; 187 end; 188 end; 189 158 190 procedure TSettingsDlg.FormDestroy(Sender: TObject); 159 191 begin … … 163 195 procedure TSettingsDlg.FormPaint(Sender: TObject); 164 196 begin 165 PaintBackground( self, 3, 3, ClientWidth - 6, ClientHeight - 6);197 PaintBackground(Self, 3, 3, ClientWidth - 6, ClientHeight - 6); 166 198 Frame(Canvas, 0, 0, ClientWidth - 1, ClientHeight - 1, 0, 0); 167 199 Frame(Canvas, 1, 1, ClientWidth - 2, ClientHeight - 2, … … 178 210 ButtonFullscreen.Left + 12, ButtonFullscreen.Top + 12, MainTexture.ColorBevelShade, 179 211 MainTexture.ColorBevelLight); 212 {$IFDEF DPI} 213 RFrame(Canvas, ButtonCustomDpi.Left - 1, ButtonCustomDpi.Top - 1, 214 ButtonCustomDpi.Left + 12, ButtonCustomDpi.Top + 12, MainTexture.ColorBevelShade, 215 MainTexture.ColorBevelLight); 216 LoweredTextOut(Canvas, -2, MainTexture, ButtonCustomDpi.Left + 32, 217 ButtonCustomDpi.Top - 4, SCustomDpi); 218 UnderlinedTitleValue(Canvas, SDpi, IntToStr(LocalDpi) + '%', 219 ButtonDpiUp.Left - 150 - 4, ButtonDpiUp.Top + 2, 150); 220 {$ENDIF} 180 221 181 222 LoweredTextOut(Canvas, -2, MainTexture, ListLanguages.Left, … … 186 227 ButtonFullscreen.Top - 4, SFullScreen); 187 228 UnderlinedTitleValue(Canvas, SGamma, IntToStr(LocalGamma) + '%', 188 Up2Btn.Left - 150 - 4, Up2Btn.Top + 2, 150);229 ButtonGammaUp.Left - 150 - 4, ButtonGammaUp.Top + 2, 150); 189 230 LoweredTextOut(Canvas, -2, MainTexture, EditShortCutPrimary.Left, 190 231 EditShortCutPrimary.Top - 26, SShortCutPrimary); … … 204 245 EditShortCutPrimary.Font.Color := MainTexture.ColorMark; 205 246 EditShortCutSecondary.Font.Color := MainTexture.ColorMark; 247 {$IFDEF DPI} 248 ButtonCustomDpi.Visible := True; 249 ButtonDpiDown.Visible := True; 250 ButtonDpiUp.Visible := True; 251 {$ELSE} 252 ButtonCustomDpi.Visible := False; 253 ButtonDpiDown.Visible := False; 254 ButtonDpiUp.Visible := False; 255 {$ENDIF} 206 256 end; 207 257 … … 241 291 end; 242 292 243 procedure TSettingsDlg. Up2BtnClick(Sender: TObject);293 procedure TSettingsDlg.ButtonGammaUpClick(Sender: TObject); 244 294 begin 245 295 if LocalGamma < 150 then begin … … 262 312 end; 263 313 314 function TSettingsDlg.GetLocalCustomDpiEnabled: Boolean; 315 begin 316 Result := (ButtonCustomDpi.ButtonIndex and 1) = 1; 317 end; 318 264 319 procedure TSettingsDlg.LoadData; 265 320 begin … … 272 327 LocalGamma := Gamma; 273 328 LocalKeyBindings.Assign(KeyBindings.KeyBindings); 329 {$IFDEF DPI} 330 if CustomDpiEnabled then ButtonCustomDpi.ButtonIndex := 3 331 else ButtonCustomDpi.ButtonIndex := 2; 332 LocalDpi := Round(CustomDpi * 100 / 96); 333 {$ENDIF} 274 334 end; 275 335 … … 278 338 NeedRestart: Boolean; 279 339 begin 280 NeedRestart := Gamma <> LocalGamma; 340 NeedRestart := (Gamma <> LocalGamma) or (CustomDpiEnabled <> GetLocalCustomDpiEnabled) or 341 ((GetLocalCustomDpiEnabled and (LocalDpi <> CustomDpi))); 281 342 if ListLanguages.ItemIndex <> -1 then begin 282 343 StartDlg.Translator.Language := TLanguage(ListLanguages.Items.Objects[ListLanguages.ItemIndex]); … … 288 349 FullScreen := (ButtonFullscreen.ButtonIndex and 1) = 1; 289 350 Gamma := LocalGamma; 351 ScreenTools.CustomDpiEnabled := CustomDpiEnabled; 290 352 if NeedRestart then SimpleMessage(SRestartMsg); 291 353 KeyBindings.KeyBindings.Assign(LocalKeyBindings); 354 {$IFDEF DPI} 355 CustomDpiEnabled := GetLocalCustomDpiEnabled; 356 CustomDpi := Round(LocalDpi * 96 / 100); 357 {$ENDIF} 292 358 end; 293 359 -
trunk/Start.pas
r472 r473 389 389 390 390 OpenKey(AppRegistryKey, True); 391 if ValueExists('Gamma') then Gamma := ReadInteger('Gamma')392 else Gamma := 100;393 if Gamma <> 100 then InitGammaLookupTable;394 391 if ValueExists('Locale') then LocaleCode := ReadString('Locale') 395 392 else LocaleCode := ''; … … 444 441 Reg: TRegistry; 445 442 begin 443 ScreenTools.SaveConfig(AppRegistryKey); 444 446 445 Reg := TRegistry.Create; 447 446 with Reg do try … … 450 449 WriteInteger('LandMass', StartLandMass); 451 450 WriteString('Locale', LocaleCode); 452 WriteInteger('Gamma', Gamma);453 451 if FullScreen then WriteInteger('ScreenMode', 1) 454 452 else WriteInteger('ScreenMode', 0);
Note:
See TracChangeset
for help on using the changeset viewer.