Changeset 58 for trunk/Forms


Ignore:
Timestamp:
Sep 25, 2014, 3:24:18 PM (10 years ago)
Author:
chronos
Message:
  • Fixed: Background drawing problems of cells and arrows.
  • Added: Zooming actions added also to toolbar.
  • Added: Toolbar and statusbar visibility settings.
Location:
trunk/Forms
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.lfm

    r46 r58  
    11object FormMain: TFormMain
    2   Left = 503
     2  Left = 102
    33  Height = 621
    4   Top = 263
     4  Top = 0
    55  Width = 775
    66  Caption = 'xTactics'
    7   ClientHeight = 592
     7  ClientHeight = 600
    88  ClientWidth = 775
    99  Menu = MainMenu1
     
    1313  OnDestroy = FormDestroy
    1414  OnShow = FormShow
    15   LCLVersion = '1.3'
     15  LCLVersion = '1.0.10.0'
    1616  WindowState = wsMaximized
    1717  object PaintBox1: TPaintBox
    1818    Left = 0
    19     Height = 531
     19    Height = 547
    2020    Top = 32
    2121    Width = 775
     
    3232  object StatusBar1: TStatusBar
    3333    Left = 0
    34     Height = 29
    35     Top = 563
     34    Height = 21
     35    Top = 579
    3636    Width = 775
    3737    Panels = <   
     
    8383      Action = Core.ASettings
    8484    end
     85    object ToolButton6: TToolButton
     86      Left = 171
     87      Top = 2
     88      Action = AZoomIn
     89    end
     90    object ToolButton7: TToolButton
     91      Left = 203
     92      Top = 2
     93      Action = AZoomOut
     94    end
     95    object ToolButton8: TToolButton
     96      Left = 235
     97      Top = 2
     98      Action = AZoomAll
     99    end
     100    object ToolButton9: TToolButton
     101      Left = 161
     102      Top = 2
     103      Width = 10
     104      Caption = 'ToolButton9'
     105      Style = tbsSeparator
     106    end
    85107  end
    86108  object MainMenu1: TMainMenu
     
    129151        Caption = '-'
    130152      end
     153      object MenuItem21: TMenuItem
     154        Action = AToolBarVisible
     155      end
    131156      object MenuItem20: TMenuItem
    132157        Action = AToolBarBigIcons
     158      end
     159      object MenuItem22: TMenuItem
     160        Action = AStatusBarVisible
    133161      end
    134162    end
     
    158186    object AZoomIn: TAction
    159187      Caption = 'Zoom in'
     188      ImageIndex = 8
    160189      OnExecute = AZoomInExecute
    161190      ShortCut = 16491
     
    163192    object AZoomOut: TAction
    164193      Caption = 'Zoom out'
     194      ImageIndex = 9
    165195      OnExecute = AZoomOutExecute
    166196      ShortCut = 16493
     
    168198    object AZoomAll: TAction
    169199      Caption = 'Zoom all'
     200      ImageIndex = 7
    170201      OnExecute = AZoomAllExecute
    171202      ShortCut = 16449
     
    174205      Caption = 'Toolbar big icons'
    175206      OnExecute = AToolBarBigIconsExecute
     207    end
     208    object AToolBarVisible: TAction
     209      Caption = 'Toolbar visible'
     210      OnExecute = AToolBarVisibleExecute
     211    end
     212    object AStatusBarVisible: TAction
     213      Caption = 'Statusbar visible'
     214      OnExecute = AStatusBarVisibleExecute
    176215    end
    177216  end
  • trunk/Forms/UFormMain.lrt

    r46 r58  
    11TFORMMAIN.CAPTION=xTactics
     2TFORMMAIN.TOOLBUTTON9.CAPTION=ToolButton9
    23TFORMMAIN.MENUITEM1.CAPTION=Game
    34TFORMMAIN.MENUITEM5.CAPTION=-
     
    1011TFORMMAIN.AZOOMALL.CAPTION=Zoom all
    1112TFORMMAIN.ATOOLBARBIGICONS.CAPTION=Toolbar big icons
     13TFORMMAIN.ATOOLBARVISIBLE.CAPTION=Toolbar visible
     14TFORMMAIN.ASTATUSBARVISIBLE.CAPTION=Statusbar visible
  • trunk/Forms/UFormMain.pas

    r52 r58  
    1717
    1818  TFormMain = class(TForm)
     19    AStatusBarVisible: TAction;
     20    AToolBarVisible: TAction;
    1921    AToolBarBigIcons: TAction;
    2022    AZoomIn: TAction;
     
    3638    MenuItem2: TMenuItem;
    3739    MenuItem20: TMenuItem;
     40    MenuItem21: TMenuItem;
     41    MenuItem22: TMenuItem;
    3842    MenuItem3: TMenuItem;
    3943    MenuItem4: TMenuItem;
     
    5357    ToolButton4: TToolButton;
    5458    ToolButton5: TToolButton;
     59    ToolButton6: TToolButton;
     60    ToolButton7: TToolButton;
     61    ToolButton8: TToolButton;
     62    ToolButton9: TToolButton;
     63    procedure AStatusBarVisibleExecute(Sender: TObject);
    5564    procedure AToolBarBigIconsExecute(Sender: TObject);
     65    procedure AToolBarVisibleExecute(Sender: TObject);
    5666    procedure AZoomAllExecute(Sender: TObject);
    5767    procedure AZoomInExecute(Sender: TObject);
     
    149159  with Config do begin
    150160    AToolBarBigIcons.Checked := GetValue(Path + '/LargeIcons', False);
     161    AToolBarVisible.Checked := GetValue(Path + '/ToolBarVisible', True);
     162    AStatusBarVisible.Checked := GetValue(Path + '/StatusBarVisible', True);
    151163  end;
    152164end;
     
    156168  with Config do begin
    157169    SetValue(Path + '/LargeIcons', AToolBarBigIcons.Checked);
     170    SetValue(Path + '/ToolBarVisible', AToolBarVisible.Checked);
     171    SetValue(Path + '/StatusBarVisible', AStatusBarVisible.Checked);
    158172  end;
    159173end;
     
    172186    ToolBar1.Images := Core.ImageListSmall;
    173187  end;
     188  ToolBar1.Visible := AToolBarVisible.Checked;
     189  StatusBar1.Visible := AStatusBarVisible.Checked;
    174190end;
    175191
     
    209225begin
    210226  AToolBarBigIcons.Checked := not AToolBarBigIcons.Checked;
     227  ReloadView;
     228end;
     229
     230procedure TFormMain.AStatusBarVisibleExecute(Sender: TObject);
     231begin
     232  AStatusBarVisible.Checked := not AStatusBarVisible.Checked;
     233  ReloadView;
     234end;
     235
     236procedure TFormMain.AToolBarVisibleExecute(Sender: TObject);
     237begin
     238  AToolBarVisible.Checked := not AToolBarVisible.Checked;
    211239  ReloadView;
    212240end;
Note: See TracChangeset for help on using the changeset viewer.