Changeset 268 for trunk/Forms
- Timestamp:
- Jan 20, 2019, 9:32:16 PM (6 years ago)
- Location:
- trunk/Forms
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormClient.pas
r265 r268 254 254 ) 255 255 ); 256 Client.DrawCities(PaintBox1.Canvas, TempView); 257 end; 258 end; 259 for Y := 0 to CountP.Y do begin 260 for X := 0 to CountP.X do begin 261 TempView.Assign(View); 262 TempView.DestRect := TRect.Create( 263 TPoint.Create( 264 -StartP.X + R.Size.X * X, 265 -StartP.Y + R.Size.Y * Y 266 ), 267 TPoint.Create( 268 -StartP.X + R.Size.X * X + View.DestRect.Size.X, 269 -StartP.Y + R.Size.Y * Y + View.DestRect.Size.Y 270 ) 271 ); 272 Client.DrawSelection(PaintBox1.Canvas, TempView); 273 end; 274 end; 275 TempView.Free; 276 for Y := 0 to CountP.Y do begin 277 for X := 0 to CountP.X do begin 278 TempView.Assign(View); 279 TempView.DestRect := TRect.Create( 280 TPoint.Create( 281 -StartP.X + R.Size.X * X, 282 -StartP.Y + R.Size.Y * Y 283 ), 284 TPoint.Create( 285 -StartP.X + R.Size.X * X + View.DestRect.Size.X, 286 -StartP.Y + R.Size.Y * Y + View.DestRect.Size.Y 287 ) 288 ); 256 289 Client.DrawArrows(PaintBox1.Canvas, TempView); 257 290 end; 258 291 end; 259 TempView.Free;260 292 end else begin 261 293 Client.DrawCellLinks(PaintBox1.Canvas, View); 262 294 Client.Paint(PaintBox1.Canvas, View); 295 Client.DrawCities(PaintBox1.Canvas, View); 296 Client.DrawSelection(PaintBox1.Canvas, View); 263 297 Client.DrawArrows(PaintBox1.Canvas, View); 264 298 end; … … 316 350 FClient.OnNextPlayer := DoNextPlayer; 317 351 FClient.View.DestRect := TRect.CreateBounds(TPoint.Create(0, 0), TPoint.Create(PaintBox1.Width, PaintBox1.Height)); 352 FClient.ShowCellGrid := Core.ShowCellGrid; 318 353 end; 319 354 Redraw; -
trunk/Forms/UFormMain.lfm
r250 r268 15 15 OnKeyUp = FormKeyUp 16 16 OnShow = FormShow 17 LCLVersion = '1.8. 2.0'17 LCLVersion = '1.8.4.0' 18 18 WindowState = wsMaximized 19 19 object ToolBar1: TToolBar … … 146 146 Caption = '-' 147 147 end 148 object MenuItem33: TMenuItem 149 Action = AMapGridVisible 150 end 148 151 object MenuItem21: TMenuItem 149 152 Action = AToolBarVisible … … 218 221 OnExecute = AStatusBarVisibleExecute 219 222 end 223 object AMapGridVisible: TAction 224 Caption = 'Map grid visible' 225 OnExecute = AMapGridVisibleExecute 226 end 220 227 end 221 228 object PopupMenuToolbar: TPopupMenu -
trunk/Forms/UFormMain.pas
r253 r268 18 18 19 19 TFormMain = class(TForm) 20 AMapGridVisible: TAction; 20 21 AStatusBarVisible: TAction; 21 22 AToolBarVisible: TAction; … … 47 48 MenuItem30: TMenuItem; 48 49 MenuItem32: TMenuItem; 50 MenuItem33: TMenuItem; 49 51 MenuItemDebug: TMenuItem; 50 52 MenuItem31: TMenuItem; … … 70 72 ToolButton5: TToolButton; 71 73 ToolButton9: TToolButton; 74 procedure AMapGridVisibleExecute(Sender: TObject); 72 75 procedure AStatusBarVisibleExecute(Sender: TObject); 73 76 procedure AToolBarBigIconsExecute(Sender: TObject); … … 178 181 end; 179 182 183 procedure TFormMain.AMapGridVisibleExecute(Sender: TObject); 184 begin 185 AMapGridVisible.Checked := not AMapGridVisible.Checked; 186 UpdateClientForms; 187 end; 188 180 189 procedure TFormMain.AToolBarBigIconsExecute(Sender: TObject); 181 190 begin … … 211 220 Core.PersistentForm.Save(Self); 212 221 SaveConfig(Core.XMLConfig1, 'FormMain'); 222 Core.ShowCellGrid := AMapGridVisible.Checked; 213 223 Core.Done; 214 224 end; … … 234 244 FormClient.AStatusBarVisible.Checked := AStatusBarVisible.Checked; 235 245 FormClient.AStatusBarVisible.Update; 246 Core.ShowCellGrid := AMapGridVisible.Checked; 247 if Assigned(FormClient.Client) then 248 FormClient.Client.ShowCellGrid := Core.ShowCellGrid; 249 FormClient.Redraw; 236 250 for I := 0 to Core.FormClients.Count - 1 do begin 237 251 Core.FormClients[I].AToolBarBigIcons.Checked := AToolBarBigIcons.Checked; … … 241 255 Core.FormClients[I].AStatusBarVisible.Checked := AStatusBarVisible.Checked; 242 256 Core.FormClients[I].AStatusBarVisible.Update; 257 if Assigned(Core.FormClients[I].Client) then 258 Core.FormClients[I].Client.ShowCellGrid := Core.ShowCellGrid; 259 Core.FormClients[I].Redraw; 243 260 end; 244 261 end; … … 248 265 if not FormShown then begin 249 266 Core.LoadConfig; 267 AMapGridVisible.Checked := Core.ShowCellGrid; 250 268 Core.ScaleDPI; 251 269 Core.PersistentForm.Load(Self, True); -
trunk/Forms/UFormNew.lfm
r266 r268 21 21 Top = 4 22 22 Width = 749 23 ActivePage = TabSheet Rules23 ActivePage = TabSheetMode 24 24 Align = alClient 25 25 BorderSpacing.Around = 4 26 TabIndex = 326 TabIndex = 0 27 27 TabOrder = 0 28 28 object TabSheetMode: TTabSheet … … 32 32 object Panel3: TPanel 33 33 Left = 0 34 Height = 65 134 Height = 655 35 35 Top = 0 36 Width = 7 4336 Width = 739 37 37 Align = alClient 38 38 BevelOuter = bvNone 39 ClientHeight = 65 140 ClientWidth = 7 4339 ClientHeight = 655 40 ClientWidth = 739 41 41 TabOrder = 0 42 42 object RadioButtonModeLocal: TRadioButton … … 44 44 Height = 30 45 45 Top = 14 46 Width = 6846 Width = 70 47 47 Caption = 'Local' 48 48 Checked = True … … 55 55 Height = 30 56 56 Top = 48 57 Width = 15 457 Width = 156 58 58 Caption = 'Network server' 59 59 OnChange = RadioButtonModeLocalChange … … 64 64 Height = 30 65 65 Top = 152 66 Width = 1 4966 Width = 151 67 67 Caption = 'Network client' 68 68 OnChange = RadioButtonModeLocalChange … … 71 71 object EditServerAddress: TEdit 72 72 Left = 24 73 Height = 3673 Height = 43 74 74 Top = 112 75 75 Width = 220 … … 78 78 object SpinEditServerPort: TSpinEdit 79 79 Left = 256 80 Height = 3680 Height = 43 81 81 Top = 112 82 82 Width = 79 … … 102 102 object ListViewServers: TListView 103 103 Left = 26 104 Height = 4 19104 Height = 423 105 105 Top = 181 106 106 Width = 334 … … 130 130 Left = 27 131 131 Height = 31 132 Top = 61 2132 Top = 616 133 133 Width = 94 134 134 Action = AServerAdd … … 139 139 Left = 240 140 140 Height = 31 141 Top = 61 2141 Top = 616 142 142 Width = 94 143 143 Action = AServerRemove … … 148 148 Left = 136 149 149 Height = 30 150 Top = 61 2150 Top = 616 151 151 Width = 94 152 152 Action = AServerModify … … 324 324 object ComboBoxGridType: TComboBox 325 325 Left = 146 326 Height = 42326 Height = 38 327 327 Top = 104 328 328 Width = 208 … … 340 340 object ComboBoxMapShape: TComboBox 341 341 Left = 146 342 Height = 42342 Height = 38 343 343 Top = 144 344 344 Width = 208
Note:
See TracChangeset
for help on using the changeset viewer.