Changeset 414 for trunk/Forms
- Timestamp:
- Jan 10, 2025, 4:24:19 PM (12 days ago)
- Location:
- trunk/Forms
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/FormClient.pas
r404 r414 320 320 if RedrawPending and not Drawing then begin 321 321 Drawing := True; 322 if not Core.Core.DevelMode then RedrawPending := False; 322 RedrawPending := False; 323 Timer1.Enabled := False; 323 324 TimerPeriod := (9 * TimerPeriod + (Now - LastTimerTime)) / 10; 324 325 LastTimerTime := Now; … … 358 359 begin 359 360 Redraw; 361 Core.Core.FormMain.UpdateInterface; 360 362 end; 361 363 … … 421 423 begin 422 424 RedrawPending := True; 425 Timer1.Enabled := True; 423 426 end; 424 427 -
trunk/Forms/FormMain.lfm
r364 r414 1 1 object FormMain: TFormMain 2 2 Left = 534 3 Height = 9 593 Height = 925 4 4 Top = 223 5 5 Width = 1491 6 6 Caption = 'xTactics' 7 ClientHeight = 9 597 ClientHeight = 925 8 8 ClientWidth = 1491 9 9 DesignTimePPI = 144 … … 97 97 object PanelMain: TPanel 98 98 Left = 0 99 Height = 91999 Height = 885 100 100 Top = 40 101 101 Width = 1491 … … 107 107 object MainMenu1: TMainMenu 108 108 Images = Core.ImageListSmall 109 Left = 224110 Top = 48109 Left = 88 110 Top = 112 111 111 object MenuItem1: TMenuItem 112 112 Caption = 'Game' … … 233 233 end 234 234 end 235 object Timer1: TTimer236 Interval = 20237 OnTimer = Timer1Timer238 Left = 128239 Top = 263240 end241 235 object ActionList1: TActionList 242 236 Images = Core.ImageListSmall 243 Left = 280244 Top = 1 52237 Left = 88 238 Top = 184 245 239 object AToolBarBigIcons: TAction 246 240 Caption = 'Toolbar big icons' … … 265 259 end 266 260 object PopupMenuToolbar: TPopupMenu 267 Left = 4 52268 Top = 98261 Left = 432 262 Top = 112 269 263 object MenuItem18: TMenuItem 270 264 Action = AToolBarBigIcons … … 272 266 end 273 267 object PopupMenuOpenRecent: TPopupMenu 274 Left = 4 48275 Top = 251268 Left = 432 269 Top = 184 276 270 end 277 271 end -
trunk/Forms/FormMain.pas
r364 r414 67 67 PopupMenuToolbar: TPopupMenu; 68 68 Separator1: TMenuItem; 69 Timer1: TTimer;70 69 ToolBar1: TToolBar; 71 70 ToolButton1: TToolButton; … … 94 93 procedure FormDestroy(Sender: TObject); 95 94 procedure EraseBackground(DC: HDC); override; 96 procedure Timer1Timer(Sender: TObject);97 95 private 98 96 FormActivated: Boolean; … … 106 104 FormUnitMoves: TFormUnitMoves; 107 105 FormCharts: TFormCharts; 106 procedure UpdateInterface; 108 107 procedure LoadConfig(Config: TXmlConfig; Path: string); 109 108 procedure SaveConfig(Config: TXmlConfig; Path: string); … … 128 127 begin 129 128 // Do nothing, all background space covered by controls 130 end;131 132 procedure TFormMain.Timer1Timer(Sender: TObject);133 var134 NewCaption: string;135 begin136 NewCaption := 'xTactics';137 if Assigned(Core.Core.Game.CurrentPlayer) then138 NewCaption := Core.Core.Game.CurrentPlayer.Name + ' - ' + STurn + ' ' +139 IntToStr(Core.Core.Game.TurnCounter) + ' - ' + NewCaption;140 Caption := NewCaption;141 129 end; 142 130 … … 311 299 end; 312 300 301 procedure TFormMain.UpdateInterface; 302 var 303 NewCaption: string; 304 begin 305 NewCaption := 'xTactics'; 306 if Assigned(Core.Core.Game.CurrentPlayer) then 307 NewCaption := Core.Core.Game.CurrentPlayer.Name + ' - ' + STurn + ' ' + 308 IntToStr(Core.Core.Game.TurnCounter) + ' - ' + NewCaption; 309 Caption := NewCaption; 310 end; 311 313 312 procedure TFormMain.FormShow(Sender: TObject); 314 313 begin
Note:
See TracChangeset
for help on using the changeset viewer.