diff --git a/gui/builtinGraphs/base.py b/gui/builtinGraphs/base.py index 77e165afd..3df622d4c 100644 --- a/gui/builtinGraphs/base.py +++ b/gui/builtinGraphs/base.py @@ -117,7 +117,7 @@ class Graph(metaclass=ABCMeta): XDef = namedtuple('XDef', ('handle', 'unit', 'label', 'mainInput')) YDef = namedtuple('YDef', ('handle', 'unit', 'label', 'eosGraph')) Input = namedtuple('Input', ('handle', 'unit', 'label', 'iconID', 'defaultValue', 'defaultRange', 'mainOnly')) -VectorDef = namedtuple('VectorDef', ('lengthHandle', 'lengthUnit', 'angleHandle', 'angleUnit')) +VectorDef = namedtuple('VectorDef', ('lengthHandle', 'lengthUnit', 'angleHandle', 'angleUnit', 'label')) # noinspection PyUnresolvedReferences diff --git a/gui/builtinGraphs/fitDamageStats.py b/gui/builtinGraphs/fitDamageStats.py index 0dc7a7f99..14bd2e663 100644 --- a/gui/builtinGraphs/fitDamageStats.py +++ b/gui/builtinGraphs/fitDamageStats.py @@ -57,11 +57,11 @@ class FitDamageStatsGraph(Graph): @property def srcVectorDef(self): - return VectorDef(lengthHandle='atkSpeed', lengthUnit='%', angleHandle='atkAngle', angleUnit='degrees') + return VectorDef(lengthHandle='atkSpeed', lengthUnit='%', angleHandle='atkAngle', angleUnit='degrees', label='Attacker') @property def tgtVectorDef(self): - return VectorDef(lengthHandle='tgtSpeed', lengthUnit='%', angleHandle='tgtAngle', angleUnit='degrees') + return VectorDef(lengthHandle='tgtSpeed', lengthUnit='%', angleHandle='tgtAngle', angleUnit='degrees', label='Target') @property def hasTargets(self): diff --git a/gui/graphFrame/panel.py b/gui/graphFrame/panel.py index ee042bf2b..0201c5b3c 100644 --- a/gui/graphFrame/panel.py +++ b/gui/graphFrame/panel.py @@ -60,10 +60,20 @@ class GraphControlPanel(wx.Panel): graphOptsSizer = wx.BoxSizer(wx.HORIZONTAL) self.inputsSizer = wx.BoxSizer(wx.VERTICAL) graphOptsSizer.Add(self.inputsSizer, 0, wx.EXPAND | wx.ALL, 0) + + srcVectorSizer = wx.BoxSizer(wx.VERTICAL) + self.srcVectorLabel = wx.StaticText(self, wx.ID_ANY, 'Attacker') + srcVectorSizer.Add(self.srcVectorLabel, 0, wx.ALIGN_CENTER_HORIZONTAL| wx.BOTTOM, 5) self.srcVector = VectorPicker(self, style=wx.NO_BORDER, size=75, offset=90) - graphOptsSizer.Add(self.srcVector, 0, wx.SHAPED | wx.ALIGN_CENTER_HORIZONTAL | wx.ALIGN_CENTER_VERTICAL | wx.LEFT, 10) + srcVectorSizer.Add(self.srcVector, 0, wx.SHAPED | wx.ALIGN_CENTER_HORIZONTAL | wx.ALIGN_CENTER_VERTICAL | wx.ALL, 0) + graphOptsSizer.Add(srcVectorSizer, 0, wx.EXPAND | wx.LEFT, 30) + + tgtVectorSizer = wx.BoxSizer(wx.VERTICAL) + self.tgtVectorLabel = wx.StaticText(self, wx.ID_ANY, 'Target') + tgtVectorSizer.Add(self.tgtVectorLabel, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.BOTTOM, 5) self.tgtVector = DirectionPicker(self, style=wx.NO_BORDER, size=75, offset=-90) - graphOptsSizer.Add(self.tgtVector, 0, wx.SHAPED | wx.ALIGN_CENTER_HORIZONTAL | wx.ALIGN_CENTER_VERTICAL | wx.LEFT, 10) + tgtVectorSizer.Add(self.tgtVector, 0, wx.SHAPED | wx.ALIGN_CENTER_HORIZONTAL | wx.ALIGN_CENTER_VERTICAL | wx.ALL, 0) + graphOptsSizer.Add(tgtVectorSizer, 0, wx.EXPAND | wx.LEFT, 10) optsSizer.Add(graphOptsSizer, 0, wx.EXPAND | wx.ALL, 0) mainSizer.Add(optsSizer, 0, wx.EXPAND | wx.ALL, 10) @@ -71,17 +81,18 @@ class GraphControlPanel(wx.Panel): srcTgtSizer = wx.BoxSizer(wx.HORIZONTAL) self.fitList = FitList(graphFrame, self) self.fitList.SetMinSize((270, -1)) - srcTgtSizer.Add(self.fitList, 1, wx.EXPAND) + srcTgtSizer.Add(self.fitList, 1, wx.EXPAND | wx.ALL, 0) self.targets = [] self.targetList = TargetList(graphFrame, self) self.targetList.SetMinSize((270, -1)) self.targetList.update(self.targets) - srcTgtSizer.Add(self.targetList, 1, wx.EXPAND) + srcTgtSizer.Add(self.targetList, 1, wx.EXPAND | wx.ALL, 0) mainSizer.Add(srcTgtSizer, 1, wx.EXPAND | wx.ALL, 0) self.indestructible = { self.showY0Cb, yText, self.ySubSelection, self.xSubSelection, xText, - self.fitList, self.targetList, self.srcVector, self.tgtVector} + self.srcVectorLabel, self.srcVector, self.tgtVectorLabel, self.tgtVector, + self.fitList, self.targetList} self.SetSizer(mainSizer) diff --git a/gui/graphFrame/vector.py b/gui/graphFrame/vector.py index 047cb1821..f4aaade0c 100644 --- a/gui/graphFrame/vector.py +++ b/gui/graphFrame/vector.py @@ -86,7 +86,6 @@ class VectorPicker(wx.Window): width, height = self.GetClientSize() if not width or not height: return - dc.SetBackground(wx.Brush(self.GetBackgroundColour(), wx.BRUSHSTYLE_SOLID)) dc.Clear() dc.SetTextForeground(wx.Colour(0))