tilemap-editor 1.0.0__py3-none-any.whl
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.
- configs/themes.py +81 -0
- constants.py +23 -0
- editor.py +776 -0
- event_map.py +21 -0
- layers.py +468 -0
- plugins/__init__.py +1 -0
- plugins/sprite_animation/__init__.py +48 -0
- plugins/sprite_animation/__main__.py +5 -0
- plugins/sprite_animation/clipboard_util.py +54 -0
- plugins/sprite_animation/editor.py +1797 -0
- plugins/sprite_animation/frame_picker.py +523 -0
- plugins/sprite_animation/models.py +219 -0
- plugins/sprite_animation/preview.py +441 -0
- plugins/sprite_animation/protocols.py +57 -0
- plugins/sprite_animation/runtime_load.py +239 -0
- plugins/sprite_animation/standalone.py +89 -0
- plugins/sprite_animation/timeline.py +538 -0
- plugins/sprite_animation/validation.py +22 -0
- tilemap.py +639 -0
- tilemap_editor/__init__.py +3 -0
- tilemap_editor/__main__.py +3 -0
- tilemap_editor/cli.py +30 -0
- tilemap_editor-1.0.0.dist-info/METADATA +52 -0
- tilemap_editor-1.0.0.dist-info/RECORD +57 -0
- tilemap_editor-1.0.0.dist-info/WHEEL +5 -0
- tilemap_editor-1.0.0.dist-info/entry_points.txt +3 -0
- tilemap_editor-1.0.0.dist-info/licenses/LICENSE +24 -0
- tilemap_editor-1.0.0.dist-info/top_level.txt +12 -0
- tilemap_parser.py +241 -0
- ttypes/__init__.py +6 -0
- ttypes/tilemap.py +72 -0
- utils/__init__.py +0 -0
- utils/history.py +46 -0
- utils/icons_cache.py +422 -0
- utils/log_capture.py +115 -0
- utils/serialization.py +52 -0
- utils/validation.py +20 -0
- widgets/__init__.py +0 -0
- widgets/automap_models.py +455 -0
- widgets/autotile_template.py +230 -0
- widgets/autotiler.py +944 -0
- widgets/filemanager.py +1395 -0
- widgets/layer_selector.py +511 -0
- widgets/mapsetup.py +163 -0
- widgets/regex_automap_designer.py +822 -0
- widgets/tile_grid.py +858 -0
- widgets/tile_selector.py +571 -0
- widgets/ui/draw_utils.py +47 -0
- widgets/ui/fileinput.py +162 -0
- widgets/ui/layer_type_dialog.py +172 -0
- widgets/ui/menubar.py +173 -0
- widgets/ui/notification.py +69 -0
- widgets/ui/property_editor.py +216 -0
- widgets/ui/theme.py +47 -0
- widgets/ui/tileset_type_dialog.py +180 -0
- widgets/ui/toolbar.py +105 -0
- widgets/ui/tooltip.py +37 -0
configs/themes.py
ADDED
|
@@ -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
|
+
}
|
constants.py
ADDED
|
@@ -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
|