Ejemplo n.º 1
0
    def __init__(
            self,
            parent: wx.Window,
            canvas: "EditCanvas",
            world: "World",
            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="Construction file (*.construction)|*.construction",
            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.world_wrapper.platform,
            allow_universal=False
        )
        self._sizer.Add(self._version_define, 0, wx.CENTRE, 5)
        self._add_run_button("Export")
        self.Layout()
Ejemplo n.º 2
0
    def __init__(self, parent: wx.Window, canvas: "EditCanvas", world: "World",
                 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 | wx.FLP_OVERWRITE_PROMPT,
        )
        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.world_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()
Ejemplo n.º 3
0
    def __init__(self, parent: wx.Window, canvas: "EditCanvas", world: "World",
                 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.world_wrapper.translation_manager,
            wx.VERTICAL,
            *(options.get("original_block_options", [])
              or [world.world_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()
Ejemplo n.º 4
0
    def __init__(self, parent: wx.Window, canvas: "EditCanvas", world: "World",
                 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("Import")
        self.Layout()
Ejemplo n.º 5
0
    def __init__(self, parent: wx.Window, canvas: "EditCanvas", world: "World",
                 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="Bedrock mcstructure file (*.mcstructure)|*.mcstructure",
            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()
Ejemplo n.º 6
0
 def __init__(self, parent: wx.Window, canvas: "EditCanvas", world: "World",
              options_path: str):
     SimpleOperationPanel.__init__(self, parent, canvas, world,
                                   options_path)
     self._add_run_button()
     self.Layout()