# Path: flexlay/property.py
# class BoolProperty(Property):
# 
#     editable = True
# 
#     def property_dialog(self, dialog):
#         dialog.add_bool(self.label, self.value, self.on_value_change)
# 
# Path: supertux/property.py
# class DirectionProperty(EnumProperty):
# class InlinePosProperty:
# class InlineTilePosProperty(InlinePosProperty):
# class InlineRectProperty:
# class SpriteProperty(StringProperty):
# class BadGuyProperty(EnumProperty):
# class ImageProperty(StringProperty):
# class SoundProperty(StringProperty):
# class PathProperty:
#     class Node:
# class SampleProperty(StringProperty):
# class TilemapProperty(EnumProperty):
# class SectorProperty(StringProperty):
# class ZPosProperty(IntProperty):
#     def __init__(self, label, identifier, default):
#     def __init__(self):
#     def read(self, sexpr, obj):
#     def write(self, writer, obj):
#     def property_dialog(self, dialog):
#     def read(self, sexpr, obj):
#     def write(self, writer, obj):
#     def __init__(self):
#     def read(self, sexpr, obj):
#     def write(self, writer, obj):
#     def property_dialog(self, dialog):
#     def write(self, writer, obj):
#     def __init__(self, label, identifier, supertux_gameobj_factory):
#     def __init__(self, *args, **kwargs):
#     def __init__(self, label, identifier, default=""):
#     def property_dialog(self, dialog):
#         def __init__(self, x, y, time):
#     def __init__(self, label, identifier):
#     def read(self, sexpr, obj):
#     def write(self, writer, obj):
#     def property_dialog(self, dialog):
#     def __init__(self, label, identifier, default):
#     def __init__(self, label, identifier, optional, placeholder=None):
#     def property_dialog(self, dialog):
#     def _get_tilemaps(self):
#     def __init__(self, label, identifier, default, optional):
#     def __init__(self, default=0):
# 
# Path: supertux/gameobj.py
# class GameObj:
# 
#     label: Optional[str] = None
#     identifier: Optional[str] = None
#     properties: List[Property] = []
#     constraints: List[Constraint] = []
#     factory = None
# 
#     def __init__(self):
#         self.objmap_object = None
# 
#     def signal_connect(self):
#         """Connect the objmap_object signals to the on_select and on_deselect
# 
#         Used, for example, to display properties in PropertiesWidget.
#         """
#         if not self.objmap_object:
#             return
#         self.objmap_object.sig_select.connect(self.on_select)
#         self.objmap_object.sig_deselect.connect(self.on_deselect)
# 
#     def on_select(self, manager):
#         if manager:
#             props_widget = manager.properties_widget
#             props_widget.set_properties(self.properties)
#             props_widget.add_callback(self.on_callback)
# 
#     def on_deselect(self, manager):
#         if manager:
#             props_widget = manager.properties_widget
#             props_widget.clear_properties()
#             props_widget.call_signal.clear()
# 
#     def add_property(self, prop):
#         self.properties.append(prop)
# 
#     def read(self, sexpr):
#         for prop in self.properties:
#             prop.read(sexpr, self.objmap_object)
# 
#     def write(self, writer, obj):
#         writer.begin_list(self.identifier)
#         for prop in self.properties:
#             prop.write(writer, obj)
#         writer.end_list()
# 
#     def property_dialog(self, gui=None):
#         dialog = GenericDialog(self.label + " Property Dialog", gui)
#         for prop in self.properties:
#             prop.property_dialog(dialog)
# 
#         dialog.add_callback(self.on_callback)
# 
#     def find_property(self, identifier):
#         for prop in self.properties:
#             if prop.identifier == identifier:
#                 return prop
# 
#     def on_callback(self, *args):
#         """Called when "Apply" or "Okay" hit"""
#         print(args)
#         prop_diff = []
#         i = 0
#         for property in self.properties:
#             if property.editable:
#                 if args[i] == property.value:
#                     continue
#                 prop_diff.append((i, args[i], property.value))
#             i += 1
#         command = GameObjPropsChangeCommand(self, prop_diff)
#         Workspace.current.get_map().execute(command)
# 
#     def update(self):
#         """Called after properties read, and optionally at any other time"""
#         pass
# 
# def make_sprite_object(metadata, filename, pos=None):
#     pos = Point(0, 0) if pos is None else pos
#     sprite = SuperTuxSprite.from_file(os.path.join(Config.current.datadir, filename))
#     obj = ObjMapSpriteObject(sprite.get_sprite(), pos, metadata)
#     return obj


from flexlay.property import (
    BoolProperty,
)
from supertux.property import (
    StringProperty,
    SpriteProperty,
    InlineTilePosProperty,
)
from supertux.gameobj import GameObj, make_sprite_object
    sprite = "images/worldmap/common/leveldot_green.png"

    def __init__(self):
        super().__init__()

        self.objmap_object = make_sprite_object(self, self.sprite)
        self.signal_connect()

        self.properties = [
            StringProperty("Level File", "name", ""),
            StringProperty("Extro Script", "extro-script", "", optional=True),
            BoolProperty("auto-play", "auto-play", False, optional=True),
            SpriteProperty("Sprite", "sprite"),
            InlineTilePosProperty()
        ]


