- Timestamp:
- Feb 17, 2016, 1:17:21 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormAbout.lfm
r98 r107 1 1 object FormAbout: TFormAbout 2 2 Left = 475 3 Height = 2293 Height = 150 4 4 Top = 161 5 5 Width = 313 6 6 BorderStyle = bsDialog 7 7 Caption = 'About' 8 ClientHeight = 2298 ClientHeight = 150 9 9 ClientWidth = 313 10 Constraints.MinHeight = 150 11 Constraints.MinWidth = 313 10 12 Font.Height = -11 11 13 Font.Name = 'MS Sans Serif' 12 14 OnShow = FormShow 13 15 Position = poMainFormCenter 14 LCLVersion = '1. 3'16 LCLVersion = '1.4.4.0' 15 17 object Panel1: TPanel 16 18 Left = 8 17 Height = 17619 Height = 97 18 20 Top = 8 19 21 Width = 299 … … 21 23 BevelInner = bvRaised 22 24 BevelOuter = bvLowered 23 ClientHeight = 17625 ClientHeight = 97 24 26 ClientWidth = 299 25 27 TabOrder = 0 26 28 object Memo1: TMemo 27 29 Left = 8 28 Height = 15730 Height = 78 29 31 Top = 8 30 32 Width = 277 … … 39 41 Left = 111 40 42 Height = 25 41 Top = 1 9643 Top = 117 42 44 Width = 75 43 45 Anchors = [akLeft, akBottom] -
trunk/Forms/UFormHelp.lfm
r98 r107 1 1 object FormHelp: TFormHelp 2 2 Left = 560 3 Height = 6833 Height = 223 4 4 Top = 144 5 Width = 8505 Width = 424 6 6 Caption = 'Help' 7 ClientHeight = 683 8 ClientWidth = 850 7 ClientHeight = 223 8 ClientWidth = 424 9 Constraints.MinHeight = 223 10 Constraints.MinWidth = 424 9 11 OnCreate = FormCreate 10 12 Position = poMainFormCenter 11 LCLVersion = '1. 3'13 LCLVersion = '1.4.4.0' 12 14 object Memo1: TMemo 13 15 Left = 6 14 Height = 67116 Height = 211 15 17 Top = 6 16 Width = 83818 Width = 412 17 19 Align = alClient 18 20 BorderSpacing.Around = 6 19 21 Lines.Strings = ( 20 'xTactics is a risk based strategic game. Main focus of the game is to offer player various possibilities to configure game conditions. Map for game is generated randomly for each play. Game is multiplayer so single player can play with other human opponents or with many computer opponents.' 22 'xTactics is a risk based strategic game. Main ' 23 'focus of the game is to offer player various ' 24 'possibilities to configure game conditions. ' 25 'Map for game is generated randomly for each ' 26 'play. Game is multiplayer so single player can ' 27 'play with other human opponents or with ' 28 'many computer opponents.' 21 29 ) 22 30 ReadOnly = True -
trunk/Forms/UFormMain.lfm
r100 r107 1 1 object FormMain: TFormMain 2 Left = 4902 Left = 784 3 3 Height = 621 4 Top = 3584 Top = 435 5 5 Width = 775 6 6 Caption = 'xTactics' 7 ClientHeight = 59 57 ClientHeight = 591 8 8 ClientWidth = 775 9 9 Menu = MainMenu1 … … 14 14 OnKeyUp = FormKeyUp 15 15 OnShow = FormShow 16 LCLVersion = '1. 3'16 LCLVersion = '1.4.4.0' 17 17 WindowState = wsMaximized 18 18 object StatusBar1: TStatusBar 19 19 Left = 0 20 Height = 2 621 Top = 56 920 Height = 28 21 Top = 563 22 22 Width = 775 23 23 Panels = < … … 35 35 object ToolBar1: TToolBar 36 36 Left = 0 37 Height = 56 937 Height = 563 38 38 Top = 0 39 Width = 4039 Width = 80 40 40 Align = alLeft 41 41 ButtonHeight = 32 … … 117 117 end 118 118 object PaintBox1: TPaintBox 119 Left = 40120 Height = 56 9119 Left = 80 120 Height = 563 121 121 Top = 0 122 Width = 735122 Width = 695 123 123 Align = alClient 124 124 OnMouseDown = PaintBox1MouseDown -
trunk/Forms/UFormMain.pas
r100 r107 141 141 PaintBox1.Canvas.Draw(0, 0, TempBitmap); 142 142 end else begin 143 {$ifdef WINDOWS} 144 PaintBox1.Canvas.Brush.Color := clBackground; //PaintBox1.GetColorResolvingParent; 145 PaintBox1.Canvas.FillRect(0, 0, PaintBox1.Width, PaintBox1.Height); 146 {$endif} 143 147 Paint(PaintBox1.Canvas); 144 148 end; … … 203 207 if AToolBarBigIcons.Checked then begin 204 208 ToolBar1.Images := Core.ImageListLarge; 205 ToolBar1.ButtonWidth := 32+ 7;206 ToolBar1.ButtonHeight := 32+ 6;207 ToolBar1. Height := 32+ 10;208 ToolBar1. Width := 32+ 10;209 ToolBar1.ButtonWidth := Core.ImageListLarge.Width + 7; 210 ToolBar1.ButtonHeight := Core.ImageListLarge.Height + 6; 211 ToolBar1.Width := Core.ImageListLarge.Width + 10; 212 ToolBar1.Height := Core.ImageListLarge.Height + 10; 209 213 end else begin 210 ToolBar1.ButtonWidth := 16 + 7;211 ToolBar1.ButtonHeight := 16 + 6;212 ToolBar1.Height := 16 + 10;213 ToolBar1.Width := 16 + 10;214 214 ToolBar1.Images := Core.ImageListSmall; 215 ToolBar1.ButtonWidth := Core.ImageListSmall.Width + 7; 216 ToolBar1.ButtonHeight := Core.ImageListSmall.Height + 6; 217 ToolBar1.Width := Core.ImageListSmall.Width + 10; 218 ToolBar1.Height := Core.ImageListSmall.Height + 10; 215 219 end; 216 220 ToolBar1.Visible := AToolBarVisible.Checked; -
trunk/Forms/UFormMove.lfm
r98 r107 8 8 ClientHeight = 257 9 9 ClientWidth = 367 10 Constraints.MinHeight = 257 11 Constraints.MinWidth = 367 10 12 OnCreate = FormCreate 11 13 OnKeyPress = FormKeyPress 12 14 OnShow = FormShow 13 15 Position = poMainFormCenter 14 LCLVersion = '1. 3'16 LCLVersion = '1.4.4.0' 15 17 object SpinEditOnce: TSpinEdit 16 18 Left = 208 17 Height = 3 219 Height = 33 18 20 Top = 40 19 21 Width = 98 … … 24 26 object Label1: TLabel 25 27 Left = 16 26 Height = 2 228 Height = 25 27 29 Top = 40 28 Width = 4 630 Width = 45 29 31 Caption = 'Once:' 30 32 ParentColor = False … … 51 53 object Label2: TLabel 52 54 Left = 24 53 Height = 2 255 Height = 25 54 56 Top = 136 55 Width = 9157 Width = 83 56 58 Caption = 'Every turn:' 57 59 ParentColor = False … … 59 61 object SpinEditRepeat: TSpinEdit 60 62 Left = 208 61 Height = 3 263 Height = 33 62 64 Top = 128 63 65 Width = 98 … … 132 134 object Label3: TLabel 133 135 Left = 16 134 Height = 2 2136 Height = 25 135 137 Top = 8 136 Width = 1 32138 Width = 126 137 139 Caption = 'Win probability:' 138 140 ParentColor = False … … 140 142 object LabelWinProbability: TLabel 141 143 Left = 264 142 Height = 2 2144 Height = 25 143 145 Top = 8 144 146 Width = 15 -
trunk/Forms/UFormNew.lfm
r100 r107 1 1 object FormNew: TFormNew 2 Left = 6243 Height = 5 194 Top = 3 135 Width = 12292 Left = 1176 3 Height = 501 4 Top = 331 5 Width = 677 6 6 Caption = 'New game' 7 ClientHeight = 519 8 ClientWidth = 1229 7 ClientHeight = 501 8 ClientWidth = 677 9 Constraints.MinHeight = 501 10 Constraints.MinWidth = 667 9 11 OnCreate = FormCreate 10 12 OnDestroy = FormDestroy 11 13 OnShow = FormShow 12 14 Position = poMainFormCenter 13 LCLVersion = '1. 3'15 LCLVersion = '1.4.4.0' 14 16 object ButtonCancel: TButton 15 Left = 100617 Left = 454 16 18 Height = 25 17 Top = 4 7719 Top = 459 18 20 Width = 75 19 21 Anchors = [akRight, akBottom] … … 23 25 end 24 26 object ButtonOk: TButton 25 Left = 111027 Left = 558 26 28 Height = 25 27 Top = 4 7729 Top = 459 28 30 Width = 75 29 31 Anchors = [akRight, akBottom] … … 34 36 object PageControl1: TPageControl 35 37 Left = 4 36 Height = 4 5738 Height = 439 37 39 Top = 4 38 Width = 122140 Width = 669 39 41 ActivePage = TabSheet2 40 42 Align = alTop … … 45 47 object TabSheet1: TTabSheet 46 48 Caption = 'Players' 47 ClientHeight = 41748 ClientWidth = 121549 ClientHeight = 398 50 ClientWidth = 854 49 51 object ListView1: TListView 50 52 Left = 4 51 Height = 3 6753 Height = 348 52 54 Top = 4 53 Width = 120755 Width = 846 54 56 Align = alTop 55 57 Anchors = [akTop, akLeft, akRight, akBottom] … … 88 90 Left = 224 89 91 Height = 25 90 Top = 3 7992 Top = 360 91 93 Width = 83 92 94 Action = APlayerRemove … … 97 99 Left = 16 98 100 Height = 25 99 Top = 3 79101 Top = 360 100 102 Width = 83 101 103 Action = APlayerAdd … … 106 108 Left = 120 107 109 Height = 25 108 Top = 3 79110 Top = 360 109 111 Width = 83 110 112 Action = APlayerModify … … 116 118 object TabSheet2: TTabSheet 117 119 Caption = 'Map' 118 ClientHeight = 4 17119 ClientWidth = 1215120 ClientHeight = 401 121 ClientWidth = 661 120 122 object Label1: TLabel 121 123 Left = 8 122 Height = 2 2124 Height = 25 123 125 Top = 9 124 Width = 92126 Width = 89 125 127 Caption = 'Map width:' 126 128 ParentColor = False … … 128 130 object Label2: TLabel 129 131 Left = 8 130 Height = 2 2132 Height = 25 131 133 Top = 57 132 Width = 9 9134 Width = 95 133 135 Caption = 'Map height:' 134 136 ParentColor = False … … 136 138 object SpinEditMapSizeX: TSpinEdit 137 139 Left = 128 138 Height = 3 2140 Height = 33 139 141 Top = 4 140 142 Width = 98 … … 146 148 object SpinEditMapSizeY: TSpinEdit 147 149 Left = 128 148 Height = 3 2150 Height = 33 149 151 Top = 55 150 152 Width = 98 … … 158 160 Height = 46 159 161 Top = 8 160 Width = 964162 Width = 410 161 163 Max = 100 162 164 Min = 2 … … 171 173 Height = 46 172 174 Top = 49 173 Width = 964175 Width = 410 174 176 Max = 100 175 177 Min = 2 … … 182 184 object Label5: TLabel 183 185 Left = 8 184 Height = 2 2186 Height = 25 185 187 Top = 104 186 Width = 81188 Width = 77 187 189 Caption = 'Grid type:' 188 190 ParentColor = False … … 190 192 object ComboBoxGridType: TComboBox 191 193 Left = 146 192 Height = 3 0194 Height = 33 193 195 Top = 104 194 196 Width = 208 195 ItemHeight = 0197 ItemHeight = 25 196 198 Items.Strings = ( 197 199 'Hexagonal' … … 204 206 object ComboBoxMapShape: TComboBox 205 207 Left = 146 206 Height = 3 0208 Height = 33 207 209 Top = 144 208 210 Width = 208 209 ItemHeight = 0211 ItemHeight = 25 210 212 Items.Strings = ( 211 213 'Hexagonal' … … 219 221 object Label8: TLabel 220 222 Left = 8 221 Height = 2 2223 Height = 25 222 224 Top = 144 223 Width = 9 7225 Width = 92 224 226 Caption = 'Map shape:' 225 227 ParentColor = False … … 229 231 Height = 27 230 232 Top = 110 231 Width = 727233 Width = 173 232 234 Anchors = [akTop, akLeft, akRight] 233 235 AutoSize = False … … 237 239 object SpinEditVoidPercent: TSpinEdit 238 240 Left = 216 239 Height = 3 2241 Height = 33 240 242 Top = 224 241 243 Width = 106 … … 246 248 object CheckBoxVoid: TCheckBox 247 249 Left = 8 248 Height = 2 4250 Height = 29 249 251 Top = 232 250 Width = 1 83252 Width = 177 251 253 Caption = 'Inaccessible places' 252 254 OnChange = CheckBoxVoidChange … … 255 257 object CheckBoxCity: TCheckBox 256 258 Left = 8 257 Height = 2 4259 Height = 29 258 260 Top = 272 259 Width = 69261 Width = 72 260 262 Caption = 'Cities' 261 263 OnChange = CheckBoxCityChange … … 264 266 object SpinEditCityPercent: TSpinEdit 265 267 Left = 216 266 Height = 3 2268 Height = 33 267 269 Top = 272 268 270 Width = 106 … … 273 275 object Label4: TLabel 274 276 Left = 331 275 Height = 2 2277 Height = 25 276 278 Top = 272 277 279 Width = 15 … … 281 283 object Label3: TLabel 282 284 Left = 331 283 Height = 2 2285 Height = 25 284 286 Top = 232 285 287 Width = 15 … … 289 291 object SpinEditNeutralUnits: TSpinEdit 290 292 Left = 408 291 Height = 3 2293 Height = 33 292 294 Top = 352 293 295 Width = 98 … … 299 301 object Label7: TLabel 300 302 Left = 8 301 Height = 2 2303 Height = 25 302 304 Top = 352 303 Width = 2 21305 Width = 207 304 306 Caption = 'Max random neutral units:' 305 307 ParentColor = False … … 307 309 object EditImageFile: TEdit 308 310 Left = 144 309 Height = 3 2311 Height = 33 310 312 Top = 184 311 Width = 948313 Width = 394 312 314 Anchors = [akTop, akLeft, akRight] 313 315 TabOrder = 12 314 316 end 315 317 object ButtonImageBrowse: TButton 316 Left = 1100318 Left = 546 317 319 Height = 25 318 320 Top = 192 … … 325 327 object Label9: TLabel 326 328 Left = 8 327 Height = 2 2329 Height = 25 328 330 Top = 184 329 Width = 8 8331 Width = 82 330 332 Caption = 'Image file:' 331 333 ParentColor = False … … 333 335 object CheckBoxBridges: TCheckBox 334 336 Left = 8 335 Height = 2 4337 Height = 29 336 338 Top = 310 337 Width = 204339 Width = 199 338 340 Caption = 'Bridges between cells' 339 341 TabOrder = 14 … … 342 344 object TabSheet3: TTabSheet 343 345 Caption = 'Rules' 344 ClientHeight = 417345 ClientWidth = 1215346 ClientHeight = 398 347 ClientWidth = 854 346 348 object RadioGroupGrowCells: TRadioGroup 347 349 Left = 15 … … 358 360 ChildSizing.Layout = cclLeftToRightThenTopToBottom 359 361 ChildSizing.ControlsPerLine = 1 360 ClientHeight = 81362 ClientHeight = 75 361 363 ClientWidth = 308 362 364 Items.Strings = ( … … 369 371 object Label6: TLabel 370 372 Left = 8 371 Height = 2 2373 Height = 25 372 374 Top = 248 373 Width = 11 6375 Width = 111 374 376 Caption = 'Win objective:' 375 377 ParentColor = False … … 377 379 object ComboBoxWinObjective: TComboBox 378 380 Left = 232 379 Height = 3 0381 Height = 33 380 382 Top = 240 381 383 Width = 328 382 ItemHeight = 0384 ItemHeight = 25 383 385 Items.Strings = ( 384 386 'Defeat all oponents' … … 404 406 ChildSizing.Layout = cclLeftToRightThenTopToBottom 405 407 ChildSizing.ControlsPerLine = 1 406 ClientHeight = 52408 ClientHeight = 46 407 409 ClientWidth = 301 408 410 Items.Strings = ( … … 416 418 Height = 27 417 419 Top = 24 418 Width = 864420 Width = 503 419 421 Anchors = [akTop, akLeft, akRight] 420 422 AutoSize = False -
trunk/Forms/UFormPlayer.lfm
r98 r107 1 1 object FormPlayer: TFormPlayer 2 2 Left = 470 3 Height = 3473 Height = 279 4 4 Top = 219 5 Width = 5 515 Width = 522 6 6 Caption = 'Player' 7 ClientHeight = 347 8 ClientWidth = 551 7 ClientHeight = 279 8 ClientWidth = 522 9 Constraints.MinHeight = 279 10 Constraints.MinWidth = 522 9 11 Position = poMainFormCenter 10 LCLVersion = '1. 3'12 LCLVersion = '1.4.4.0' 11 13 object Label1: TLabel 12 14 Left = 28 13 Height = 2 215 Height = 25 14 16 Top = 27 15 Width = 5 317 Width = 51 16 18 Caption = 'Name:' 17 19 ParentColor = False … … 19 21 object EditName: TEdit 20 22 Left = 139 21 Height = 3 223 Height = 33 22 24 Top = 27 23 25 Width = 368 26 Anchors = [akTop, akLeft, akRight] 24 27 TabOrder = 0 25 28 end 26 29 object ButtonCancel: TButton 27 Left = 30730 Left = 278 28 31 Height = 25 29 Top = 2 9632 Top = 242 30 33 Width = 75 31 34 Anchors = [akRight, akBottom] … … 35 38 end 36 39 object ButtonOk: TButton 37 Left = 4 2840 Left = 403 38 41 Height = 25 39 Top = 2 9642 Top = 242 40 43 Width = 75 41 44 Anchors = [akRight, akBottom] … … 47 50 object ComboBox1: TComboBox 48 51 Left = 139 49 Height = 3 052 Height = 33 50 53 Top = 72 51 54 Width = 368 52 ItemHeight = 0 55 Anchors = [akTop, akLeft, akRight] 56 ItemHeight = 25 53 57 ItemIndex = 0 54 58 Items.Strings = ( … … 62 66 object Label2: TLabel 63 67 Left = 24 64 Height = 2 268 Height = 25 65 69 Top = 72 66 70 Width = 51 … … 70 74 object Label3: TLabel 71 75 Left = 24 72 Height = 2 276 Height = 25 73 77 Top = 128 74 78 Width = 47 … … 78 82 object ColorBox1: TColorBox 79 83 Left = 139 80 Height = 3484 Height = 28 81 85 Top = 120 82 86 Width = 368 83 87 Style = [cbStandardColors, cbExtendedColors, cbCustomColor, cbPrettyNames] 84 ItemHeight = 0 88 Anchors = [akTop, akLeft, akRight] 89 ItemHeight = 20 85 90 TabOrder = 4 86 91 end 87 92 object Label4: TLabel 88 93 Left = 24 89 Height = 2 294 Height = 25 90 95 Top = 168 91 Width = 9 696 Width = 90 92 97 Caption = 'Agressivity:' 93 98 ParentColor = False … … 95 100 object ComboBoxAgressivity: TComboBox 96 101 Left = 139 97 Height = 3 0102 Height = 33 98 103 Top = 168 99 104 Width = 368 100 ItemHeight = 0 105 Anchors = [akTop, akLeft, akRight] 106 ItemHeight = 25 101 107 Items.Strings = ( 102 108 'Low' … … 110 116 object CheckBoxDefensive: TCheckBox 111 117 Left = 24 112 Height = 2 4118 Height = 29 113 119 Top = 208 114 120 Width = 107 -
trunk/Forms/UFormSettings.lfm
r99 r107 1 1 object FormSettings: TFormSettings 2 2 Left = 404 3 Height = 5634 Top = 3385 Width = 7003 Height = 327 4 Top = 574 5 Width = 554 6 6 ActiveControl = ButtonOk 7 7 Caption = 'Settings' 8 ClientHeight = 563 9 ClientWidth = 700 8 ClientHeight = 327 9 ClientWidth = 554 10 Constraints.MinHeight = 327 11 Constraints.MinWidth = 554 10 12 OnCreate = FormCreate 11 13 OnShow = FormShow 12 14 Position = poMainFormCenter 13 LCLVersion = '1. 3'15 LCLVersion = '1.4.4.0' 14 16 object ButtonOk: TButton 15 Left = 59017 Left = 444 16 18 Height = 25 17 Top = 52019 Top = 284 18 20 Width = 75 19 21 Anchors = [akRight, akBottom] … … 23 25 end 24 26 object ButtonCancel: TButton 25 Left = 46827 Left = 322 26 28 Height = 25 27 Top = 52029 Top = 284 28 30 Width = 75 29 31 Anchors = [akRight, akBottom] … … 34 36 object PageControl1: TPageControl 35 37 Left = 4 36 Height = 50038 Height = 264 37 39 Top = 4 38 Width = 69239 ActivePage = TabSheet Debug40 Width = 546 41 ActivePage = TabSheetGeneral 40 42 Align = alTop 41 43 Anchors = [akTop, akLeft, akRight, akBottom] 42 44 BorderSpacing.Around = 4 43 TabIndex = 145 TabIndex = 0 44 46 TabOrder = 2 45 47 object TabSheetGeneral: TTabSheet 46 48 Caption = 'General' 47 ClientHeight = 46048 ClientWidth = 68649 ClientHeight = 226 50 ClientWidth = 538 49 51 object Label2: TLabel 50 52 Left = 27 51 Height = 2 253 Height = 25 52 54 Top = 78 53 Width = 1 4555 Width = 139 54 56 Caption = 'Animation speed:' 55 57 ParentColor = False … … 57 59 object SpinEditAnimSpeed: TSpinEdit 58 60 Left = 232 59 Height = 3 261 Height = 33 60 62 Top = 72 61 63 Width = 122 … … 64 66 object Label3: TLabel 65 67 Left = 368 66 Height = 2 268 Height = 25 67 69 Top = 82 68 70 Width = 15 … … 74 76 Height = 27 75 77 Top = 112 76 Width = 73278 Width = 584 77 79 Anchors = [akTop, akLeft, akRight] 78 80 AutoSize = False … … 82 84 object Label1: TLabel 83 85 Left = 20 84 Height = 2 286 Height = 25 85 87 Top = 26 86 Width = 8 588 Width = 81 87 89 Caption = 'Language:' 88 90 ParentColor = False … … 90 92 object ComboBoxLanguage: TComboBox 91 93 Left = 178 92 Height = 3 494 Height = 33 93 95 Top = 24 94 96 Width = 196 95 ItemHeight = 097 ItemHeight = 25 96 98 Style = csDropDownList 97 99 TabOrder = 2 … … 100 102 object TabSheetDebug: TTabSheet 101 103 Caption = 'Debug' 102 ClientHeight = 460103 ClientWidth = 686104 ClientHeight = 226 105 ClientWidth = 538 104 106 object CheckBoxDevelMode: TCheckBox 105 107 Left = 16 106 108 Height = 27 107 109 Top = 136 108 Width = 660110 Width = 512 109 111 Anchors = [akTop, akLeft, akRight] 110 112 AutoSize = False … … 114 116 object Label4: TLabel 115 117 Left = 14 116 Height = 2 2118 Height = 25 117 119 Top = 67 118 Width = 3 3120 Width = 32 119 121 Caption = 'DPI:' 120 122 ParentColor = False … … 122 124 object SpinEditX: TSpinEdit 123 125 Left = 104 124 Height = 3 2126 Height = 33 125 127 Top = 64 126 128 Width = 96 … … 132 134 object SpinEditY: TSpinEdit 133 135 Left = 232 134 Height = 3 2136 Height = 33 135 137 Top = 64 136 138 Width = 90 … … 142 144 object Label5: TLabel 143 145 Left = 208 144 Height = 2 2146 Height = 25 145 147 Top = 67 146 Width = 9148 Width = 8 147 149 Caption = 'x' 148 150 ParentColor = False … … 152 154 Height = 24 153 155 Top = 32 154 Width = 656156 Width = 508 155 157 Anchors = [akTop, akLeft, akRight] 156 158 AutoSize = False -
trunk/Languages/xtactics.cs.po
r100 r107 632 632 msgid "Zero zoom not allowed" 633 633 msgstr "Nulové přiblížení není povoleno" 634 -
trunk/Packages/Common/UScaleDPI.pas
r91 r107 17 17 TControlDimension = class 18 18 BoundsRect: TRect; 19 AuxSize: TPoint;20 19 FontHeight: Integer; 21 20 Controls: TObjectList; // TList<TControlDimension> 21 // Class specifics 22 ButtonSize: TPoint; // TToolBar 23 CoolBandWidth: Integer; 24 ConstraintsMin: TPoint; // TForm 25 ConstraintsMax: TPoint; // TForm 22 26 constructor Create; 23 27 destructor Destroy; override; … … 74 78 destructor TControlDimension.Destroy; 75 79 begin 76 Controls.Free;80 FreeAndNil(Controls); 77 81 inherited Destroy; 78 82 end; … … 113 117 Dimensions.Controls.Clear; 114 118 if Control is TToolBar then 115 Dimensions.AuxSize := Point(TToolBar(Control).ButtonWidth, TToolBar(Control).ButtonHeight); 116 119 Dimensions.ButtonSize := Point(TToolBar(Control).ButtonWidth, TToolBar(Control).ButtonHeight); 120 if Control is TForm then begin 121 Dimensions.ConstraintsMin := Point(TForm(Control).Constraints.MinWidth, 122 TForm(Control).Constraints.MinHeight); 123 Dimensions.ConstraintsMax := Point(TForm(Control).Constraints.MaxWidth, 124 TForm(Control).Constraints.MaxHeight); 125 end; 117 126 if Control is TWinControl then 118 127 for I := 0 to TWinControl(Control).ControlCount - 1 do begin 119 if TWinControl(Control).Controls[I] is TControl then begin 128 if TWinControl(Control).Controls[I] is TControl then 129 // Do not scale docked forms twice 130 if not (TWinControl(Control).Controls[I] is TForm) then begin 120 131 NewControl := TControlDimension.Create; 121 132 Dimensions.Controls.Add(NewControl); … … 133 144 Control.Font.Height := Dimensions.FontHeight; 134 145 if Control is TToolBar then begin 135 TToolBar(Control).ButtonWidth := Dimensions.AuxSize.X; 136 TToolBar(Control).ButtonHeight := Dimensions.AuxSize.Y; 146 TToolBar(Control).ButtonWidth := Dimensions.ButtonSize.X; 147 TToolBar(Control).ButtonHeight := Dimensions.ButtonSize.Y; 148 end; 149 if Control is TForm then begin 150 TForm(Control).Constraints.MinWidth := Dimensions.ConstraintsMin.X; 151 TForm(Control).Constraints.MinHeight := Dimensions.ConstraintsMin.Y; 152 TForm(Control).Constraints.MaxWidth := Dimensions.ConstraintsMax.X; 153 TForm(Control).Constraints.MaxHeight := Dimensions.ConstraintsMax.Y; 137 154 end; 138 155 if Control is TWinControl then 139 156 for I := 0 to TWinControl(Control).ControlCount - 1 do begin 140 if TWinControl(Control).Controls[I] is TControl then begin 157 if TWinControl(Control).Controls[I] is TControl then 158 // Do not scale docked forms twice 159 if not (TWinControl(Control).Controls[I] is TForm) then begin 141 160 RestoreDimensions(TWinControl(Control).Controls[I], TControlDimension(Dimensions.Controls[I])); 142 161 end; … … 152 171 Control.Font.Height := ScaleY(Dimensions.FontHeight, DesignDPI.Y); 153 172 if Control is TToolBar then begin 154 TToolBar(Control).ButtonWidth := ScaleX(Dimensions.AuxSize.X, DesignDPI.X); 155 TToolBar(Control).ButtonHeight := ScaleY(Dimensions.AuxSize.Y, DesignDPI.Y); 173 TToolBar(Control).ButtonWidth := ScaleX(Dimensions.ButtonSize.X, DesignDPI.X); 174 TToolBar(Control).ButtonHeight := ScaleY(Dimensions.ButtonSize.Y, DesignDPI.Y); 175 end; 176 if Control is TCoolBar then begin 177 with TCoolBar(Control) do 178 for I := 0 to Bands.Count - 1 do 179 with TCoolBand(Bands[I]) do begin 180 MinWidth := ScaleX(Dimensions.ButtonSize.X, DesignDPI.X); 181 MinHeight := ScaleY(Dimensions.ButtonSize.Y, DesignDPI.Y); 182 //Width := ScaleX(Dimensions.BoundsRect.Left - 183 end; 184 end; 185 if Control is TForm then begin 186 TForm(Control).Constraints.MinWidth := ScaleX(Dimensions.ConstraintsMin.X, DesignDPI.X); 187 TForm(Control).Constraints.MaxWidth := ScaleX(Dimensions.ConstraintsMax.X, DesignDPI.X); 188 TForm(Control).Constraints.MinHeight := ScaleY(Dimensions.ConstraintsMin.Y, DesignDPI.Y); 189 TForm(Control).Constraints.MaxHeight := ScaleY(Dimensions.ConstraintsMax.Y, DesignDPI.Y); 156 190 end; 157 191 if Control is TWinControl then 158 192 for I := 0 to TWinControl(Control).ControlCount - 1 do begin 159 if TWinControl(Control).Controls[I] is TControl then begin 193 if TWinControl(Control).Controls[I] is TControl then 194 // Do not scale docked forms twice 195 if not (TWinControl(Control).Controls[I] is TForm) then begin 160 196 ScaleDimensions(TWinControl(Control).Controls[I], TControlDimension(Dimensions.Controls[I])); 161 197 end; … … 183 219 184 220 SetLength(Temp, ImgList.Count); 185 TempBmp := TBitmap.Create;186 221 for I := 0 to ImgList.Count - 1 do 187 222 begin 223 TempBmp := TBitmap.Create; 224 TempBmp.PixelFormat := pf32bit; 188 225 ImgList.GetBitmap(I, TempBmp); 189 //TempBmp.PixelFormat := pfDevice;190 226 Temp[I] := TBitmap.Create; 191 227 Temp[I].SetSize(NewWidth, NewHeight); 228 Temp[I].PixelFormat := pf32bit; 192 229 Temp[I].TransparentColor := TempBmp.TransparentColor; 193 230 //Temp[I].TransparentMode := TempBmp.TransparentMode; … … 199 236 if (Temp[I].Width = 0) or (Temp[I].Height = 0) then Continue; 200 237 Temp[I].Canvas.StretchDraw(Rect(0, 0, Temp[I].Width, Temp[I].Height), TempBmp); 201 end;202 TempBmp.Free;238 TempBmp.Free; 239 end; 203 240 204 241 ImgList.Clear; … … 272 309 end; 273 310 274 275 276 311 if Control is TToolBar then begin 277 312 ToolBarControl := TToolBar(Control); -
trunk/UCore.pas
r103 r107 59 59 procedure SaveConfig; 60 60 procedure CommandLineParams; 61 procedure ScaleDPI; 61 62 public 62 63 Game: TGame; … … 196 197 end; 197 198 199 procedure TCore.ScaleDPI; 200 var 201 I: Integer; 202 begin 203 {$ifdef DEBUG} 204 with Core.ScaleDPI1 do begin 205 //DesignDPI := Point(144, 144); 206 if (DesignDPI.X <> DPI.X) or (DesignDPI.Y <> DPI.Y) then begin 207 //ApplyToAll(DesignDPI); 208 FormNew.Show; 209 FormNew.Hide; 210 for I := 0 to Screen.FormCount - 1 do begin 211 StoreDimensions(Screen.Forms[I], StoredDimension); 212 ScaleDimensions(Screen.Forms[I], StoredDimension); 213 end; 214 ScaleImageList(Core.ImageListSmall, DesignDPI); 215 ScaleImageList(Core.ImageListLarge, DesignDPI); 216 end; 217 end; 218 {$endif} 219 end; 220 198 221 procedure TCore.UpdateActions; 199 222 begin … … 351 374 352 375 CommandLineParams; 353 354 {$IFDEF DEBUG} 355 {with Core.ScaleDPI1 do 356 if (DesignDPI.X <> DPI.X) or (DesignDPI.Y <> DPI.Y) then begin 357 //ApplyToAll(DesignDPI); 358 FormNew.Show; 359 FormNew.Hide; 360 for I := 0 to Screen.FormCount - 1 do begin 361 StoreDimensions(Screen.Forms[I], StoredDimension); 362 ScaleDimensions(Screen.Forms[I], StoredDimension); 363 end; 364 ScaleImageList(Core.ImageListSmall, DesignDPI); 365 ScaleImageList(Core.ImageListLarge, DesignDPI); 366 end; 367 } 368 {$ENDIF} 376 ScaleDPI; 369 377 370 378 if Game.FileName = '' then begin -
trunk/xtactics.lpi
r106 r107 9 9 <ResourceType Value="res"/> 10 10 <UseXPManifest Value="True"/> 11 <XPManifest> 12 <DpiAware Value="True"/> 13 </XPManifest> 11 14 <Icon Value="0"/> 12 15 </General> … … 18 21 <StringTable ProductVersion=""/> 19 22 </VersionInfo> 20 <MacroValues Count="1">21 <Macro1 Name="LCLWidgetType" Value="qt"/>22 </MacroValues>23 23 <BuildModes Count="2"> 24 24 <Item1 Name="Debug" Default="True"/> 25 25 <Item2 Name="Release"> 26 <MacroValues Count="1">27 <Macro1 Name="LCLWidgetType" Value="qt"/>28 </MacroValues>29 26 <CompilerOptions> 30 27 <Version Value="11"/> … … 65 62 </CompilerOptions> 66 63 </Item2> 67 <SharedMatrixOptions Count="1">68 <Item1 ID="462723536445" Modes="Debug,Release" Type="IDEMacro" MacroName="LCLWidgetType" Value="qt"/>69 </SharedMatrixOptions>70 64 </BuildModes> 71 65 <PublishOptions> … … 105 99 <Filename Value="UGame.pas"/> 106 100 <IsPartOfProject Value="True"/> 107 <UnitName Value="UGame"/>108 101 </Unit1> 109 102 <Unit2> … … 113 106 <HasResources Value="True"/> 114 107 <ResourceBaseClass Value="DataModule"/> 115 <UnitName Value="UCore"/>116 108 </Unit2> 117 109 <Unit3> … … 128 120 <HasResources Value="True"/> 129 121 <ResourceBaseClass Value="Form"/> 130 <UnitName Value="UFormSettings"/>131 122 </Unit4> 132 123 <Unit5> … … 136 127 <HasResources Value="True"/> 137 128 <ResourceBaseClass Value="Form"/> 138 <UnitName Value="UFormMain"/>139 129 </Unit5> 140 130 <Unit6> … … 151 141 <HasResources Value="True"/> 152 142 <ResourceBaseClass Value="Form"/> 153 <UnitName Value="UFormNew"/>154 143 </Unit7> 155 144 <Unit8>
Note:
See TracChangeset
for help on using the changeset viewer.