From 574aa8230172770ca5d841ac110648c7a082748d Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Thu, 10 Jan 2019 19:32:21 -0500 Subject: [PATCH] Group game properties in Korman Preferences --- korman/addon_prefs.py | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/korman/addon_prefs.py b/korman/addon_prefs.py index cd6b3be..5d9252b 100644 --- a/korman/addon_prefs.py +++ b/korman/addon_prefs.py @@ -105,33 +105,20 @@ class KormanAddonPreferences(bpy.types.AddonPreferences): main_col.label("Plasma Games:") row = main_col.row() row.template_list("PlasmaGameListRW", "games", self, "games", self, - "active_game_index", rows=2) + "active_game_index", rows=3) col = row.column(align=True) col.operator("world.plasma_game_add", icon="ZOOMIN", text="") col.operator("world.plasma_game_remove", icon="ZOOMOUT", text="") col.operator("world.plasma_game_convert", icon="IMPORT", text="") - # Python Installs - assert self.python_validated - main_col = split.column() - main_col.label("Python Executables:") - col = main_col.column() - col.alert = not self.python22_valid - col.prop(self, "python22_executable") - col = main_col.column() - col.alert = not self.python23_valid - col.prop(self, "python23_executable") - col = main_col.column() - col.alert = not self.python27_valid - col.prop(self, "python27_executable") - # Game Properties active_game_index = self.active_game_index if bool(self.games) and active_game_index < len(self.games): active_game = self.games[active_game_index] - layout.label("Game Configuration:") - box = layout.box().column() + col = split.column() + col.label("Game Configuration:") + box = col.box().column() box.prop(active_game, "path", emboss=False) box.prop(active_game, "version") @@ -142,6 +129,17 @@ class KormanAddonPreferences(bpy.types.AddonPreferences): op.filepath = active_game.path op.game_index = active_game_index + # Python Installs + assert self.python_validated + col = layout.column() + col.label("Python Executables:") + col.alert = not self.python22_valid + col.prop(self, "python22_executable") + col.alert = not self.python23_valid + col.prop(self, "python23_executable") + col.alert = not self.python27_valid + col.prop(self, "python27_executable") + @classmethod def register(cls): # Register the old-timey per-world Plasma Games for use in the conversion