Reverted dmg pattern edits to IntCtrl
This commit is contained in:
@@ -20,7 +20,8 @@
|
||||
import wx
|
||||
import bitmapLoader
|
||||
import service
|
||||
from util import toClipboard, fromClipboard, FloatCtrl
|
||||
from wx.lib.intctrl import IntCtrl
|
||||
from util import toClipboard, fromClipboard
|
||||
|
||||
###########################################################################
|
||||
## Class DmgPatternEditorDlg
|
||||
@@ -103,26 +104,22 @@ class DmgPatternEditorDlg (wx.Dialog):
|
||||
|
||||
self.bmpEM = wx.StaticBitmap(self, wx.ID_ANY, self.embitmap)
|
||||
dmgeditSizer.Add(self.bmpEM, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT, 5)
|
||||
self.editEm = FloatCtrl(self, wx.ID_ANY, 0, wx.DefaultPosition, defSize)
|
||||
self.editEm.SetPrecision(2)
|
||||
self.editEm = IntCtrl(self, wx.ID_ANY, 0, wx.DefaultPosition, defSize)
|
||||
dmgeditSizer.Add(self.editEm, 0, wx.BOTTOM | wx.TOP | wx.ALIGN_CENTER_VERTICAL, 5)
|
||||
|
||||
self.bmpTHERM = wx.StaticBitmap(self, wx.ID_ANY, self.thermbitmap)
|
||||
dmgeditSizer.Add(self.bmpTHERM, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT | wx.LEFT, 25)
|
||||
self.editThermal = FloatCtrl(self, wx.ID_ANY, 0, wx.DefaultPosition, defSize, 0)
|
||||
self.editThermal.SetPrecision(2)
|
||||
self.editThermal = IntCtrl(self, wx.ID_ANY, 0, wx.DefaultPosition, defSize, 0)
|
||||
dmgeditSizer.Add(self.editThermal, 0, wx.BOTTOM | wx.TOP | wx.ALIGN_CENTER_VERTICAL, 5)
|
||||
|
||||
self.bmpKIN = wx.StaticBitmap(self, wx.ID_ANY, self.kinbitmap)
|
||||
dmgeditSizer.Add(self.bmpKIN, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT, 5)
|
||||
self.editKinetic = FloatCtrl(self, wx.ID_ANY, 0, wx.DefaultPosition, defSize)
|
||||
self.editKinetic.SetPrecision(2)
|
||||
self.editKinetic = IntCtrl(self, wx.ID_ANY, 0, wx.DefaultPosition, defSize)
|
||||
dmgeditSizer.Add(self.editKinetic, 0, wx.BOTTOM | wx.TOP | wx.ALIGN_CENTER_VERTICAL, 5)
|
||||
|
||||
self.bmpEXP = wx.StaticBitmap(self, wx.ID_ANY, self.expbitmap)
|
||||
dmgeditSizer.Add(self.bmpEXP, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT | wx.LEFT, 25)
|
||||
self.editExplosive = FloatCtrl(self, wx.ID_ANY, 0, wx.DefaultPosition, defSize, 0)
|
||||
self.editExplosive.SetPrecision(2)
|
||||
self.editExplosive = IntCtrl(self, wx.ID_ANY, 0, wx.DefaultPosition, defSize, 0)
|
||||
dmgeditSizer.Add(self.editExplosive, 0, wx.BOTTOM | wx.TOP | wx.ALIGN_CENTER_VERTICAL, 5)
|
||||
|
||||
contentSizer.Add(dmgeditSizer, 1, wx.EXPAND | wx.ALL, 5)
|
||||
@@ -165,6 +162,11 @@ class DmgPatternEditorDlg (wx.Dialog):
|
||||
bsize = self.GetBestSize()
|
||||
self.SetSize((-1,bsize.height))
|
||||
|
||||
self.editEm.SetLimited(True)
|
||||
self.editThermal.SetLimited(True)
|
||||
self.editKinetic.SetLimited(True)
|
||||
self.editExplosive.SetLimited(True)
|
||||
|
||||
self.editEm.SetMin(0)
|
||||
self.editThermal.SetMin(0)
|
||||
self.editKinetic.SetMin(0)
|
||||
|
||||
Reference in New Issue
Block a user