Rework more windows to use aux frame
This commit is contained in:
@@ -141,31 +141,3 @@ class AttributeSlider(wx.Panel):
|
||||
# Stop animations to prevent crashes when window is
|
||||
# closed while animation is in progress
|
||||
self.slider.FreezeAnimation()
|
||||
|
||||
|
||||
class TestAttributeSlider(wx.Frame):
|
||||
|
||||
def __init__(self, parent, id):
|
||||
title = 'Slider...'
|
||||
pos = wx.DefaultPosition
|
||||
size = wx.DefaultSize
|
||||
sty = wx.DEFAULT_FRAME_STYLE
|
||||
wx.Frame.__init__(self, parent, id, title, pos, size, sty)
|
||||
|
||||
self.panel = AttributeSlider(self, -50, 0.8, 1.5, False)
|
||||
self.panel.Bind(EVT_VALUE_CHANGED, self.thing)
|
||||
self.panel.SetValue(-55)
|
||||
self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
|
||||
|
||||
def OnCloseWindow(self, event):
|
||||
self.Destroy()
|
||||
|
||||
def thing(self, evt):
|
||||
print("thing")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = wx.App()
|
||||
frame = TestAttributeSlider(None, wx.ID_ANY)
|
||||
frame.Show()
|
||||
app.MainLoop()
|
||||
|
||||
@@ -346,45 +346,3 @@ class ItemParams(wx.Panel):
|
||||
else:
|
||||
fvalue = value
|
||||
return "%s %s" % (fvalue, unit)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
import eos.db
|
||||
# need to set up some paths, since bitmap loader requires config to have things
|
||||
# Should probably change that so that it's not dependant on config
|
||||
import os
|
||||
os.chdir('..')
|
||||
import config
|
||||
config.defPaths(None)
|
||||
config.debug = True
|
||||
class Frame(wx.Frame):
|
||||
def __init__(self, ):
|
||||
# item = eos.db.getItem(23773) # Ragnarok
|
||||
item = eos.db.getItem(23061) # Einherji I
|
||||
#item = eos.db.getItem(24483) # Nidhoggur
|
||||
#item = eos.db.getItem(587) # Rifter
|
||||
#item = eos.db.getItem(2486) # Warrior I
|
||||
#item = eos.db.getItem(526) # Stasis Webifier I
|
||||
item = eos.db.getItem(486) # 200mm AutoCannon I
|
||||
#item = eos.db.getItem(200) # Phased Plasma L
|
||||
|
||||
super().__init__(None, title="Test Attribute Window | {} - {}".format(item.ID, item.name), size=(1000, 500))
|
||||
|
||||
if 'wxMSW' in wx.PlatformInfo:
|
||||
color = wx.SystemSettings.GetColour(wx.SYS_COLOUR_BTNFACE)
|
||||
self.SetBackgroundColour(color)
|
||||
|
||||
main_sizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||
|
||||
panel = ItemParams(self, None, item)
|
||||
|
||||
main_sizer.Add(panel, 1, wx.EXPAND | wx.ALL, 2)
|
||||
|
||||
self.SetSizer(main_sizer)
|
||||
self.Layout()
|
||||
|
||||
app = wx.App(redirect=False) # Error messages go to popup window
|
||||
top = Frame()
|
||||
top.Show()
|
||||
app.MainLoop()
|
||||
|
||||
Reference in New Issue
Block a user