tilemap-editor 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tilemap_editor-1.0.0/LICENSE +24 -0
- tilemap_editor-1.0.0/MANIFEST.in +8 -0
- tilemap_editor-1.0.0/PKG-INFO +52 -0
- tilemap_editor-1.0.0/README.md +36 -0
- tilemap_editor-1.0.0/pyproject.toml +52 -0
- tilemap_editor-1.0.0/setup.cfg +4 -0
- tilemap_editor-1.0.0/src/configs/themes.py +81 -0
- tilemap_editor-1.0.0/src/constants.py +23 -0
- tilemap_editor-1.0.0/src/editor.py +776 -0
- tilemap_editor-1.0.0/src/event_map.py +21 -0
- tilemap_editor-1.0.0/src/layers.py +468 -0
- tilemap_editor-1.0.0/src/main.py +0 -0
- tilemap_editor-1.0.0/src/plugins/__init__.py +1 -0
- tilemap_editor-1.0.0/src/plugins/sprite_animation/__init__.py +48 -0
- tilemap_editor-1.0.0/src/plugins/sprite_animation/__main__.py +5 -0
- tilemap_editor-1.0.0/src/plugins/sprite_animation/clipboard_util.py +54 -0
- tilemap_editor-1.0.0/src/plugins/sprite_animation/editor.py +1797 -0
- tilemap_editor-1.0.0/src/plugins/sprite_animation/frame_picker.py +523 -0
- tilemap_editor-1.0.0/src/plugins/sprite_animation/models.py +219 -0
- tilemap_editor-1.0.0/src/plugins/sprite_animation/preview.py +441 -0
- tilemap_editor-1.0.0/src/plugins/sprite_animation/protocols.py +57 -0
- tilemap_editor-1.0.0/src/plugins/sprite_animation/runtime_load.py +239 -0
- tilemap_editor-1.0.0/src/plugins/sprite_animation/standalone.py +89 -0
- tilemap_editor-1.0.0/src/plugins/sprite_animation/timeline.py +538 -0
- tilemap_editor-1.0.0/src/plugins/sprite_animation/validation.py +22 -0
- tilemap_editor-1.0.0/src/runtime/tilemap_parse.py +470 -0
- tilemap_editor-1.0.0/src/runtime/tilemap_runtime.py +193 -0
- tilemap_editor-1.0.0/src/standalone_automap.py +115 -0
- tilemap_editor-1.0.0/src/standalone_filemanager.py +227 -0
- tilemap_editor-1.0.0/src/standalone_image_viewer.py +392 -0
- tilemap_editor-1.0.0/src/tilemap.py +639 -0
- tilemap_editor-1.0.0/src/tilemap_editor/__init__.py +3 -0
- tilemap_editor-1.0.0/src/tilemap_editor/__main__.py +3 -0
- tilemap_editor-1.0.0/src/tilemap_editor/cli.py +30 -0
- tilemap_editor-1.0.0/src/tilemap_editor.egg-info/PKG-INFO +52 -0
- tilemap_editor-1.0.0/src/tilemap_editor.egg-info/SOURCES.txt +67 -0
- tilemap_editor-1.0.0/src/tilemap_editor.egg-info/dependency_links.txt +1 -0
- tilemap_editor-1.0.0/src/tilemap_editor.egg-info/entry_points.txt +3 -0
- tilemap_editor-1.0.0/src/tilemap_editor.egg-info/requires.txt +1 -0
- tilemap_editor-1.0.0/src/tilemap_editor.egg-info/top_level.txt +12 -0
- tilemap_editor-1.0.0/src/tilemap_parser.py +241 -0
- tilemap_editor-1.0.0/src/ttypes/__init__.py +6 -0
- tilemap_editor-1.0.0/src/ttypes/tilemap.py +72 -0
- tilemap_editor-1.0.0/src/utils/__init__.py +0 -0
- tilemap_editor-1.0.0/src/utils/history.py +46 -0
- tilemap_editor-1.0.0/src/utils/icons_cache.py +422 -0
- tilemap_editor-1.0.0/src/utils/log_capture.py +115 -0
- tilemap_editor-1.0.0/src/utils/serialization.py +52 -0
- tilemap_editor-1.0.0/src/utils/validation.py +20 -0
- tilemap_editor-1.0.0/src/widgets/__init__.py +0 -0
- tilemap_editor-1.0.0/src/widgets/automap_models.py +455 -0
- tilemap_editor-1.0.0/src/widgets/autotile_template.py +230 -0
- tilemap_editor-1.0.0/src/widgets/autotiler.py +944 -0
- tilemap_editor-1.0.0/src/widgets/filemanager.py +1395 -0
- tilemap_editor-1.0.0/src/widgets/layer_selector.py +511 -0
- tilemap_editor-1.0.0/src/widgets/mapsetup.py +163 -0
- tilemap_editor-1.0.0/src/widgets/regex_automap_designer.py +822 -0
- tilemap_editor-1.0.0/src/widgets/tile_grid.py +858 -0
- tilemap_editor-1.0.0/src/widgets/tile_selector.py +571 -0
- tilemap_editor-1.0.0/src/widgets/ui/draw_utils.py +47 -0
- tilemap_editor-1.0.0/src/widgets/ui/fileinput.py +162 -0
- tilemap_editor-1.0.0/src/widgets/ui/layer_type_dialog.py +172 -0
- tilemap_editor-1.0.0/src/widgets/ui/menubar.py +173 -0
- tilemap_editor-1.0.0/src/widgets/ui/notification.py +69 -0
- tilemap_editor-1.0.0/src/widgets/ui/property_editor.py +216 -0
- tilemap_editor-1.0.0/src/widgets/ui/theme.py +47 -0
- tilemap_editor-1.0.0/src/widgets/ui/tileset_type_dialog.py +180 -0
- tilemap_editor-1.0.0/src/widgets/ui/toolbar.py +105 -0
- tilemap_editor-1.0.0/src/widgets/ui/tooltip.py +37 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
This is free and unencumbered software released into the public domain.
|
|
2
|
+
|
|
3
|
+
Anyone is free to copy, modify, publish, use, compile, sell, or
|
|
4
|
+
distribute this software, either in source code form or as a compiled
|
|
5
|
+
binary, for any purpose, commercial or non-commercial, and by any
|
|
6
|
+
means.
|
|
7
|
+
|
|
8
|
+
In jurisdictions that recognize copyright laws, the author or authors
|
|
9
|
+
of this software dedicate any and all copyright interest in the
|
|
10
|
+
software to the public domain. We make this dedication for the benefit
|
|
11
|
+
of the public at large and to the detriment of our heirs and
|
|
12
|
+
successors. We intend this dedication to be an overt act of
|
|
13
|
+
relinquishment in perpetuity of all present and future rights to this
|
|
14
|
+
software under copyright law.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
20
|
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
21
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
+
|
|
24
|
+
For more information, please refer to <https://unlicense.org>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tilemap-editor
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Pygame tilemap editor with layers and sprite animation tools
|
|
5
|
+
Author: tilemap editor contributors
|
|
6
|
+
License: Proprietary
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
9
|
+
Classifier: Topic :: Games/Entertainment
|
|
10
|
+
Classifier: Topic :: Software Development
|
|
11
|
+
Requires-Python: >=3.10
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Requires-Dist: pygame-ce>=2.5
|
|
15
|
+
Dynamic: license-file
|
|
16
|
+
|
|
17
|
+
# tilemap-editor
|
|
18
|
+
|
|
19
|
+
`tilemap-editor` is a pygame-based map editor focused on fast iteration for 2D games.
|
|
20
|
+
|
|
21
|
+
## What it includes
|
|
22
|
+
|
|
23
|
+
- multi-layer tile/object map editing
|
|
24
|
+
- tileset and per-tile properties
|
|
25
|
+
- sprite animation editor (`tilemap-anim-editor`)
|
|
26
|
+
- JSON save/load compatible with this editor
|
|
27
|
+
|
|
28
|
+
## Install (local/dev)
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pip install -e .
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Run editor
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
tilemap-editor
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## In-game debug usage
|
|
41
|
+
|
|
42
|
+
```python
|
|
43
|
+
from editor import Editor
|
|
44
|
+
|
|
45
|
+
if __name__ == "__main__":
|
|
46
|
+
dbg = Editor()
|
|
47
|
+
dbg.run()
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Runtime split
|
|
51
|
+
|
|
52
|
+
This package is editor-first. Runtime parser/loading modules can be moved into a separate package later.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# tilemap-editor
|
|
2
|
+
|
|
3
|
+
`tilemap-editor` is a pygame-based map editor focused on fast iteration for 2D games.
|
|
4
|
+
|
|
5
|
+
## What it includes
|
|
6
|
+
|
|
7
|
+
- multi-layer tile/object map editing
|
|
8
|
+
- tileset and per-tile properties
|
|
9
|
+
- sprite animation editor (`tilemap-anim-editor`)
|
|
10
|
+
- JSON save/load compatible with this editor
|
|
11
|
+
|
|
12
|
+
## Install (local/dev)
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
pip install -e .
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Run editor
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
tilemap-editor
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## In-game debug usage
|
|
25
|
+
|
|
26
|
+
```python
|
|
27
|
+
from editor import Editor
|
|
28
|
+
|
|
29
|
+
if __name__ == "__main__":
|
|
30
|
+
dbg = Editor()
|
|
31
|
+
dbg.run()
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Runtime split
|
|
35
|
+
|
|
36
|
+
This package is editor-first. Runtime parser/loading modules can be moved into a separate package later.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=69", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "tilemap-editor"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "Pygame tilemap editor with layers and sprite animation tools"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = { text = "Proprietary" }
|
|
12
|
+
authors = [{ name = "tilemap editor contributors" }]
|
|
13
|
+
dependencies = [
|
|
14
|
+
"pygame-ce>=2.5",
|
|
15
|
+
]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
19
|
+
"Topic :: Games/Entertainment",
|
|
20
|
+
"Topic :: Software Development",
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
[project.scripts]
|
|
24
|
+
tilemap-editor = "tilemap_editor.cli:main"
|
|
25
|
+
tilemap-anim-editor = "plugins.sprite_animation.standalone:main"
|
|
26
|
+
|
|
27
|
+
[tool.setuptools]
|
|
28
|
+
package-dir = {"" = "src"}
|
|
29
|
+
include-package-data = false
|
|
30
|
+
py-modules = [
|
|
31
|
+
"constants",
|
|
32
|
+
"editor",
|
|
33
|
+
"event_map",
|
|
34
|
+
"layers",
|
|
35
|
+
"tilemap",
|
|
36
|
+
"tilemap_parser",
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
[tool.setuptools.packages.find]
|
|
40
|
+
where = ["src"]
|
|
41
|
+
include = [
|
|
42
|
+
"tilemap_editor*",
|
|
43
|
+
"plugins*",
|
|
44
|
+
"ttypes*",
|
|
45
|
+
"widgets*",
|
|
46
|
+
"utils*",
|
|
47
|
+
"configs*",
|
|
48
|
+
]
|
|
49
|
+
namespaces = true
|
|
50
|
+
|
|
51
|
+
[tool.setuptools.exclude-package-data]
|
|
52
|
+
"*" = ["*.spec", "*.sh"]
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING
|
|
2
|
+
from constants import MAIN_PANEL_ID
|
|
3
|
+
|
|
4
|
+
if TYPE_CHECKING:
|
|
5
|
+
from ttypes.theme import TTheme
|
|
6
|
+
|
|
7
|
+
DEFAULT_THEME: "TTheme" = {
|
|
8
|
+
"defaults": {
|
|
9
|
+
"colours": {
|
|
10
|
+
"normal_bg": "#2b2e34",
|
|
11
|
+
"hovered_bg": "#3c4048",
|
|
12
|
+
"disabled_bg": "#1f2227",
|
|
13
|
+
"selected_bg": "#1a5276",
|
|
14
|
+
"normal_text": "#e0e0e0",
|
|
15
|
+
"hovered_text": "#ffffff",
|
|
16
|
+
"normal_border": "#555555",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
MAIN_PANEL_ID: {
|
|
20
|
+
"colours": {"dark_bg": "rgb(60, 65, 70)"},
|
|
21
|
+
"misc": {"border_width": "0"},
|
|
22
|
+
},
|
|
23
|
+
"label": {
|
|
24
|
+
"font": {"name": "noto_sans", "bold": "1", "size": "14"},
|
|
25
|
+
"colours": {"normal_text": "#f0f0f0"},
|
|
26
|
+
},
|
|
27
|
+
"#submit_button": {
|
|
28
|
+
"colours": {
|
|
29
|
+
"normal_bg": "#2b2e34",
|
|
30
|
+
"hovered_bg": "#3c4048",
|
|
31
|
+
"active_bg": "#2b2e34",
|
|
32
|
+
"selected_bg": "#1a5276",
|
|
33
|
+
"disabled_bg": "#1f2227",
|
|
34
|
+
"normal_text": "#e0e0e0",
|
|
35
|
+
"hovered_text": "#ffffff",
|
|
36
|
+
"active_text": "#e0e0e0",
|
|
37
|
+
"selected_text": "#ffffff",
|
|
38
|
+
"disabled_text": "#808080",
|
|
39
|
+
"normal_text_shadow": "#2b2e34",
|
|
40
|
+
"hovered_text_shadow": "#3c4048",
|
|
41
|
+
"active_text_shadow": "#2b2e34",
|
|
42
|
+
"selected_text_shadow": "#1a5276",
|
|
43
|
+
"disabled_text_shadow": "#1f2227",
|
|
44
|
+
"normal_border": "#2b2e34",
|
|
45
|
+
"hovered_border": "#2a2e40",
|
|
46
|
+
"active_border": "#2b2e34",
|
|
47
|
+
"selected_border": "#1a5276",
|
|
48
|
+
"disabled_border": "#1f2227",
|
|
49
|
+
},
|
|
50
|
+
"misc": {
|
|
51
|
+
"border_width": "10",
|
|
52
|
+
"shape_corner_radius": "2",
|
|
53
|
+
"text_shadow_size": "2",
|
|
54
|
+
"text_shadow_offset": "0,0",
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
"@alert": {
|
|
58
|
+
"colours": {
|
|
59
|
+
"normal_bg": "#3e3e3e",
|
|
60
|
+
"normal_border": "#e74c3c",
|
|
61
|
+
"normal_text": "#ffffff",
|
|
62
|
+
},
|
|
63
|
+
"misc": {"border_width": "2", "shadow_width": "3"},
|
|
64
|
+
},
|
|
65
|
+
"@alert.text_box": {
|
|
66
|
+
"colours": {
|
|
67
|
+
"dark_bg": "#4b4b4b",
|
|
68
|
+
"normal_text": "#ffffff",
|
|
69
|
+
},
|
|
70
|
+
"misc": {"border_width": "0", "shadow_width": "0"},
|
|
71
|
+
},
|
|
72
|
+
"@alert.#dismiss_button": {
|
|
73
|
+
"colours": {
|
|
74
|
+
"normal_bg": "#e74c3c",
|
|
75
|
+
"hovered_bg": "#c0392b",
|
|
76
|
+
"normal_text": "#ffffff",
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"#tile_grid": {"colours": {"normal_bg": "#ff0000", "dark_bg": "#ff0000"}},
|
|
80
|
+
"#tileset_btm_toolbar": {},
|
|
81
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
|
|
4
|
+
# Handle PyInstaller bundled execution
|
|
5
|
+
# When frozen (built with PyInstaller), sys._MEIPASS contains the temp directory
|
|
6
|
+
# where bundled files are extracted. Otherwise, use the normal project structure.
|
|
7
|
+
if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
|
|
8
|
+
# Running as compiled executable
|
|
9
|
+
BASE_PATH = Path(sys._MEIPASS)
|
|
10
|
+
else:
|
|
11
|
+
# Running as script
|
|
12
|
+
BASE_PATH = Path(__file__).parent.parent
|
|
13
|
+
THEME_PATH = BASE_PATH / "src" / "themes"
|
|
14
|
+
|
|
15
|
+
MAIN_PANEL_ID = "#main_panel"
|
|
16
|
+
|
|
17
|
+
INTELLISENSE_DEPTH = 3
|
|
18
|
+
IGNORE_DIRS = {".git", "__pycache__", "node_modules", "venv", ".venv", "build", "dist"}
|
|
19
|
+
MAX_LOG_FILES = 20
|
|
20
|
+
|
|
21
|
+
# Image preview spritesheet settings
|
|
22
|
+
SPRITESHEET_THRESHOLD_WIDTH = 800
|
|
23
|
+
SPRITESHEET_THRESHOLD_HEIGHT = 600
|