@@ -45,6 +45,13 @@ public static class PreferencesMenu
4545 "Always"
4646 } ;
4747
48+ static readonly string [ ] WireRoutingOptions =
49+ {
50+ "Off" ,
51+ "90°" ,
52+ "45°"
53+ } ;
54+
4855 static readonly string [ ] SimulationStatusOptions =
4956 {
5057 "Active" ,
@@ -60,6 +67,7 @@ public static class PreferencesMenu
6067 static readonly UIHandle ID_GridDisplay = new ( "PREFS_GridDisplay" ) ;
6168 static readonly UIHandle ID_Snapping = new ( "PREFS_Snapping" ) ;
6269 static readonly UIHandle ID_StraightWires = new ( "PREFS_StraightWires" ) ;
70+ static readonly UIHandle ID_WireRouting = new ( "PREFS_WireRouting" ) ;
6371 static readonly UIHandle ID_SimStatus = new ( "PREFS_SimStatus" ) ;
6472 static readonly UIHandle ID_SimFrequencyField = new ( "PREFS_SimTickTarget" ) ;
6573 static readonly UIHandle ID_ClockSpeedInput = new ( "PREFS_ClockSpeed" ) ;
@@ -102,6 +110,7 @@ public static void DrawMenu(Project project)
102110 DrawHeader ( "EDITING:" ) ;
103111 int snappingMode = DrawNextWheel ( "Snap to grid" , SnappingOptions , ID_Snapping ) ;
104112 int straightWireMode = DrawNextWheel ( "Straight wires" , StraightWireOptions , ID_StraightWires ) ;
113+ int wireRoutingMode = DrawNextWheel ( "Wire routing" , WireRoutingOptions , ID_WireRouting ) ;
105114
106115 DrawHeader ( "SIMULATION:" ) ;
107116 bool pauseSim = MenuHelper . LabeledOptionsWheel ( simStatusLabel , labelCol , labelPosCurr , entrySize , ID_SimStatus , SimulationStatusOptions , settingFieldSize . x , true ) == 1 ;
@@ -136,6 +145,7 @@ public static void DrawMenu(Project project)
136145 project . description . Prefs_ChipPinNamesDisplayMode = chipPinNamesMode ;
137146 project . description . Prefs_GridDisplayMode = gridDisplayMode ;
138147 project . description . Prefs_Snapping = snappingMode ;
148+ project . description . Prefs_WireRouting = wireRoutingMode ;
139149 project . description . Prefs_StraightWires = straightWireMode ;
140150 project . description . Prefs_SimTargetStepsPerSecond = targetSimTicksPerSecond ;
141151 project . description . Prefs_SimStepsPerClockTick = clockSpeed ;
@@ -206,6 +216,7 @@ static void UpdateUIFromDescription()
206216 UI . GetWheelSelectorState ( ID_GridDisplay ) . index = projDesc . Prefs_GridDisplayMode ;
207217 UI . GetWheelSelectorState ( ID_Snapping ) . index = projDesc . Prefs_Snapping ;
208218 UI . GetWheelSelectorState ( ID_StraightWires ) . index = projDesc . Prefs_StraightWires ;
219+ UI . GetWheelSelectorState ( ID_WireRouting ) . index = projDesc . Prefs_WireRouting ;
209220 UI . GetWheelSelectorState ( ID_SimStatus ) . index = projDesc . Prefs_SimPaused ? 1 : 0 ;
210221 // -- Input fields
211222 UI . GetInputFieldState ( ID_SimFrequencyField ) . SetText ( projDesc . Prefs_SimTargetStepsPerSecond + "" , false ) ;
0 commit comments