Kaynağa Gözat

Optional and broken sets options in the GUI.

Iñigo Valentin 4 yıl önce
ebeveyn
işleme
95bba8bf35
1 değiştirilmiş dosya ile 31 ekleme ve 5 silme
  1. 31 5
      RuneOptimizerGUI/classes/PanelOptimizer.py

+ 31 - 5
RuneOptimizerGUI/classes/PanelOptimizer.py

@@ -133,6 +133,10 @@ class PanelOptimizer(wx.Panel):
           pointSize=8, family=wx.FONTFAMILY_TELETYPE,
           style=wx.FONTSTYLE_NORMAL, weight=wx.FONTWEIGHT_NORMAL
         )
+        smallFont = wx.Font(
+          pointSize=6, family=wx.FONTFAMILY_DEFAULT,
+          style=wx.FONTSTYLE_NORMAL, weight=wx.FONTWEIGHT_NORMAL
+        )
 
         # Sizer for all optimization options. Will be hidden until a unit is
         # selected.
@@ -473,6 +477,28 @@ class PanelOptimizer(wx.Panel):
         )
         self.optionsSizer.Add(levelBox)
 
+        optSetBox = wx.StaticBox(
+          self, label="Other Rune Sets:", id=wx.ID_ANY,
+          pos=(290, 300), size=(190, 190)
+        )
+        self.optionsSizer.Add(optSetBox)
+        self.optSetCheckListList = [
+          wx.CheckListBox(
+            parent=optSetBox, id=wx.ID_ANY, pos=(5, 5),
+            size=(70, 160), choices=names[1:7]
+          ),
+          wx.CheckListBox(
+            parent=optSetBox, id=wx.ID_ANY, pos=(75, 5),
+            size=(70, 160), choices=names[8:14]
+          ),
+          wx.CheckListBox(
+            parent=optSetBox, id=wx.ID_ANY, pos=(145, 5),
+            size=(70, 160), choices=names[9:24]
+          )
+        ]
+        for i in range(0, 3):
+            self.optSetCheckListList[i].SetFont(smallFont)
+
         # Team list
         teams = []
         cursor = conn.execute("""
@@ -486,27 +512,27 @@ class PanelOptimizer(wx.Panel):
             teams.append(str(row[1]) + " (" + str(row[2]) + ")")
         teamsBox = wx.StaticBox(
           parent=self, label="Exclude runes from units in teams",
-          id=wx.ID_ANY, pos=(290, 300), size=(260, 190)
+          id=wx.ID_ANY, pos=(560, 300), size=(260, 170)
         )
 
         # Inventory only option
         self.optionsSizer.Add(teamsBox)
         self.inventoryCheck = wx.CheckBox(
           parent=self, id=wx.ID_ANY, label="Only runes in storage",
-          pos=(560, 310), size=(180, 20)
+          pos=(560, 470), size=(180, 20)
         )
         self.optionsSizer.Add(self.inventoryCheck)
         self.teamCheckList = wx.CheckListBox(
           parent=teamsBox, id=wx.ID_ANY,
-          pos=(5, 5), size=(250, 130), choices=teams
+          pos=(5, 5), size=(250, 110), choices=teams
         )
         btAllTeams = wx.Button(
           parent=teamsBox, id=wx.ID_ANY,
-          pos=(5, 135), size=(120, 20), label="Select all"
+          pos=(5, 115), size=(120, 20), label="Select all"
         )
         btNoTeams = wx.Button(
           parent=teamsBox, id=wx.ID_ANY,
-          pos=(130, 135), size=(120, 20), label="Deselect all"
+          pos=(130, 115), size=(120, 20), label="Deselect all"
         )
         self.Bind(wx.EVT_BUTTON, self.selectAllTeams, btAllTeams)
         self.Bind(wx.EVT_BUTTON, self.deselectAllTeams, btNoTeams)