class SpecialTile(GameObj):

    label = "SpecialTile"
    identifier = "special-tile"
    sprite = "images/worldmap/common/leveldot.sprite"

    def __init__(self):
        super().__init__()

        self.objmap_object = make_sprite_object(self, self.sprite)
        self.signal_connect()

        self.properties = [

# Path: flexlay/property.py
# class BoolProperty(Property):
# 
#     editable = True
# 
#     def property_dialog(self, dialog):
#         dialog.add_bool(self.label, self.value, self.on_value_change)
# 
# Path: supertux/property.py
# class DirectionProperty(EnumProperty):
# class InlinePosProperty:
# class InlineTilePosProperty(InlinePosProperty):
# class InlineRectProperty:
# class SpriteProperty(StringProperty):
# class BadGuyProperty(EnumProperty):
# class ImageProperty(StringProperty):
# class SoundProperty(StringProperty):
# class PathProperty:
#     class Node:
# class SampleProperty(StringProperty):
# class TilemapProperty(EnumProperty):
# class SectorProperty(StringProperty):
# class ZPosProperty(IntProperty):
#     def __init__(self, label, identifier, default):
#     def __init__(self):
#     def read(self, sexpr, obj):
#     def write(self, writer, obj):
#     def property_dialog(self, dialog):
#     def read(self, sexpr, obj):
#     def write(self, writer, obj):
#     def __init__(self):
#     def read(self, sexpr, obj):
#     def write(self, writer, obj):
#     def property_dialog(self, dialog):
#     def write(self, writer, obj):
#     def __init__(self, label, identifier, supertux_gameobj_factory):
#     def __init__(self, *args, **kwargs):
#     def __init__(self, label, identifier, default=""):
#     def property_dialog(self, dialog):
#         def __init__(self, x, y, time):
#     def __init__(self, label, identifier):
#     def read(self, sexpr, obj):
#     def write(self, writer, obj):
#     def property_dialog(self, dialog):
#     def __init__(self, label, identifier, default):
#     def __init__(self, label, identifier, optional, placeholder=None):
#     def property_dialog(self, dialog):
#     def _get_tilemaps(self):
#     def __init__(self, label, identifier, default, optional):
#     def __init__(self, default=0):
# 
# Path: supertux/gameobj.py
# class GameObj:
# 
#     label: Optional[str] = None
#     identifier: Optional[str] = None
#     properties: List[Property] = []
#     constraints: List[Constraint] = []
#     factory = None
# 
#     def __init__(self):
#         self.objmap_object = None
# 
#     def signal_connect(self):
#         """Connect the objmap_object signals to the on_select and on_deselect
# 
#         Used, for example, to display properties in PropertiesWidget.
#         """
#         if not self.objmap_object:
#             return
#         self.objmap_object.sig_select.connect(self.on_select)
#         self.objmap_object.sig_deselect.connect(self.on_deselect)
# 
#     def on_select(self, manager):
#         if manager:
#             props_widget = manager.properties_widget
#             props_widget.set_properties(self.properties)
#             props_widget.add_callback(self.on_callback)
# 
#     def on_deselect(self, manager):
#         if manager:
#             props_widget = manager.properties_widget
#             props_widget.clear_properties()
#             props_widget.call_signal.clear()
# 
#     def add_property(self, prop):
#         self.properties.append(prop)
# 
#     def read(self, sexpr):
#         for prop in self.properties:
#             prop.read(sexpr, self.objmap_object)
# 
#     def write(self, writer, obj):
#         writer.begin_list(self.identifier)
#         for prop in self.properties:
#             prop.write(writer, obj)
#         writer.end_list()
# 
#     def property_dialog(self, gui=None):
#         dialog = GenericDialog(self.label + " Property Dialog", gui)
#         for prop in self.properties:
#             prop.property_dialog(dialog)
# 
#         dialog.add_callback(self.on_callback)
# 
#     def find_property(self, identifier):
#         for prop in self.properties:
#             if prop.identifier == identifier:
#                 return prop
# 
#     def on_callback(self, *args):
#         """Called when "Apply" or "Okay" hit"""
#         print(args)
#         prop_diff = []
#         i = 0
#         for property in self.properties:
#             if property.editable:
#                 if args[i] == property.value:
#                     continue
#                 prop_diff.append((i, args[i], property.value))
#             i += 1
#         command = GameObjPropsChangeCommand(self, prop_diff)
#         Workspace.current.get_map().execute(command)
# 
#     def update(self):
#         """Called after properties read, and optionally at any other time"""
#         pass
# 
# def make_sprite_object(metadata, filename, pos=None):
#     pos = Point(0, 0) if pos is None else pos
#     sprite = SuperTuxSprite.from_file(os.path.join(Config.current.datadir, filename))
#     obj = ObjMapSpriteObject(sprite.get_sprite(), pos, metadata)
#     return obj


# Path: supertux/worldmap_object.py
from flexlay.property import (
    BoolProperty,
)
from supertux.property import (
    StringProperty,
    SpriteProperty,
    InlineTilePosProperty,
)
from supertux.gameobj import GameObj, make_sprite_object

    sprite = "images/worldmap/common/leveldot_green.png"

    def __init__(self):
        super().__init__()

        self.objmap_object = make_sprite_object(self, self.sprite)
        self.signal_connect()

        self.properties = [
            StringProperty("Level File", "name", ""),
            StringProperty("Extro Script", "extro-script", "", optional=True),
            BoolProperty("auto-play", "auto-play", False, optional=True),
            SpriteProperty("Sprite", "sprite"),
            InlineTilePosProperty()
        ]


class SpecialTile(GameObj):

    label = "SpecialTile"
    identifier = "special-tile"
    sprite = "images/worldmap/common/leveldot.sprite"

    def __init__(self):
        super().__init__()

        self.objmap_object = make_sprite_object(self, self.sprite)
        self.signal_connect()

        self.properties = [

            StringProperty("Name", "name", "main"),