diff --git a/.gitignore b/.gitignore index b3f8b43..b7b69af 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ *.backup *.backups +*.visuals diff --git a/boardchangedui.lfm b/boardchangedui.lfm index 78d0357..ea5f7b8 100644 --- a/boardchangedui.lfm +++ b/boardchangedui.lfm @@ -3,7 +3,7 @@ object boardChangedDialog: TboardChangedDialog Height = 116 Top = 565 Width = 421 - BorderStyle = bsNone + BorderStyle = bsSingle Caption = 'Schaltung geƤndert' ClientHeight = 116 ClientWidth = 421 diff --git a/dtmain.lfm b/dtmain.lfm index a5aea5a..dfd0439 100644 --- a/dtmain.lfm +++ b/dtmain.lfm @@ -695,6 +695,12 @@ object DigitaltrainerMainForm: TDigitaltrainerMainForm RadioItem = True OnClick = miColorSchemeDefaultClick end + object miColorSchemeMediumGray: TMenuItem + AutoCheck = True + Caption = 'Nebel' + RadioItem = True + OnClick = miColorSchemeDefaultClick + end end end end diff --git a/dtmain.pas b/dtmain.pas index d671356..b13a486 100644 --- a/dtmain.pas +++ b/dtmain.pas @@ -17,6 +17,7 @@ TDigitaltrainerMainForm = class(TForm) boardHorizontalScrollBar: TScrollBar; boardImage: TImage; MenuItem1: TMenuItem; + miColorSchemeMediumGray: TMenuItem; miColorSchemeRust: TMenuItem; miColorSchemeNeon: TMenuItem; miColorSchemeDefault: TMenuItem; @@ -207,9 +208,11 @@ TDigitaltrainerMainForm = class(TForm) if getColorSchemeIndex=1 then miColorSchemeBlackOnWhite.checked:=true else if getColorSchemeIndex=2 - then miColorSchemeNeon.Checked:=true + then miColorSchemeNeon.checked:=true else if getColorSchemeIndex=3 - then miColorSchemeRust.Checked:=true + then miColorSchemeRust.checked:=true + else if getColorSchemeIndex=4 + then miColorSchemeMediumGray.checked:=true else miColorSchemeDefault.checked:=true; Application.AddOnKeyDownHandler(@FormKeyDown,false); @@ -293,14 +296,16 @@ TDigitaltrainerMainForm = class(TForm) begin if miColorSchemeBlackOnWhite.checked then setColorScheme(1) - else if miColorSchemeNeon.Checked + else if miColorSchemeNeon.checked then setColorScheme(2) - else if miColorSchemeRust.Checked + else if miColorSchemeRust.checked then setColorScheme(3) + else if miColorSchemeMediumGray.checked + then setColorScheme(4) else setColorScheme(0); applyColorScheme(self); - selectionShape.Pen.Color:=colorScheme.MARK_COLOR; + selectionShape.Pen.color:=colorScheme.MARK_COLOR; clearSpriteCaches; uiAdapter.updateTitleLayer; diff --git a/palettehandingui.pas b/palettehandingui.pas index d66152e..f77eb68 100644 --- a/palettehandingui.pas +++ b/palettehandingui.pas @@ -428,6 +428,7 @@ TPaletteForm = class(TForm) sorting.byColumn:=255; setLength(sorting.index,0); fillTable(true); + updateButtons; ShowModal; end; diff --git a/sprites.pas b/sprites.pas index b6925dd..75d4db4 100644 --- a/sprites.pas +++ b/sprites.pas @@ -646,7 +646,7 @@ io_top : if fy<0 then addCol(colorScheme.GATE_COLOR) else addCol(colorScheme.BOARD_COLOR); io_bottom: if fy<0 then addCol(colorScheme.BOARD_COLOR) else addCol(colorScheme.GATE_COLOR); end; - end else if dtc>radius-1 then begin + end else if dtc>radius-1.5 then begin case position of io_left : dtc:= fx/radius; io_right : dtc:=-fx/radius; @@ -654,6 +654,7 @@ io_bottom: dtc:=-fy/radius; end; if dtc<0 then level:=0 else level:=round(dtc*256); + if level<0 then level:=0 else if level>256 then level:=256; r+=((256-level)*( colorScheme.GATE_BORDER_COLOR and 255)+level*( colorScheme.WIRE_COLOR and 255)) shr 8; g+=((256-level)*((colorScheme.GATE_BORDER_COLOR shr 8) and 255)+level*((colorScheme.WIRE_COLOR shr 8) and 255)) shr 8; b+=((256-level)*((colorScheme.GATE_BORDER_COLOR shr 16) and 255)+level*((colorScheme.WIRE_COLOR shr 16) and 255)) shr 8; @@ -672,7 +673,9 @@ end; end; - CONST sub:array[0..7] of double=(0.0625,0.1875,0.3125,0.4375,0.5625,0.6875,0.8125,0.9375); + CONST sub:array[0..7] of double=(-0.4375,-0.3125,-0.1875,-0.0625,0.0625,0.1875,0.3125,0.4375); + + //(0.0625,0.1875,0.3125,0.4375,0.5625,0.6875,0.8125,0.9375); VAR x,y:longint; subX,subY:double; @@ -941,8 +944,8 @@ begin initBaseShape(zoom,ioMark); Bitmap.CanvasBGRA.Pen.color:=0; - Bitmap.CanvasBGRA.MoveTo(screenOffset[0] ,screenOffset[1]+(zoom*height shr 1)); - Bitmap.CanvasBGRA.LineTo(screenOffset[0]+zoom*width,screenOffset[1]+(zoom*height shr 1)); + Bitmap.CanvasBGRA.MoveTo(screenOffset[0] +3,screenOffset[1]+(zoom*height shr 1)); + Bitmap.CanvasBGRA.LineTo(screenOffset[0]+zoom*width-3,screenOffset[1]+(zoom*height shr 1)); if (inIdx>=0) and (inIdxbsClear then TShape(control).Brush.color:=colorScheme.ENABLED_BUTTON_COLOR; - TShape(control).Pen.Color:=colorScheme.MENU_BORDER_COLOR; + TShape(control).Pen.color:=colorScheme.MENU_BORDER_COLOR; end else if control is TStringGrid then begin TStringGrid(control).FixedColor:=colorScheme.tableFixedColor;