mapeditor / mapeditor/tiled

Hierarchical Tileset Panel option

Open
#4,596 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
12.9k
Forks
2k
Avg merge
4h 27m
Merged PRs (30d)
8

Description

Is your feature request related to a problem? Please describe.

Its fraustrating when there are many object tilesets and we need to scroll the tab. It cause so much friction espically when object has same prefix.

Describe the solution you'd like.
Image

I would love something like this as shown in screenshot. The folder are virtual folders without affecting the path of tileset.

Describe alternatives you've considered.

While i cant uderstand tiled source code, The above screenshot is pygame and roughly its

class TreeWidget(WidgetBase):
    class State(Enum):
        IDLE = auto()
        PRESSED = auto()
        DRAGGING = auto()

    def __init__(self, rect: Rect) -> None: ...
    def set_data(self, roots: list[TreeNode]) -> None: ...
    def find_node(self, node_id: str) -> TreeNode | None: ...
    def begin_rename(self, node_id: str) -> bool: ...
    def cancel_rename(self) -> None: ...
    def _commit_rename(self) -> None: ...
    def _invalidate_cache(self) -> None: ...
    def _build_flat_cache(self) -> None: ...
    def _get_depth(self, node: TreeNode) -> int: ...
    def _hit_test(self, pos: tuple[int, int]) -> tuple[TreeNode | None, DropZone | None]: ...
    def _is_valid_drop(self, target_node: TreeNode | None, zone: DropZone | None) -> bool: ...
    def _execute_drop(self) -> None: ...

    on_selection_changed: Callable[[list[str]], None] | None = None
    on_item_activated: Callable[[str], None] | None = None
    on_item_context: Callable[[str], None] | None = None
    on_structure_changed: Callable[[], None] | None = None
    on_rename_committed: Callable[[str, str], None] | None = None
    on_delete_requested: Callable[[list[str]], None] | None = None


class TreeNode:
    id: str
    label: str
    is_folder: bool
    collapsed: bool
    icon_key: str | None
    data: Any
    children: list[TreeNode]
    parent: TreeNode | None

    def add_child(self, child: TreeNode) -> None: ...
    def insert_child(self, index: int, child: TreeNode) -> None: ...
    def remove_child(self, child: TreeNode) -> None: ...
    def is_descendant_of(self, ancestor: TreeNode) -> bool: ...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files or tests are named. Start by locating the Tileset Panel entry point and its tileset-tab data model; the requested result is a hierarchical view with virtual folders while preserving each tileset's existing path.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.