Changeset 79 for trunk/Forms
- Timestamp:
- Feb 11, 2021, 11:20:18 PM (4 years ago)
- Location:
- trunk/Forms
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.lfm
r72 r79 18 18 LCLVersion = '2.0.10.0' 19 19 object MainMenu1: TMainMenu 20 Left = 32 520 Left = 328 21 21 Top = 152 22 22 object MenuItemGame: TMenuItem … … 33 33 object MenuItemExit: TMenuItem 34 34 Action = Core.AExit 35 end 36 end 37 object MenuItem5: TMenuItem 38 Caption = 'View' 39 object MenuItemFullScreen: TMenuItem 40 Caption = 'Full screen' 41 ShortCut = 122 42 OnClick = MenuItemFullScreenClick 35 43 end 36 44 end -
trunk/Forms/UFormMain.lrj
r72 r79 2 2 {"hash":217976,"name":"tformmain.caption","sourcebytes":[50,48,52,56],"value":"2048"}, 3 3 {"hash":317493,"name":"tformmain.menuitemgame.caption","sourcebytes":[71,97,109,101],"value":"Game"}, 4 {"hash":380871,"name":"tformmain.menuitem5.caption","sourcebytes":[86,105,101,119],"value":"View"}, 5 {"hash":131549534,"name":"tformmain.menuitemfullscreen.caption","sourcebytes":[70,117,108,108,32,115,99,114,101,101,110],"value":"Full screen"}, 4 6 {"hash":5989939,"name":"tformmain.menuitemtools.caption","sourcebytes":[84,111,111,108,115],"value":"Tools"}, 5 7 {"hash":322608,"name":"tformmain.menuitemhelp.caption","sourcebytes":[72,101,108,112],"value":"Help"} -
trunk/Forms/UFormMain.pas
r72 r79 28 28 MenuItem3: TMenuItem; 29 29 MenuItem4: TMenuItem; 30 MenuItem5: TMenuItem; 31 MenuItemFullScreen: TMenuItem; 30 32 MenuItemMovesHistory: TMenuItem; 31 33 MenuItemTools: TMenuItem; … … 47 49 procedure FormPaint(Sender: TObject); 48 50 procedure FormShow(Sender: TObject); 51 procedure MenuItemFullScreenClick(Sender: TObject); 49 52 procedure TimerDrawTimer(Sender: TObject); 50 53 procedure EraseBackground(DC: HDC); override; … … 56 59 MoveBuffer: array of TMoveDirection; 57 60 MoveBufferLock: TCriticalSection; 61 FullScreen: Boolean; 58 62 procedure AddToMoveBuffer(Direction: TMoveDirection); 59 63 procedure ProcessMoveBuffer; 64 procedure ToggleFullscreen; 60 65 public 61 66 MoveThread: TMoveThread; … … 87 92 88 93 procedure TFormMain.FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); 94 const 95 KeyLeft = 37; 96 KeyUp = 38; 97 KeyRight = 39; 98 KeyDown = 40; 89 99 begin 90 100 if Core.Game.Running then begin 91 101 case Key of 92 37: AddToMoveBuffer(drLeft);93 38: AddToMoveBuffer(drUp);94 39: AddToMoveBuffer(drRight);95 40: AddToMoveBuffer(drDown);102 KeyLeft: AddToMoveBuffer(drLeft); 103 KeyUp: AddToMoveBuffer(drUp); 104 KeyRight: AddToMoveBuffer(drRight); 105 KeyDown: AddToMoveBuffer(drDown); 96 106 end; 97 107 //ProcessMoveBuffer; … … 184 194 Core.PersistentForm1.RegistryContext := Core.ApplicationInfo1.GetRegistryContext; 185 195 Core.PersistentForm1.Load(Self); 196 FullScreen := Core.PersistentForm1.FormFullScreen; 186 197 Core.ThemeManager1.UseTheme(Self); 187 198 UpdateInterface; … … 189 200 InitialTileCount then 190 201 Core.Game.New; 202 end; 203 204 procedure TFormMain.MenuItemFullScreenClick(Sender: TObject); 205 begin 206 ToggleFullscreen; 191 207 end; 192 208 … … 235 251 end; 236 252 253 procedure TFormMain.ToggleFullscreen; 254 begin 255 FullScreen := not FullScreen; 256 Core.PersistentForm1.SetFullScreen(FormMain.FullScreen); 257 UpdateInterface; 258 end; 259 237 260 procedure TFormMain.Redraw; 238 261 begin … … 245 268 ToolsVisible: Boolean; 246 269 begin 270 MenuItemFullScreen.Checked := FullScreen; 247 271 MenuItemMovesHistory.Visible := Core.Game.RecordHistory; 248 272 ToolsVisible := False; -
trunk/Forms/UFormNew.lfm
r49 r79 11 11 OnCreate = FormCreate 12 12 OnShow = FormShow 13 LCLVersion = '2.0. 2.0'13 LCLVersion = '2.0.10.0' 14 14 object Label1: TLabel 15 15 Left = 16 16 Height = 2 616 Height = 24 17 17 Top = 16 18 18 Width = 93 … … 74 74 Height = 30 75 75 Top = 88 76 Width = 2 1076 Width = 209 77 77 Caption = 'Record moves history' 78 78 TabOrder = 4 … … 80 80 object Label2: TLabel 81 81 Left = 16 82 Height = 2 682 Height = 24 83 83 Top = 125 84 84 Width = 75 … … 88 88 object ComboBoxSkin: TComboBox 89 89 Left = 173 90 Height = 3 890 Height = 37 91 91 Top = 120 92 92 Width = 262
Note:
See TracChangeset
for help on using the changeset viewer.