- Timestamp:
- Jun 10, 2018, 12:18:28 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.lfm
r206 r220 5 5 Width = 775 6 6 Caption = 'xTactics' 7 ClientHeight = 5 967 ClientHeight = 587 8 8 ClientWidth = 775 9 DesignTimePPI = 1 209 DesignTimePPI = 144 10 10 Menu = MainMenu1 11 11 OnClose = FormClose … … 77 77 object PanelMain: TPanel 78 78 Left = 0 79 Height = 5 5679 Height = 547 80 80 Top = 40 81 81 Width = 775 … … 169 169 end 170 170 end 171 object MenuItemDebug: TMenuItem 172 Caption = 'Debug' 173 object MenuItem31: TMenuItem 174 Action = Core.AToggleFogOfWar 175 end 176 end 171 177 object MenuItem16: TMenuItem 172 178 Caption = 'Help' -
trunk/Forms/UFormMain.pas
r207 r220 44 44 MenuItem28: TMenuItem; 45 45 MenuItem29: TMenuItem; 46 MenuItemDebug: TMenuItem; 47 MenuItem31: TMenuItem; 46 48 MenuItem4: TMenuItem; 47 49 MenuItemLoadRecent: TMenuItem; … … 149 151 FormClient.ManualDock(PanelMain, nil, alClient); 150 152 FormClient.Align := alClient; 153 {$IFDEF DEBUG} 154 MenuItemDebug.Visible := True; 155 MenuItemDebug.Enabled := True; 156 {$ELSE} 157 MenuItemDebug.Visible := False; 158 MenuItemDebug.Enabled := False; 159 {$ENDIF} 151 160 end; 152 161 -
trunk/Forms/UFormSettings.lfm
r195 r220 10 10 Constraints.MinHeight = 327 11 11 Constraints.MinWidth = 554 12 DesignTimePPI = 1 2012 DesignTimePPI = 144 13 13 OnCreate = FormCreate 14 14 OnShow = FormShow … … 40 40 Top = 4 41 41 Width = 546 42 ActivePage = TabSheet General42 ActivePage = TabSheetDebug 43 43 Align = alTop 44 44 Anchors = [akTop, akLeft, akRight, akBottom] 45 45 BorderSpacing.Around = 4 46 TabIndex = 046 TabIndex = 1 47 47 TabOrder = 2 48 48 object TabSheetGeneral: TTabSheet 49 49 Caption = 'General' 50 ClientHeight = 2 3151 ClientWidth = 5 3850 ClientHeight = 220 51 ClientWidth = 540 52 52 object Label2: TLabel 53 53 Left = 20 54 Height = 2 054 Height = 26 55 55 Top = 78 56 Width = 1 1656 Width = 150 57 57 Caption = 'Animation speed:' 58 58 ParentColor = False … … 60 60 object SpinEditAnimSpeed: TSpinEdit 61 61 Left = 232 62 Height = 2862 Height = 36 63 63 Top = 72 64 64 Width = 122 … … 67 67 object Label3: TLabel 68 68 Left = 368 69 Height = 2 069 Height = 26 70 70 Top = 82 71 Width = 1 271 Width = 15 72 72 Caption = '%' 73 73 ParentColor = False … … 77 77 Height = 27 78 78 Top = 112 79 Width = 58 479 Width = 586 80 80 Anchors = [akTop, akLeft, akRight] 81 81 AutoSize = False … … 85 85 object Label1: TLabel 86 86 Left = 20 87 Height = 2 087 Height = 26 88 88 Top = 26 89 Width = 6889 Width = 88 90 90 Caption = 'Language:' 91 91 ParentColor = False … … 93 93 object ComboBoxLanguage: TComboBox 94 94 Left = 178 95 Height = 2895 Height = 40 96 96 Top = 24 97 97 Width = 196 98 ItemHeight = 2098 ItemHeight = 0 99 99 Style = csDropDownList 100 100 TabOrder = 2 … … 102 102 object CheckBoxReopenLastFile: TCheckBox 103 103 Left = 20 104 Height = 24104 Height = 30 105 105 Top = 152 106 Width = 198106 Width = 249 107 107 Caption = 'Reopen last game on start' 108 108 TabOrder = 3 … … 125 125 object Label4: TLabel 126 126 Left = 14 127 Height = 2 5127 Height = 26 128 128 Top = 67 129 Width = 3 2129 Width = 35 130 130 Caption = 'DPI:' 131 131 ParentColor = False … … 133 133 object SpinEditX: TSpinEdit 134 134 Left = 104 135 Height = 3 3135 Height = 36 136 136 Top = 64 137 137 Width = 96 … … 143 143 object SpinEditY: TSpinEdit 144 144 Left = 232 145 Height = 3 3145 Height = 36 146 146 Top = 64 147 147 Width = 90 … … 153 153 object Label5: TLabel 154 154 Left = 208 155 Height = 2 5155 Height = 26 156 156 Top = 67 157 Width = 8157 Width = 10 158 158 Caption = 'x' 159 159 ParentColor = False -
trunk/Languages/xtactics.cs.po
r215 r220 103 103 msgstr "Pohyby jednotek" 104 104 105 #: tcore.atogglefogofwar.caption 106 msgid "Toggle fog of war" 107 msgstr "Přepnout Skrytou mapu" 108 105 109 #: tformabout.buttonclose.caption 106 110 msgid "Close" … … 278 282 msgstr "Nástroje" 279 283 284 #: tformmain.menuitemdebug.caption 285 msgctxt "tformmain.menuitemdebug.caption" 286 msgid "Debug" 287 msgstr "Ladění" 288 280 289 #: tformmain.menuitemloadrecent.caption 281 290 msgctxt "tformmain.menuitemloadrecent.caption" … … 711 720 712 721 #: tformsettings.tabsheetdebug.caption 722 msgctxt "tformsettings.tabsheetdebug.caption" 713 723 msgid "Debug" 714 724 msgstr "Ladění" … … 1026 1036 msgid "64-bit UInt read overflow." 1027 1037 msgstr "Přetečení při čtení 64-bit UInt" 1028 -
trunk/Languages/xtactics.po
r213 r220 93 93 msgstr "" 94 94 95 #: tcore.atogglefogofwar.caption 96 msgid "Toggle fog of war" 97 msgstr "" 98 95 99 #: tformabout.buttonclose.caption 96 100 msgid "Close" … … 267 271 msgstr "" 268 272 273 #: tformmain.menuitemdebug.caption 274 msgctxt "tformmain.menuitemdebug.caption" 275 msgid "Debug" 276 msgstr "" 277 269 278 #: tformmain.menuitemloadrecent.caption 270 279 msgctxt "tformmain.menuitemloadrecent.caption" … … 696 705 697 706 #: tformsettings.tabsheetdebug.caption 707 msgctxt "tformsettings.tabsheetdebug.caption" 698 708 msgid "Debug" 699 709 msgstr "" -
trunk/UCore.lfm
r213 r220 98 98 Caption = 'Key shortcuts' 99 99 OnExecute = AShowKeyShortcutsExecute 100 end 101 object AToggleFogOfWar: TAction 102 Caption = 'Toggle fog of war' 103 OnExecute = AToggleFogOfWarExecute 100 104 end 101 105 end -
trunk/UCore.pas
r216 r220 17 17 TCore = class(TDataModule) 18 18 AAbout: TAction; 19 AToggleFogOfWar: TAction; 19 20 AShowKeyShortcuts: TAction; 20 21 AGameSave: TAction; … … 57 58 procedure AShowKeyShortcutsExecute(Sender: TObject); 58 59 procedure AShowUnitMovesExecute(Sender: TObject); 60 procedure AToggleFogOfWarExecute(Sender: TObject); 59 61 procedure CoolTranslator1Translate(Sender: TObject); 60 62 procedure DataModuleCreate(Sender: TObject); … … 389 391 end; 390 392 393 procedure TCore.AToggleFogOfWarExecute(Sender: TObject); 394 begin 395 Game.FogOfWar := not Game.FogOfWar; 396 Server.DoChange(Self); 397 end; 398 391 399 procedure TCore.CoolTranslator1Translate(Sender: TObject); 392 400 begin -
trunk/UGame.pas
r219 r220 207 207 CellLinks: TCellLinks; 208 208 Areas: TMapAreas; 209 Cyclic: Boolean; 209 210 function IsOutsideShape(Coord: TPoint): Boolean; virtual; 210 211 function IsCellsNeighbor(Cell1, Cell2: TCell): Boolean; virtual; … … 946 947 else Pen.Width := 1; 947 948 Angle := ArcTan((PosTo.Y - PosFrom.Y) / (PosTo.X - PosFrom.X)); 949 if (Angle > +Pi) or (Angle < -Pi) then 950 raise Exception.Create('Wrong arrow angle ' + FloatToStr(Angle)); 951 948 952 if Sign(PosTo.X - PosFrom.X) = -1 then Angle := Angle + Pi; 949 953 ArrowCenter := View.CellToCanvasPos(TPoint.Create(Trunc(PosFrom.X + (PosTo.X - PosFrom.X) / 2), … … 3246 3250 for I := 0 to Cells.Count - 1 do begin 3247 3251 if I = 0 then Player := Cells[I].Player; 3248 if not Assigned(Cells[I].Player) or (Cells[I].Player <> Player) then begin 3252 if not Assigned(Cells[I].Player) then begin 3253 R := False; 3254 Break; 3255 end; 3256 if (Cells[I].Player <> Player) then begin 3249 3257 R := False; 3250 3258 Break; -
trunk/UGameClient.pas
r213 r220 44 44 procedure DoNextPlayerHandler(Sender: TObject); 45 45 procedure DoNextPlayer; 46 procedure DoParametersChangedHandler(Sender: TObject); 46 47 public 47 48 Name: string; … … 172 173 end; 173 174 175 procedure TClient.DoParametersChangedHandler(Sender: TObject); 176 begin 177 Synchronize(DoChange); 178 end; 179 174 180 procedure TClient.SetControlPlayer(AValue: TPlayer); 175 181 begin … … 232 238 Protocol.OnGameEnd := DoGameEndHandler; 233 239 Protocol.OnNextPlayer := DoNextPlayerHandler; 240 Protocol.OnParametersChanged := DoParametersChangedHandler; 234 241 end; 235 242 -
trunk/UGameProtocol.pas
r215 r220 10 10 type 11 11 TCommand = (cmdTextMessage, cmdTurnStart, cmdTurnEnd, cmdGameStart, cmdGameEnd, 12 cmdSurrender, cmdNextPlayer );12 cmdSurrender, cmdNextPlayer, cmdParametersChanged); 13 13 TCommandEvent = procedure (Command: TCommand; DataIn, DataOut: TStream); 14 14 … … 24 24 FOnGameStart: TNotifyEvent; 25 25 FOnNextPlayer: TNotifyEvent; 26 FOnParametersChanged: TNotifyEvent; 26 27 FOnTurnStart: TNotifyEvent; 27 28 procedure Receive(Sender: TCommPin; Stream: TListByte); … … 38 39 property OnTurnStart: TNotifyEvent read FOnTurnStart write FOnTurnStart; 39 40 property OnNextPlayer: TNotifyEvent read FOnNextPlayer write FOnNextPlayer; 41 property OnParametersChanged: TNotifyEvent read FOnParametersChanged 42 write FOnParametersChanged; 40 43 end; 41 44 … … 58 61 procedure GameEnd; 59 62 procedure TurnStart; 63 procedure ParametersChanged; 60 64 procedure NextPlayer; 61 65 property OnSendMessage: TSendMessageEvent read FOnSendMessage … … 139 143 end; 140 144 145 procedure TGameProtocolServer.ParametersChanged; 146 begin 147 SendCmd(cmdParametersChanged); 148 end; 149 141 150 procedure TGameProtocolServer.NextPlayer; 142 151 begin … … 167 176 if Command = Integer(cmdNextPlayer) then begin 168 177 if Assigned(FOnNextPlayer) then FOnNextPlayer(Self); 178 end else 179 if Command = Integer(cmdParametersChanged) then begin 180 if Assigned(FOnParametersChanged) then FOnParametersChanged(Self); 169 181 end; 170 182 finally -
trunk/UGameServer.pas
r213 r220 47 47 procedure SetGame(AValue: TGame); 48 48 procedure SetServerMode(AValue: TServerMode); 49 procedure DoChange(Sender: TObject);50 49 procedure GameStarted(Sender: TObject); 51 50 public … … 55 54 RemoteNetworkAddress: string; 56 55 RemoteNetworkPort: Word; 56 procedure DoChange(Sender: TObject); 57 57 function GetNewServerClient: TServerClient; 58 58 procedure LoadConfig(Config: TXmlConfig; Path: string); … … 90 90 procedure TServerClient.DoChange; 91 91 begin 92 92 Protocol.ParametersChanged; 93 93 end; 94 94
Note:
See TracChangeset
for help on using the changeset viewer.