Skip to content

Commit a4b945c

Browse files
authored
Merge pull request #15 from Falki-git/main
Support for SpaceWarp 1.1.0
2 parents 557f45e + e7c6b53 commit a4b945c

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

MicroEngineerProject/MicroEngineer/MicroEngineerMod.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -303,23 +303,24 @@ private void FillMainGUI(int windowID)
303303
CloseWindow();
304304
}
305305

306-
GUILayout.Space(10);
306+
GUILayout.Space(5);
307307

308308
GUILayout.BeginHorizontal();
309309

310+
int toggleIndex = -1;
310311
// Draw toggles for all windows except MainGui and StageInfoOAB
311-
foreach (var (window, index) in MicroWindows.Select((window, index) => (window, index)).Where(x => x.window.MainWindow != MainWindow.MainGui && x.window.MainWindow != MainWindow.StageInfoOAB))
312+
foreach (MicroWindow window in MicroWindows.Where(x => x.MainWindow != MainWindow.MainGui && x.MainWindow != MainWindow.StageInfoOAB))
312313
{
313314
// layout can fit 6 toggles, so if all 6 slots are filled then go to a new line. Index == 0 is the MainGUI which isn't rendered
314-
if ((index - 1) % 6 == 0 && index > 1)
315+
if (++toggleIndex % 6 == 0 && toggleIndex > 0)
315316
{
316317
GUILayout.EndHorizontal();
317318
GUILayout.BeginHorizontal();
318319
}
319320
window.IsFlightActive = GUILayout.Toggle(window.IsFlightActive, window.Abbreviation, MicroStyles.SectionToggleStyle);
320-
GUILayout.Space(26);
321321
}
322322
GUILayout.EndHorizontal();
323+
GUILayout.Space(5);
323324

324325
// Draw Settings window first
325326
int settingsIndex = MicroWindows.FindIndex(window => window.MainWindow == MainWindow.Settings);

MicroEngineerProject/MicroEngineer/MicroStyles.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ public static void InitializeStyles()
101101

102102
SectionToggleStyle = new GUIStyle(SpaceWarpUISkin.toggle)
103103
{
104-
padding = new RectOffset(14, 0, 3, 3)
104+
padding = new RectOffset(0, 18, -5, 0),
105+
contentOffset= new Vector2(17, 8)
105106
};
106107

107108
NameLabelStyle = new GUIStyle(SpaceWarpUISkin.label);

Staging/BepInEx/plugins/micro_engineer/swinfo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{
1010
"id": "SpaceWarp",
1111
"version": {
12-
"min": "1.0.1",
12+
"min": "1.1.0",
1313
"max": "*"
1414
}
1515
}

0 commit comments

Comments
 (0)