def __init__( self, parent: wx.Window, canvas: "EditCanvas", world: "BaseLevel", options_path: str, ): SimpleOperationPanel.__init__(self, parent, canvas, world, options_path) options = self._load_options({}) self._file_picker = wx.FilePickerCtrl( self, path=options.get("path", ""), wildcard="mcstructure file (*.mcstructure)|*.mcstructure", style=wx.FLP_USE_TEXTCTRL | wx.FLP_SAVE | wx.FLP_OVERWRITE_PROMPT, ) self._sizer.Add(self._file_picker, 0, wx.ALL | wx.CENTER, 5) self._version_define = VersionSelect( self, world.translation_manager, options.get("platform", None) or world.level_wrapper.platform, allowed_platforms=("bedrock", ), allow_numerical=False, ) self._sizer.Add(self._version_define, 0, wx.CENTRE, 5) self._add_run_button("Export") self.Layout()
def __init__( self, parent: wx.Window, canvas: "EditCanvas", world: "BaseLevel", options_path: str, ): SimpleOperationPanel.__init__(self, parent, canvas, world, options_path) self._add_run_button() self.Layout()
def __init__( self, parent: wx.Window, canvas: "EditCanvas", world: "BaseLevel", options_path: str, ): SimpleOperationPanel.__init__(self, parent, canvas, world, options_path) options = self._load_options({}) self._file_picker = wx.FilePickerCtrl( self, path=options.get("path", ""), wildcard="Schematic file (*.schematic)|*.schematic", style=wx.FLP_USE_TEXTCTRL | wx.FLP_OPEN, ) self._sizer.Add(self._file_picker, 0, wx.ALL | wx.CENTER, 5) self._add_run_button("Load") self.Layout()
def __init__( self, parent: wx.Window, canvas: "EditCanvas", world: "BaseLevel", options_path: str, ): SimpleOperationPanel.__init__(self, parent, canvas, world, options_path) self.Freeze() options = self._load_options({}) self._mode = SimpleChoiceAny(self, sort=False) self._mode.SetItems({mode: lang[mode] for mode in MODES.keys()}) self._sizer.Add(self._mode, 0, Border, 5) self._mode.Bind(wx.EVT_CHOICE, self._on_mode_change) self._mode_description = wx.TextCtrl(self, style=wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_BESTWRAP) self._sizer.Add(self._mode_description, 0, Border, 5) self._mode_description.SetLabel(MODES[self._mode.GetCurrentObject()]) self._mode_description.Fit() self._biome_choice = BiomeDefine( self, world.level_wrapper.translation_manager, wx.VERTICAL, *(options.get("original_block_options", []) or [world.level_wrapper.platform]), show_pick_biome=True, ) self._biome_click_registered = False self._biome_choice.Bind(EVT_PICK, self._on_pick_biome_button) self._sizer.Add(self._biome_choice, 1, Border, 5) self._add_run_button() self.Thaw()
def __init__( self, parent: wx.Window, canvas: "EditCanvas", world: "BaseLevel", options_path: str, ): SimpleOperationPanel.__init__(self, parent, canvas, world, options_path) options = self._load_options({}) self._file_picker = wx.FilePickerCtrl( self, path=options.get("path", ""), wildcard="Schematic file (*.schematic)|*.schematic", style=wx.FLP_USE_TEXTCTRL | wx.FLP_SAVE, ) self._sizer.Add(self._file_picker, 0, wx.ALL | wx.CENTER, 5) self._platform_define = PlatformSelect( self, world.translation_manager, options.get("platform", None) or world.level_wrapper.platform, allow_universal=False, ) self._sizer.Add(self._platform_define, 0, wx.CENTRE, 5) self._sizer.Add( wx.StaticText(self, label=WarningMsg, style=wx.ALIGN_CENTRE_HORIZONTAL), 0, wx.ALL | wx.CENTER, 5, ) self._add_run_button("Export") self.Layout()