Changeset 91 for trunk/Forms


Ignore:
Timestamp:
Dec 4, 2014, 10:18:13 PM (10 years ago)
Author:
chronos
Message:
  • Added: Partial support for high DPI screens. Disabled.
Location:
trunk/Forms
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.lfm

    r87 r91  
    55  Width = 775
    66  Caption = 'xTactics'
    7   ClientHeight = 595
     7  ClientHeight = 592
    88  ClientWidth = 775
    99  Menu = MainMenu1
     
    1818  object StatusBar1: TStatusBar
    1919    Left = 0
    20     Height = 26
    21     Top = 569
     20    Height = 29
     21    Top = 563
    2222    Width = 775
    2323    Panels = <   
     
    3535  object ToolBar1: TToolBar
    3636    Left = 0
    37     Height = 569
     37    Height = 563
    3838    Top = 0
    3939    Width = 40
     
    116116  object PaintBox1: TPaintBox
    117117    Left = 40
    118     Height = 569
     118    Height = 563
    119119    Top = 0
    120120    Width = 735
    121121    Align = alClient
    122122    OnMouseDown = PaintBox1MouseDown
    123     OnMouseLeave = PaintBox1MouseLeave
    124123    OnMouseMove = PaintBox1MouseMove
    125124    OnMouseUp = PaintBox1MouseUp
     125    OnMouseLeave = PaintBox1MouseLeave
    126126    OnMouseWheelDown = PaintBox1MouseWheelDown
    127127    OnMouseWheelUp = PaintBox1MouseWheelUp
  • trunk/Forms/UFormMain.pas

    r90 r91  
    7373    procedure AZoomOutExecute(Sender: TObject);
    7474    procedure FormActivate(Sender: TObject);
     75    procedure FormShow(Sender: TObject);
    7576    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    7677    procedure FormCreate(Sender: TObject);
    7778    procedure FormDestroy(Sender: TObject);
    7879    procedure FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
    79     procedure FormShow(Sender: TObject);
    80     procedure MenuItem19Click(Sender: TObject);
    8180    procedure PaintBox1MouseDown(Sender: TObject; Button: TMouseButton;
    8281      Shift: TShiftState; X, Y: Integer);
     
    244243  Factor: TFloatPoint;
    245244  MapRect: TRect;
     245  NewZoom: Single;
    246246begin
    247247  with Core, Game, Player, View do begin
     
    249249    Factor := FloatPoint((DestRect.Right - DestRect.Left) / (MapRect.Right - MapRect.Left),
    250250      (DestRect.Bottom - DestRect.Top) / (MapRect.Bottom - MapRect.Top));
    251     if Factor.X < Factor.Y then Zoom := Factor.X
    252       else Zoom := Factor.Y;
     251    if Factor.X < Factor.Y then NewZoom := Factor.X
     252      else NewZoom := Factor.Y;
     253    //if NewZoom <> 0 then
     254    Zoom := NewZoom;
    253255    CenterMap;
    254256  end;
     
    326328  ReloadView;
    327329  Redraw;
    328 end;
    329 
    330 procedure TFormMain.MenuItem19Click(Sender: TObject);
    331 begin
    332 
    333330end;
    334331
  • trunk/Forms/UFormNew.lfm

    r87 r91  
    11object FormNew: TFormNew
    22  Left = 624
    3   Height = 528
     3  Height = 519
    44  Top = 313
    5   Width = 745
     5  Width = 1229
    66  Caption = 'New game'
    7   ClientHeight = 528
    8   ClientWidth = 745
     7  ClientHeight = 519
     8  ClientWidth = 1229
    99  OnCreate = FormCreate
    1010  OnDestroy = FormDestroy
    1111  OnShow = FormShow
    1212  LCLVersion = '1.3'
    13   object Splitter1: TSplitter
    14     Cursor = crVSplit
    15     Left = 0
    16     Height = 5
    17     Top = 0
    18     Width = 745
    19     Align = alTop
    20     ResizeAnchor = akTop
    21   end
    2213  object ButtonCancel: TButton
    23     Left = 522
     14    Left = 1006
    2415    Height = 25
    25     Top = 486
     16    Top = 477
    2617    Width = 75
    27     Anchors = [akBottom]
     18    Anchors = [akRight, akBottom]
    2819    Caption = 'Cancel'
    2920    ModalResult = 2
    30     TabOrder = 1
     21    TabOrder = 0
    3122  end
    3223  object ButtonOk: TButton
    33     Left = 626
     24    Left = 1110
    3425    Height = 25
    35     Top = 486
     26    Top = 477
    3627    Width = 75
    3728    Anchors = [akRight, akBottom]
    3829    Caption = 'Ok'
    3930    ModalResult = 1
    40     TabOrder = 2
     31    TabOrder = 1
    4132  end
    4233  object PageControl1: TPageControl
    43     Left = 0
    44     Height = 465
    45     Top = 5
    46     Width = 745
    47     ActivePage = TabSheet3
     34    Left = 4
     35    Height = 457
     36    Top = 4
     37    Width = 1221
     38    ActivePage = TabSheet2
    4839    Align = alTop
    4940    Anchors = [akTop, akLeft, akRight, akBottom]
    50     TabIndex = 2
    51     TabOrder = 3
     41    BorderSpacing.Around = 4
     42    TabIndex = 1
     43    TabOrder = 2
    5244    object TabSheet1: TTabSheet
    5345      Caption = 'Players'
    54       ClientHeight = 425
    55       ClientWidth = 739
     46      ClientHeight = 414
     47      ClientWidth = 1215
    5648      object ListView1: TListView
    57         Left = 8
    58         Height = 368
    59         Top = 8
    60         Width = 713
     49        Left = 4
     50        Height = 364
     51        Top = 4
     52        Width = 1207
     53        Align = alTop
    6154        Anchors = [akTop, akLeft, akRight, akBottom]
     55        BorderSpacing.Around = 4
    6256        Columns = <       
    6357          item
     
    7569          item
    7670            Caption = 'Start units'
    77             Width = 296
     71            Width = 790
    7872          end>
    7973        OwnerData = True
     
    9185      end
    9286      object ButtonPlayerRemove: TButton
    93         Left = 240
    94         Height = 25
    95         Top = 384
     87        Left = 224
     88        Height = 25
     89        Top = 376
    9690        Width = 83
    9791        Action = APlayerRemove
    98         Anchors = [akRight, akBottom]
     92        Anchors = [akLeft, akBottom]
    9993        TabOrder = 1
    10094      end
    10195      object ButtonPlayerAdd: TButton
    102         Left = 32
    103         Height = 25
    104         Top = 384
     96        Left = 16
     97        Height = 25
     98        Top = 376
    10599        Width = 83
    106100        Action = APlayerAdd
    107         Anchors = [akRight, akBottom]
     101        Anchors = [akLeft, akBottom]
    108102        TabOrder = 2
    109103      end
    110104      object ButtonPlayerModify: TButton
    111         Left = 136
    112         Height = 25
    113         Top = 384
     105        Left = 120
     106        Height = 25
     107        Top = 376
    114108        Width = 83
    115109        Action = APlayerModify
    116         Anchors = [akRight, akBottom]
     110        Anchors = [akLeft, akBottom]
    117111        Caption = 'Modify'
    118112        TabOrder = 3
     
    121115    object TabSheet2: TTabSheet
    122116      Caption = 'Map'
    123       ClientHeight = 425
    124       ClientWidth = 739
     117      ClientHeight = 414
     118      ClientWidth = 1215
    125119      object Label1: TLabel
    126120        Left = 8
     
    163157        Height = 46
    164158        Top = 8
    165         Width = 488
     159        Width = 964
    166160        Max = 100
    167161        Min = 2
     
    176170        Height = 46
    177171        Top = 49
    178         Width = 488
     172        Width = 964
    179173        Max = 100
    180174        Min = 2
     
    234228        Height = 27
    235229        Top = 110
    236         Width = 151
     230        Width = 727
     231        Anchors = [akTop, akLeft, akRight]
     232        AutoSize = False
    237233        Caption = 'Symetric map'
    238234        TabOrder = 6
     
    312308        Height = 35
    313309        Top = 184
    314         Width = 472
     310        Width = 948
    315311        Anchors = [akTop, akLeft, akRight]
    316312        TabOrder = 12
    317313      end
    318314      object ButtonImageBrowse: TButton
    319         Left = 624
     315        Left = 1100
    320316        Height = 25
    321317        Top = 192
     
    337333    object TabSheet3: TTabSheet
    338334      Caption = 'Rules'
    339       ClientHeight = 425
    340       ClientWidth = 739
     335      ClientHeight = 414
     336      ClientWidth = 1215
    341337      object RadioGroupGrowCells: TRadioGroup
    342         Left = 8
     338        Left = 15
    343339        Height = 105
    344340        Top = 104
     
    353349        ChildSizing.Layout = cclLeftToRightThenTopToBottom
    354350        ChildSizing.ControlsPerLine = 1
    355         ClientHeight = 81
     351        ClientHeight = 78
    356352        ClientWidth = 308
    357353        Items.Strings = (
     
    364360      object Label6: TLabel
    365361        Left = 8
    366         Height = 22
     362        Height = 25
    367363        Top = 248
    368         Width = 114
     364        Width = 129
    369365        Caption = 'Win objective:'
    370366        ParentColor = False
     
    372368      object ComboBoxWinObjective: TComboBox
    373369        Left = 232
    374         Height = 34
     370        Height = 33
    375371        Top = 240
    376372        Width = 328
     
    399395        ChildSizing.Layout = cclLeftToRightThenTopToBottom
    400396        ChildSizing.ControlsPerLine = 1
    401         ClientHeight = 52
     397        ClientHeight = 49
    402398        ClientWidth = 301
    403399        Items.Strings = (
     
    409405      object CheckBoxFogOfWar: TCheckBox
    410406        Left = 336
    411         Height = 24
     407        Height = 27
    412408        Top = 24
    413         Width = 106
     409        Width = 864
     410        Anchors = [akTop, akLeft, akRight]
     411        AutoSize = False
    414412        Caption = 'Fog of war'
    415413        TabOrder = 3
     
    435433  end
    436434  object OpenPictureDialog1: TOpenPictureDialog
    437     left = 616
    438     top = 280
     435    left = 424
     436    top = 440
    439437  end
    440438  object PopupMenu1: TPopupMenu
    441439    left = 128
    442     top = 143
     440    top = 440
    443441    object MenuItem1: TMenuItem
    444442      Action = APlayerAdd
  • trunk/Forms/UFormNew.pas

    r90 r91  
    5555    SpinEditNeutralUnits: TSpinEdit;
    5656    SpinEditVoidPercent: TSpinEdit;
    57     Splitter1: TSplitter;
    5857    TabSheet1: TTabSheet;
    5958    TabSheet2: TTabSheet;
     
    240239begin
    241240  ReloadView;
     241  //Height := Trunc(1.5 * Height);
    242242end;
    243243
  • trunk/Forms/UFormSettings.lfm

    r77 r91  
    4848    Height = 27
    4949    Top = 80
    50     Width = 176
     50    Width = 752
     51    Anchors = [akTop, akLeft, akRight]
     52    AutoSize = False
    5153    Caption = 'Developer mode'
    5254    TabOrder = 3
    5355  end
    5456  object SpinEditAnimSpeed: TSpinEdit
    55     Left = 184
     57    Left = 224
    5658    Height = 35
    5759    Top = 120
     
    6870  end
    6971  object Label3: TLabel
    70     Left = 311
     72    Left = 360
    7173    Height = 25
    72     Top = 128
     74    Top = 130
    7375    Width = 17
    7476    Caption = '%'
     
    7981    Height = 27
    8082    Top = 160
    81     Width = 287
     83    Width = 752
     84    Anchors = [akTop, akLeft, akRight]
     85    AutoSize = False
    8286    Caption = 'Autosave game on each turn'
    8387    TabOrder = 5
Note: See TracChangeset for help on using the changeset viewer.