Changeset 167


Ignore:
Timestamp:
Jun 15, 2019, 12:03:12 AM (5 years ago)
Author:
chronos
Message:
  • Added: Allow to change full screen mode to windowed mode.
Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Language.txt

    r20 r167  
    942942Hurry\Production
    943943Maximize\Production
     944
     945#SETTINGS
     946Full screen
  • trunk/Locale.lfm

    r124 r167  
    11object LocaleDlg: TLocaleDlg
    2   Left = 754
    3   Height = 456
     2  Left = 766
     3  Height = 448
    44  Top = 240
    55  Width = 483
    66  BorderStyle = bsNone
    77  Caption = 'LocaleDlg'
    8   ClientHeight = 456
     8  ClientHeight = 448
    99  ClientWidth = 483
    1010  DesignTimePPI = 144
     
    1414  OnPaint = FormPaint
    1515  OnShow = FormShow
    16   LCLVersion = '1.8.2.0'
     16  LCLVersion = '2.0.2.0'
    1717  object List: TListBox
    1818    Tag = 15360
    1919    Left = 24
    20     Height = 360
     20    Height = 336
    2121    Top = 16
    2222    Width = 424
     
    3535    TabOrder = 0
    3636    TabStop = False
     37    TopIndex = -1
    3738  end
    3839  object OKBtn: TButtonA
     
    5455    OnClick = CancelBtnClick
    5556  end
     57  object ButtonFullscreen: TButtonC
     58    Left = 24
     59    Height = 18
     60    Top = 368
     61    Width = 18
     62    Down = False
     63    Permanent = False
     64    OnClick = ButtonFullscreenClick
     65    ButtonIndex = 0
     66  end
    5667end
  • trunk/Locale.pas

    r123 r167  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   ScreenTools, Messg, ButtonA, Registry, fgl, Directories, DrawDlg;
     9  ScreenTools, Messg, ButtonA, Registry, fgl, Directories, DrawDlg, ButtonC;
    1010
    1111type
     
    2727
    2828  TLocaleDlg = class(TDrawDlg)
     29    ButtonFullscreen: TButtonC;
    2930    List: TListBox;
    3031    OKBtn: TButtonA;
    3132    CancelBtn: TButtonA;
     33    procedure ButtonFullscreenClick(Sender: TObject);
    3234    procedure CancelBtnClick(Sender: TObject);
    3335    procedure FormCreate(Sender: TObject);
     
    101103  OkBtn.Graphic := GrExt[HGrSystem].Data;
    102104  CancelBtn.Graphic := GrExt[HGrSystem].Data;
     105
     106  ButtonFullscreen.Graphic := GrExt[HGrSystem].Data;
     107  if FullScreen then ButtonFullscreen.ButtonIndex := 3
     108    else ButtonFullscreen.ButtonIndex := 2;
    103109end;
    104110
     
    106112begin
    107113  ModalResult := mrOk;
     114end;
     115
     116procedure TLocaleDlg.ButtonFullscreenClick(Sender: TObject);
     117begin
     118  FullScreen := not FullScreen;
     119  ButtonFullscreen.ButtonIndex := ButtonFullscreen.ButtonIndex xor 1;
    108120end;
    109121
     
    114126
    115127procedure TLocaleDlg.FormPaint(Sender: TObject);
     128var
     129  S: string;
     130  W: Integer;
    116131begin
    117132  PaintBackground(self, 3, 3, ClientWidth - 6, ClientHeight - 6);
     
    124139  BtnFrame(Canvas, OKBtn.BoundsRect, MainTexture);
    125140  BtnFrame(Canvas, CancelBtn.BoundsRect, MainTexture);
     141
     142  RFrame(Canvas, ButtonFullscreen.Left - 1, ButtonFullscreen.Top - 1,
     143    ButtonFullscreen.Left + 12, ButtonFullscreen.Top + 12, MainTexture.clBevelShade,
     144    MainTexture.clBevelLight);
     145
     146  s := Phrases.Lookup('SETTINGS', 0);
     147  LoweredTextOut(Canvas, -2, MainTexture, ButtonFullscreen.Left + 32,
     148    ButtonFullscreen.Top - 4, s);
    126149end;
    127150
  • trunk/Localization/cs/Language.txt

    r64 r167  
    942942Uspíšit\produkci
    943943Maximální\produkce
     944
     945#SETTINGS
     946Celá obrazovka
  • trunk/Localization/de/Language.txt

    r64 r167  
    960960beschleunigte\Produktion
    961961maximale\Produktion
     962
     963#SETTINGS
     964Full screen
  • trunk/Localization/it/Language.txt

    r77 r167  
    932932Favorisci\produzione
    933933Massimizza\produzione
     934
     935#SETTINGS
     936Full screen
  • trunk/Localization/ru/Language.txt

    r77 r167  
    968968Максимум\Производства
    969969
     970#SETTINGS
     971Full screen
  • trunk/Localization/zh-Hans/language.txt

    r123 r167  
    960960Éú²ú×î´ó»¯
    961961
     962#SETTINGS
     963Full screen
  • trunk/Localization/zh-Hant/language.txt

    r123 r167  
    960960¥Í²£³Ì¤j¤Æ
    961961
     962#SETTINGS
     963Full screen
  • trunk/Packages/CevoComponents/ScreenTools.pas

    r163 r167  
    207207  MainTexture: TTexture;
    208208  Templates, Colors, Paper, BigImp, LogoBuffer: TBitmap;
    209   FullScreen, GenerateNames, InitOrnamentDone, Phrases2FallenBackToEnglish: boolean;
     209  FullScreen, GenerateNames, InitOrnamentDone, Phrases2FallenBackToEnglish: Boolean;
    210210
    211211  UniFont: array [TFontType] of TFont;
     
    16431643      WriteString('Locale', LocaleCode);
    16441644      WriteInteger('Gamma', Gamma);
     1645      if FullScreen then WriteInteger('ScreenMode', 1)
     1646        else WriteInteger('ScreenMode', 0);
    16451647    finally
    16461648      Free;
Note: See TracChangeset for help on using the changeset viewer.