- Fixed display of the current hue in the Draw settings dialog

This commit is contained in:
Andreas Schneider 2011-03-12 17:56:53 +01:00
parent 34e723db75
commit 87e4edffa5
2 changed files with 36 additions and 29 deletions

View File

@ -1,40 +1,39 @@
inherited frmDrawSettings: TfrmDrawSettings inherited frmDrawSettings: TfrmDrawSettings
Left = 268 Left = 268
Height = 180 Height = 166
Top = 165 Top = 165
Width = 242 Width = 242
ActiveControl = rbTileList ActiveControl = rbTileList
Caption = 'Draw settings' Caption = 'Draw settings'
ClientHeight = 180 ClientHeight = 166
ClientWidth = 242 ClientWidth = 242
OnCreate = FormCreate OnCreate = FormCreate
object rbTileList: TRadioButton[0] object rbTileList: TRadioButton[0]
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner AnchorSideTop.Control = Owner
Left = 8 Left = 8
Height = 22 Height = 19
Top = 8 Top = 8
Width = 146 Width = 125
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Top = 8 BorderSpacing.Top = 8
BorderSpacing.Bottom = 4 BorderSpacing.Bottom = 4
Caption = 'Use tile from the list' Caption = 'Use tile from the list'
Checked = True Checked = True
State = cbChecked
TabOrder = 0 TabOrder = 0
TabStop = True
end end
object rbRandom: TRadioButton[1] object rbRandom: TRadioButton[1]
AnchorSideLeft.Control = rbTileList AnchorSideLeft.Control = rbTileList
AnchorSideTop.Control = rbTileList AnchorSideTop.Control = rbTileList
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 8 Left = 8
Height = 22 Height = 19
Top = 34 Top = 31
Width = 213 Width = 184
BorderSpacing.Top = 4 BorderSpacing.Top = 4
Caption = 'Use tiles from the random pool' Caption = 'Use tiles from the random pool'
TabOrder = 1 TabOrder = 1
TabStop = False
end end
object gbHue: TGroupBox[2] object gbHue: TGroupBox[2]
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
@ -43,25 +42,27 @@ inherited frmDrawSettings: TfrmDrawSettings
AnchorSideRight.Control = Owner AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 8 Left = 8
Height = 49 Height = 38
Top = 132 Top = 122
Width = 226 Width = 226
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 8 BorderSpacing.Around = 8
Caption = 'Hue (Statics only)' Caption = 'Hue (Statics only)'
ClientHeight = 45 ClientHeight = 20
ClientWidth = 222 ClientWidth = 222
TabOrder = 2 TabOrder = 2
object pbHue: TPaintBox object pbHue: TPaintBox
Cursor = crHandPoint Cursor = crHandPoint
Left = 4 Left = 4
Height = 41 Height = 16
Top = 0 Top = 0
Width = 214 Width = 214
Align = alClient Align = alClient
BorderSpacing.Left = 4 BorderSpacing.Left = 4
BorderSpacing.Right = 4 BorderSpacing.Right = 4
BorderSpacing.Bottom = 4 BorderSpacing.Bottom = 4
Font.Height = 14
ParentFont = False
OnClick = pbHueClick OnClick = pbHueClick
OnPaint = pbHuePaint OnPaint = pbHuePaint
end end
@ -71,9 +72,9 @@ inherited frmDrawSettings: TfrmDrawSettings
AnchorSideTop.Control = cbForceAltitude AnchorSideTop.Control = cbForceAltitude
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 8 Left = 8
Height = 22 Height = 19
Top = 102 Top = 93
Width = 149 Width = 135
BorderSpacing.Top = 12 BorderSpacing.Top = 12
Caption = 'Add Random Altitude' Caption = 'Add Random Altitude'
TabOrder = 3 TabOrder = 3
@ -84,8 +85,8 @@ inherited frmDrawSettings: TfrmDrawSettings
AnchorSideRight.Control = Owner AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 184 Left = 184
Height = 21 Height = 23
Top = 103 Top = 91
Width = 50 Width = 50
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
BorderSpacing.Right = 8 BorderSpacing.Right = 8
@ -96,9 +97,9 @@ inherited frmDrawSettings: TfrmDrawSettings
AnchorSideTop.Control = rbRandom AnchorSideTop.Control = rbRandom
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 8 Left = 8
Height = 22 Height = 19
Top = 68 Top = 62
Width = 111 Width = 95
BorderSpacing.Top = 12 BorderSpacing.Top = 12
Caption = 'Force altitude:' Caption = 'Force altitude:'
TabOrder = 5 TabOrder = 5
@ -109,8 +110,8 @@ inherited frmDrawSettings: TfrmDrawSettings
AnchorSideRight.Control = Owner AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 184 Left = 184
Height = 21 Height = 23
Top = 69 Top = 60
Width = 50 Width = 50
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
BorderSpacing.Right = 8 BorderSpacing.Right = 8

View File

@ -86,6 +86,11 @@ var
hue: THue; hue: THue;
begin begin
if frmHueSettings <> nil then if frmHueSettings <> nil then
begin
if frmHueSettings.cbRandom.Checked then
begin
pbHue.Canvas.TextOut(36, 1, '[Random]');
end else
begin begin
if frmHueSettings.lbHue.ItemIndex > 0 then if frmHueSettings.lbHue.ItemIndex > 0 then
hue := ResMan.Hue.Hues[frmHueSettings.lbHue.ItemIndex - 1] hue := ResMan.Hue.Hues[frmHueSettings.lbHue.ItemIndex - 1]
@ -94,6 +99,7 @@ begin
TfrmHueSettings.DrawHue(hue, pbHue.Canvas, pbHue.Canvas.ClipRect, TfrmHueSettings.DrawHue(hue, pbHue.Canvas, pbHue.Canvas.ClipRect,
frmHueSettings.lbHue.Items.Strings[frmHueSettings.lbHue.ItemIndex]); frmHueSettings.lbHue.Items.Strings[frmHueSettings.lbHue.ItemIndex]);
end; end;
end;
end; end;
procedure TfrmDrawSettings.seForceAltitudeChange(Sender: TObject); procedure TfrmDrawSettings.seForceAltitudeChange(Sender: TObject);