def __init__(self, container, world: 'World'): SimplePanel.__init__(self, container) self.world = world self._close_world_button = wx.Button(self, wx.ID_ANY, label='Close World') self._close_world_button.Bind(wx.EVT_BUTTON, self._close_world) self.add_object(self._close_world_button, 0, wx.ALL | wx.CENTER) self.add_object(wx.StaticText(self, label='Currently Opened World: '), 0, wx.ALL | wx.CENTER) self.add_object(WorldUI(self, self.world.world_wrapper), 0, wx.ALL | wx.CENTER) self.add_object( wx.StaticText( self, label= 'Choose from the options on the left what you would like to do.\n' 'You can switch between these at any time.\n' '<================='), 0, wx.ALL | wx.CENTER)
def __init__(self, container, world: World): SimplePanel.__init__( self, container ) self.world = world self._close_world_button = wx.Button(self, wx.ID_ANY, label='Close World') self._close_world_button.Bind(wx.EVT_BUTTON, self._close_world) self.add_object(self._close_world_button, 0, wx.ALL | wx.CENTER) self._input = SimplePanel(self, wx.HORIZONTAL) self.add_object(self._input, 0, wx.ALL|wx.CENTER) self._input.add_object( wx.StaticText( self._input, wx.ID_ANY, 'Input World: ', wx.DefaultPosition, wx.DefaultSize, 0, ), 0, wx.ALL|wx.CENTER ) self._input.add_object( WorldUI(self._input, self.world.world_wrapper), 0, wx.ALL|wx.CENTER ) self._output = SimplePanel(self, wx.HORIZONTAL) self.add_object(self._output, 0, wx.ALL | wx.CENTER) self._output.add_object( wx.StaticText( self._output, wx.ID_ANY, 'Output World: ', wx.DefaultPosition, wx.DefaultSize, 0, ), 0, wx.ALL | wx.CENTER ) self._select_output_button = wx.Button(self, wx.ID_ANY, label='Select Output World') self._select_output_button.Bind(wx.EVT_BUTTON, self._show_world_select) self.add_object(self._select_output_button, 0, wx.ALL | wx.CENTER) self._convert_bar = SimplePanel(self, wx.HORIZONTAL) self.add_object(self._convert_bar, 0, wx.ALL | wx.CENTER) self.loading_bar = wx.Gauge( self._convert_bar, wx.ID_ANY, 100, wx.DefaultPosition, wx.DefaultSize, wx.GA_HORIZONTAL, ) self._convert_bar.add_object(self.loading_bar, options=wx.ALL | wx.EXPAND) self.loading_bar.SetValue(0) self.convert_button = wx.Button(self._convert_bar, wx.ID_ANY, label=lang.get('convert')) self._convert_bar.add_object(self.convert_button) self.convert_button.Bind(wx.EVT_BUTTON, self._convert_event) self.out_world_path = None