tilemap-editor 4.3.6__tar.gz → 4.3.7__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-4.3.6/src/tilemap_editor.egg-info → tilemap_editor-4.3.7}/PKG-INFO +1 -1
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/pyproject.toml +1 -1
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/editor.py +27 -78
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/layers.py +8 -1
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap.py +21 -49
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7/src/tilemap_editor.egg-info}/PKG-INFO +1 -1
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor.egg-info/SOURCES.txt +2 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/utils/font_manager.py +4 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/input.py +31 -6
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/tile_grid.py +91 -76
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/menubar.py +36 -3
- tilemap_editor-4.3.7/src/widgets/ui/resize_map_dialog.py +223 -0
- tilemap_editor-4.3.7/tests/test_map_resize_model.py +50 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/tests/test_serialization_regression.py +19 -5
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/tests/test_tile_grid_selection.py +1 -1
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/LICENSE +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/MANIFEST.in +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/README.md +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/fonts/jetbrain-fonts/JetBrainsMono-Bold.ttf +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/fonts/jetbrain-fonts/JetBrainsMono-BoldItalic.ttf +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/fonts/jetbrain-fonts/JetBrainsMono-Italic.ttf +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/fonts/jetbrain-fonts/JetBrainsMono-Regular.ttf +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/fonts/noto/NotoSans-Bold.ttf +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/fonts/noto/NotoSans-BoldItalic.ttf +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/fonts/noto/NotoSans-Italic.ttf +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/fonts/noto/NotoSans-Regular.ttf +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/arrow-down.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/check.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/checked.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/close.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/duplicate.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/error.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/file.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/filedead.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/fit.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/folder.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/grid.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/image.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/info.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/load.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/loop.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/onion.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/pan.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/pause.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/pencil.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/play.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/plus.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/radio.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/reset.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/save.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/skip-back.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/skip-forward.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/stop.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/tilemap.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/tileset.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/unchecked.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/warning.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/zoomin.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/assets/icons/zoomout.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/setup.cfg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/constants.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/event_map.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/main.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/node_manager.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/nodes.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/__init__.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/character_collision/__init__.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/character_collision/editor.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/character_collision/models.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/character_collision/protocols.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/character_collision/shape_editor.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/character_collision/standalone.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/object_tileset_collision/__init__.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/object_tileset_collision/editor.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/object_tileset_collision/models.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/object_tileset_collision/protocols.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/object_tileset_collision/standalone.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/sprite_animation/__init__.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/sprite_animation/__main__.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/sprite_animation/clipboard_util.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/sprite_animation/editor.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/sprite_animation/frame_picker.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/sprite_animation/models.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/sprite_animation/preview.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/sprite_animation/protocols.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/sprite_animation/runtime_load.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/sprite_animation/standalone.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/sprite_animation/timeline.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/sprite_animation/validation.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/sprite_editor/__init__.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/sprite_editor/dialogs.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/sprite_editor/editor.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/sprite_editor/region_export.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/sprite_editor/standalone.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/tileset_collision/__init__.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/tileset_collision/collision_painter.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/tileset_collision/editor.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/tileset_collision/models.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/tileset_collision/protocols.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/plugins/tileset_collision/standalone.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/standalone_automap.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/standalone_error_console.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/standalone_filemanager.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/standalone_image_viewer.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/__init__.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/__main__.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/__init__.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/fonts/jetbrain-fonts/JetBrainsMono-Bold.ttf +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/fonts/jetbrain-fonts/JetBrainsMono-BoldItalic.ttf +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/fonts/jetbrain-fonts/JetBrainsMono-Italic.ttf +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/fonts/jetbrain-fonts/JetBrainsMono-Regular.ttf +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/fonts/noto/NotoSans-Bold.ttf +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/fonts/noto/NotoSans-BoldItalic.ttf +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/fonts/noto/NotoSans-Italic.ttf +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/fonts/noto/NotoSans-Regular.ttf +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/ToolMove.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/arrow-down.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/check.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/checked.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/close.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/duplicate.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/error.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/file.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/filedead.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/fit.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/fold_down_arrow.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/folder.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/gear.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/grid.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/image.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/info.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/load.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/loop.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/miniobj.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/onion.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/pan.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/pause.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/pencil.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/play.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/plus.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/radio.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/reset.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/save.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/skip-back.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/skip-forward.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/stop.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/tilemap.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/tileset.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/unchecked.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/unfold_right_arrow.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/warning.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/zoomin.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/assets/icons/zoomout.svg +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/cli.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/main.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor/settings.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor.egg-info/dependency_links.txt +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor.egg-info/entry_points.txt +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor.egg-info/requires.txt +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/tilemap_editor.egg-info/top_level.txt +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/ttypes/__init__.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/ttypes/tilemap.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/utils/__init__.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/utils/editor_preference.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/utils/error_handler.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/utils/history.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/utils/icon_manager.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/utils/icons_cache.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/utils/log_capture.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/utils/project_paths.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/utils/property_suggestions.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/utils/serialization.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/utils/standalone.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/utils/validation.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/__init__.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/automap_models.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/autotile_template.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/autotiler.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/filemanager.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/layer_selector.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/map_properties.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/mapsetup.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/particle_presets.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/particle_system.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/regex_automap_designer.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/spritesheet_grid.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/tile_selector.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/button.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/checkbox.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/collision_layer_mask.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/collision_layer_sidebar.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/confirm_dialog.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/dialog_base.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/drag_tracker.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/draw_utils.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/fileinput.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/label.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/layer_type_dialog.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/mode_indicator.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/node_editor.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/node_selector.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/notification.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/particle_config_dialog.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/property_editor.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/region_selector.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/scrollbar.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/sidebar_container.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/splitter.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/status_bar.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/theme.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/tileset_type_dialog.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/toast.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/tool_manager.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/toolbar.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/tooltip.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/ui/tree_widget.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/src/widgets/widget_base.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/tests/test_animation_library_grid_offset.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/tests/test_collision_layer_mask.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/tests/test_collision_layer_sidebar.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/tests/test_drag_tracker.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/tests/test_editor_pan_mode.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/tests/test_gid_collision.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/tests/test_layers_autotile.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/tests/test_project_paths.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/tests/test_render_scale.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/tests/test_sprite_animation_editor_grid.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/tests/test_tile_selector_pick.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/tests/test_tilemap_save.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/tests/test_timeline_invalidate_cache.py +0 -0
- {tilemap_editor-4.3.6 → tilemap_editor-4.3.7}/tests/test_toolbar_tools.py +0 -0
|
@@ -39,6 +39,7 @@ from widgets.ui.node_selector import NodeSelector
|
|
|
39
39
|
from widgets.ui.notification import NotificationManager
|
|
40
40
|
from widgets.ui.particle_config_dialog import ParticleConfigDialog
|
|
41
41
|
from widgets.ui.property_editor import PropertyEditor
|
|
42
|
+
from widgets.ui.resize_map_dialog import ResizeMapDialog
|
|
42
43
|
from widgets.ui.sidebar_container import SidebarContainer, ToolbarAction
|
|
43
44
|
from widgets.ui.theme import COLORS, THEMES, get_theme_manager, set_theme
|
|
44
45
|
from widgets.ui.tileset_type_dialog import TilesetTypeDialog
|
|
@@ -206,8 +207,7 @@ class Editor:
|
|
|
206
207
|
self.tile_grid_widget: TileGrid | None = None
|
|
207
208
|
|
|
208
209
|
self.left_panel_visible = False
|
|
209
|
-
self.
|
|
210
|
-
self._animation_panel_surface: pygame.Surface | None = None
|
|
210
|
+
self.left_panel_w = 300
|
|
211
211
|
|
|
212
212
|
self.autotiler = AutotileRuleDesigner(self, 100, 100)
|
|
213
213
|
self.regex_automap_designer = RegexAutomapDesigner(self, 150, 100)
|
|
@@ -240,6 +240,8 @@ class Editor:
|
|
|
240
240
|
self.tileset_type_dialog = TilesetTypeDialog(editor_rect)
|
|
241
241
|
self.confirm_dialog = ConfirmDialog(editor_rect)
|
|
242
242
|
self.layer_type_dialog = LayerTypeDialog(editor_rect)
|
|
243
|
+
self.resize_map_dialog = ResizeMapDialog(editor_rect)
|
|
244
|
+
self.resize_map_dialog.editor = self
|
|
243
245
|
|
|
244
246
|
self.menubar = MenuBar(self, self.width, 30)
|
|
245
247
|
self.toolbar = Toolbar(self, 0, 30, self.width, 35)
|
|
@@ -622,13 +624,6 @@ class Editor:
|
|
|
622
624
|
|
|
623
625
|
self._update_side_panel_layout()
|
|
624
626
|
|
|
625
|
-
if self.left_panel_visible and self.animation_panel:
|
|
626
|
-
panel_rect = Rect(0, menu_h + toolbar_h, self.left_panel_w, height - (menu_h + toolbar_h))
|
|
627
|
-
if hasattr(self.animation_panel, "rect"):
|
|
628
|
-
self.animation_panel.rect = panel_rect
|
|
629
|
-
if hasattr(self.animation_panel, "_relayout"):
|
|
630
|
-
self.animation_panel._relayout()
|
|
631
|
-
|
|
632
627
|
rect_full = Rect(0, 0, width, height)
|
|
633
628
|
|
|
634
629
|
if hasattr(self, "tileset_type_dialog") and self.tileset_type_dialog:
|
|
@@ -663,6 +658,12 @@ class Editor:
|
|
|
663
658
|
return
|
|
664
659
|
self.map_properties_dialog.open()
|
|
665
660
|
|
|
661
|
+
def open_resize_map_dialog(self):
|
|
662
|
+
if self.resize_map_dialog is None:
|
|
663
|
+
logger.warning({"msg": "resize_map_dialog is not initialized"})
|
|
664
|
+
return
|
|
665
|
+
self.resize_map_dialog.open()
|
|
666
|
+
|
|
666
667
|
def toggle_autotiler(self):
|
|
667
668
|
if self.autotiler.visible:
|
|
668
669
|
self.autotiler.hide()
|
|
@@ -675,47 +676,6 @@ class Editor:
|
|
|
675
676
|
else:
|
|
676
677
|
self.regex_automap_designer.show()
|
|
677
678
|
|
|
678
|
-
def toggle_animation_panel(self):
|
|
679
|
-
"""Toggle the dockable animation panel visibility (Cmd/Ctrl+B)."""
|
|
680
|
-
if not self.left_panel_visible:
|
|
681
|
-
if self.animation_panel is None:
|
|
682
|
-
self._init_animation_panel()
|
|
683
|
-
if self.animation_panel is not None:
|
|
684
|
-
self.left_panel_visible = True
|
|
685
|
-
else:
|
|
686
|
-
self.left_panel_visible = False
|
|
687
|
-
self.handle_resize(self.width, self.height)
|
|
688
|
-
|
|
689
|
-
def _init_animation_panel(self):
|
|
690
|
-
"""Initialize the animation panel without loading any tileset."""
|
|
691
|
-
from plugins.sprite_animation.editor import SpriteAnimationEditor
|
|
692
|
-
|
|
693
|
-
try:
|
|
694
|
-
|
|
695
|
-
class _PanelConsumer:
|
|
696
|
-
editor_instance = self
|
|
697
|
-
|
|
698
|
-
def on_animation_saved(self, name: str, data: dict) -> None:
|
|
699
|
-
self.editor_instance.notifications.notify(f"Animation saved: {name}")
|
|
700
|
-
|
|
701
|
-
def on_animation_deleted(self, name: str) -> None:
|
|
702
|
-
self.editor_instance.notifications.notify(f"Animation deleted: {name}")
|
|
703
|
-
|
|
704
|
-
consumer = _PanelConsumer()
|
|
705
|
-
|
|
706
|
-
panel_rect = Rect(0, 65, self.left_panel_w, self.height - 65)
|
|
707
|
-
|
|
708
|
-
self.animation_panel = SpriteAnimationEditor(
|
|
709
|
-
panel_rect,
|
|
710
|
-
surface=None,
|
|
711
|
-
tile_size=(32, 32),
|
|
712
|
-
consumer=consumer,
|
|
713
|
-
)
|
|
714
|
-
self.animation_panel._data_root = self.data_root
|
|
715
|
-
except Exception as e:
|
|
716
|
-
error_handler.capture(e, context="init_animation_panel")
|
|
717
|
-
self.notifications.notify(f"Failed to init animation panel: {e}")
|
|
718
|
-
|
|
719
679
|
def undo(self):
|
|
720
680
|
self.tilemap.undo()
|
|
721
681
|
if self.tile_grid_widget:
|
|
@@ -730,6 +690,12 @@ class Editor:
|
|
|
730
690
|
if self.tile_grid_widget:
|
|
731
691
|
self.tile_grid_widget.show_grid = not self.tile_grid_widget.show_grid
|
|
732
692
|
|
|
693
|
+
def toggle_map_boundary(self):
|
|
694
|
+
if self.tile_grid_widget:
|
|
695
|
+
self.tile_grid_widget.show_map_boundary = (
|
|
696
|
+
not self.tile_grid_widget.show_map_boundary
|
|
697
|
+
)
|
|
698
|
+
|
|
733
699
|
def cycle_theme(self):
|
|
734
700
|
"""Cycle through available themes."""
|
|
735
701
|
theme_names = list(THEMES.keys())
|
|
@@ -1145,6 +1111,10 @@ class Editor:
|
|
|
1145
1111
|
self.layer_type_dialog.handle_event(event)
|
|
1146
1112
|
continue
|
|
1147
1113
|
|
|
1114
|
+
if self.resize_map_dialog and self.resize_map_dialog.active:
|
|
1115
|
+
self.resize_map_dialog.handle_event(event)
|
|
1116
|
+
continue
|
|
1117
|
+
|
|
1148
1118
|
if self.map_setup_widget and self.map_setup_widget.visible:
|
|
1149
1119
|
if self.map_setup_widget.handle_event(event):
|
|
1150
1120
|
continue
|
|
@@ -1242,7 +1212,7 @@ class Editor:
|
|
|
1242
1212
|
self.cycle_theme()
|
|
1243
1213
|
continue
|
|
1244
1214
|
if event.key == pygame.K_b and (ctrl_held or meta_held):
|
|
1245
|
-
self.
|
|
1215
|
+
self.toggle_map_boundary()
|
|
1246
1216
|
continue
|
|
1247
1217
|
if pygame.K_1 <= event.key <= pygame.K_9:
|
|
1248
1218
|
if not (self.node_editor and self.node_editor.visible and self.node_editor.editing_field):
|
|
@@ -1259,11 +1229,6 @@ class Editor:
|
|
|
1259
1229
|
if self.toolbar and self.toolbar.handle_event(event):
|
|
1260
1230
|
continue
|
|
1261
1231
|
|
|
1262
|
-
if self.left_panel_visible and self.animation_panel:
|
|
1263
|
-
if hasattr(self.animation_panel, "handle_event"):
|
|
1264
|
-
if self.animation_panel.handle_event(event):
|
|
1265
|
-
continue
|
|
1266
|
-
|
|
1267
1232
|
if event.type == pygame.MOUSEBUTTONDOWN and event.button == 1:
|
|
1268
1233
|
mx, my = event.pos
|
|
1269
1234
|
edge_x = self.width - self._effective_selector_w
|
|
@@ -1310,10 +1275,6 @@ class Editor:
|
|
|
1310
1275
|
if self.tile_grid_widget:
|
|
1311
1276
|
self.tile_grid_widget.update()
|
|
1312
1277
|
|
|
1313
|
-
if self.left_panel_visible and self.animation_panel:
|
|
1314
|
-
if hasattr(self.animation_panel, "update"):
|
|
1315
|
-
self.animation_panel.update()
|
|
1316
|
-
|
|
1317
1278
|
self.screen.fill(COLORS.bg)
|
|
1318
1279
|
self.tooltip.hide()
|
|
1319
1280
|
|
|
@@ -1341,20 +1302,6 @@ class Editor:
|
|
|
1341
1302
|
self.screen.blit(overlay, (0, 0))
|
|
1342
1303
|
self.regex_automap_designer.draw(self.screen)
|
|
1343
1304
|
|
|
1344
|
-
if self.left_panel_visible and self.animation_panel:
|
|
1345
|
-
panel_surf = pygame.Surface((self.left_panel_w, self.height), pygame.SRCALPHA)
|
|
1346
|
-
panel_surf.fill((*COLORS.panel_alt, 255))
|
|
1347
|
-
self.screen.blit(panel_surf, (0, 65))
|
|
1348
|
-
|
|
1349
|
-
pygame.draw.rect(
|
|
1350
|
-
self.screen,
|
|
1351
|
-
COLORS.border,
|
|
1352
|
-
Rect(0, 65, self.left_panel_w, self.height - 65),
|
|
1353
|
-
1,
|
|
1354
|
-
)
|
|
1355
|
-
if hasattr(self.animation_panel, "draw"):
|
|
1356
|
-
self.animation_panel.draw(self.screen)
|
|
1357
|
-
|
|
1358
1305
|
self.notifications.draw(self.screen)
|
|
1359
1306
|
|
|
1360
1307
|
if self.map_setup_widget and self.map_setup_widget.visible:
|
|
@@ -1373,16 +1320,18 @@ class Editor:
|
|
|
1373
1320
|
overlay.fill((0, 0, 0, 150))
|
|
1374
1321
|
self.screen.blit(overlay, (0, 0))
|
|
1375
1322
|
self.tileset_type_dialog.draw(self.screen)
|
|
1376
|
-
if self.
|
|
1323
|
+
if self.resize_map_dialog and self.resize_map_dialog.active:
|
|
1324
|
+
self.resize_map_dialog.draw(self.screen)
|
|
1325
|
+
if self.layer_type_dialog.active:
|
|
1377
1326
|
overlay = pygame.Surface((self.width, self.height), pygame.SRCALPHA)
|
|
1378
1327
|
overlay.fill((0, 0, 0, 150))
|
|
1379
1328
|
self.screen.blit(overlay, (0, 0))
|
|
1380
|
-
self.
|
|
1381
|
-
if self.
|
|
1329
|
+
self.layer_type_dialog.draw(self.screen)
|
|
1330
|
+
if self.confirm_dialog.active:
|
|
1382
1331
|
overlay = pygame.Surface((self.width, self.height), pygame.SRCALPHA)
|
|
1383
1332
|
overlay.fill((0, 0, 0, 150))
|
|
1384
1333
|
self.screen.blit(overlay, (0, 0))
|
|
1385
|
-
self.
|
|
1334
|
+
self.confirm_dialog.draw(self.screen)
|
|
1386
1335
|
|
|
1387
1336
|
if self.loading_state["active"]:
|
|
1388
1337
|
overlay = pygame.Surface((self.width, self.height), pygame.SRCALPHA)
|
|
@@ -217,6 +217,7 @@ class Layer:
|
|
|
217
217
|
start_pos: tuple[int, int],
|
|
218
218
|
new_tile_data: TypeTile,
|
|
219
219
|
map_size: tuple[int, int],
|
|
220
|
+
offset: tuple[int, int] = (0, 0),
|
|
220
221
|
) -> None:
|
|
221
222
|
"""Replace contiguous tiles of the same type starting from start_pos."""
|
|
222
223
|
if self.locked or self.layer_type != "tile":
|
|
@@ -238,7 +239,13 @@ class Layer:
|
|
|
238
239
|
while queue:
|
|
239
240
|
curr = queue.pop(0)
|
|
240
241
|
|
|
241
|
-
|
|
242
|
+
ox, oy = offset
|
|
243
|
+
if (
|
|
244
|
+
curr[0] < ox
|
|
245
|
+
or curr[0] >= ox + map_size[0]
|
|
246
|
+
or curr[1] < oy
|
|
247
|
+
or curr[1] >= oy + map_size[1]
|
|
248
|
+
):
|
|
242
249
|
continue
|
|
243
250
|
|
|
244
251
|
curr_tile = self.tiles.get(curr)
|
|
@@ -40,7 +40,7 @@ class Tilemap:
|
|
|
40
40
|
|
|
41
41
|
self.tile_size = (32, 32)
|
|
42
42
|
self.map_size = (50, 50)
|
|
43
|
-
self.
|
|
43
|
+
self.offset = (0, 0)
|
|
44
44
|
self.initialized = False
|
|
45
45
|
self.render_scale = 1.0
|
|
46
46
|
|
|
@@ -62,10 +62,10 @@ class Tilemap:
|
|
|
62
62
|
if active_layer:
|
|
63
63
|
active_layer.tiles = value
|
|
64
64
|
|
|
65
|
-
def init_size(self, tile_size: "TCoor", map_size: "TCoor", render_scale: float = 1.0):
|
|
65
|
+
def init_size(self, tile_size: "TCoor", map_size: "TCoor", offset: "TCoor" = (0, 0), render_scale: float = 1.0):
|
|
66
66
|
self.tile_size = tile_size
|
|
67
67
|
self.map_size = map_size
|
|
68
|
-
self.
|
|
68
|
+
self.offset = offset
|
|
69
69
|
self.initialized = True
|
|
70
70
|
self.render_scale = render_scale
|
|
71
71
|
self.active_project_path = None
|
|
@@ -88,6 +88,7 @@ class Tilemap:
|
|
|
88
88
|
"active_layer_idx": self.layer_manager.active_layer_idx,
|
|
89
89
|
"tile_size": self.tile_size,
|
|
90
90
|
"map_size": self.map_size,
|
|
91
|
+
"offset": self.offset,
|
|
91
92
|
"render_scale": self.render_scale,
|
|
92
93
|
}
|
|
93
94
|
self.history.save_state(state, description)
|
|
@@ -105,6 +106,7 @@ class Tilemap:
|
|
|
105
106
|
"active_layer_idx": self.layer_manager.active_layer_idx,
|
|
106
107
|
"tile_size": self.tile_size,
|
|
107
108
|
"map_size": self.map_size,
|
|
109
|
+
"offset": self.offset,
|
|
108
110
|
"render_scale": self.render_scale,
|
|
109
111
|
}
|
|
110
112
|
prev_state = self.history.undo(current_state)
|
|
@@ -124,6 +126,7 @@ class Tilemap:
|
|
|
124
126
|
"active_layer_idx": self.layer_manager.active_layer_idx,
|
|
125
127
|
"tile_size": self.tile_size,
|
|
126
128
|
"map_size": self.map_size,
|
|
129
|
+
"offset": self.offset,
|
|
127
130
|
"render_scale": self.render_scale,
|
|
128
131
|
}
|
|
129
132
|
next_state = self.history.redo(current_state)
|
|
@@ -131,28 +134,7 @@ class Tilemap:
|
|
|
131
134
|
self._apply_history_state(next_state)
|
|
132
135
|
|
|
133
136
|
def update_map_size(self):
|
|
134
|
-
"""
|
|
135
|
-
if not self.initialized:
|
|
136
|
-
return
|
|
137
|
-
|
|
138
|
-
max_w = self.initial_map_size[0]
|
|
139
|
-
max_h = self.initial_map_size[1]
|
|
140
|
-
|
|
141
|
-
for layer in self.layer_manager.layers:
|
|
142
|
-
if layer.tiles:
|
|
143
|
-
for pos in layer.tiles:
|
|
144
|
-
max_w = max(max_w, pos[0] + 1)
|
|
145
|
-
max_h = max(max_h, pos[1] + 1)
|
|
146
|
-
|
|
147
|
-
if layer.objects:
|
|
148
|
-
for obj in layer.objects.values():
|
|
149
|
-
area = obj["area"]
|
|
150
|
-
grid_r = (area["x"] + area["w"]) / self.tile_size[0]
|
|
151
|
-
grid_b = (area["y"] + area["h"]) / self.tile_size[1]
|
|
152
|
-
max_w = max(max_w, int(grid_r) + 1)
|
|
153
|
-
max_h = max(max_h, int(grid_b) + 1)
|
|
154
|
-
|
|
155
|
-
self.map_size = (max_w, max_h)
|
|
137
|
+
"""Deprecated compatibility hook retained as no-op."""
|
|
156
138
|
|
|
157
139
|
def incremental_update_map_size(
|
|
158
140
|
self,
|
|
@@ -160,22 +142,15 @@ class Tilemap:
|
|
|
160
142
|
is_pixel: bool = False,
|
|
161
143
|
size: tuple[int, int] | None = None,
|
|
162
144
|
):
|
|
163
|
-
"""
|
|
164
|
-
if not self.initialized:
|
|
165
|
-
return
|
|
166
|
-
|
|
167
|
-
if is_pixel:
|
|
168
|
-
w, h = size if size else self.tile_size
|
|
169
|
-
grid_r = int((pos[0] + w) / self.tile_size[0]) + 1
|
|
170
|
-
grid_b = int((pos[1] + h) / self.tile_size[1]) + 1
|
|
171
|
-
new_w = max(self.map_size[0], grid_r)
|
|
172
|
-
new_h = max(self.map_size[1], grid_b)
|
|
173
|
-
else:
|
|
174
|
-
new_w = max(self.map_size[0], pos[0] + 1)
|
|
175
|
-
new_h = max(self.map_size[1], pos[1] + 1)
|
|
145
|
+
"""Deprecated compatibility hook retained as no-op."""
|
|
176
146
|
|
|
177
|
-
|
|
178
|
-
|
|
147
|
+
def resize(self, offset: "TCoor", size: "TCoor"):
|
|
148
|
+
"""Manually set the map offset and size."""
|
|
149
|
+
self.offset = offset
|
|
150
|
+
self.map_size = (max(1, size[0]), max(1, size[1]))
|
|
151
|
+
tile_grid_widget = getattr(self.editor, "tile_grid_widget", None)
|
|
152
|
+
if tile_grid_widget is not None and hasattr(tile_grid_widget, "invalidate_bounds_cache"):
|
|
153
|
+
tile_grid_widget.invalidate_bounds_cache()
|
|
179
154
|
|
|
180
155
|
def _apply_history_state(self, state):
|
|
181
156
|
from layers import Layer
|
|
@@ -185,6 +160,7 @@ class Tilemap:
|
|
|
185
160
|
self.layer_manager.active_layer_idx = state["active_layer_idx"]
|
|
186
161
|
self.tile_size = state["tile_size"]
|
|
187
162
|
self.map_size = state["map_size"]
|
|
163
|
+
self.offset = state.get("offset", (0, 0))
|
|
188
164
|
self.render_scale = state.get("render_scale", 1.0)
|
|
189
165
|
|
|
190
166
|
if hasattr(self.editor, "autotiler"):
|
|
@@ -259,7 +235,7 @@ class Tilemap:
|
|
|
259
235
|
(getattr(self.editor.tile_grid_widget, "scroll_y", 0) if self.editor.tile_grid_widget else 0),
|
|
260
236
|
)
|
|
261
237
|
),
|
|
262
|
-
"
|
|
238
|
+
"offset": serialize_point(self.offset),
|
|
263
239
|
"render_scale": self.render_scale,
|
|
264
240
|
"version": "1.1",
|
|
265
241
|
},
|
|
@@ -470,11 +446,7 @@ class Tilemap:
|
|
|
470
446
|
self.tile_size = deserialize_point(payload["meta"]["tile_size"])
|
|
471
447
|
self.map_size = deserialize_point(payload["meta"].get("map_size", "50;50"))
|
|
472
448
|
|
|
473
|
-
self.
|
|
474
|
-
if self.initial_map_size:
|
|
475
|
-
self.initial_map_size = deserialize_point(self.initial_map_size)
|
|
476
|
-
else:
|
|
477
|
-
self.initial_map_size = self.map_size
|
|
449
|
+
self.offset = deserialize_point(payload["meta"].get("offset", "0;0"))
|
|
478
450
|
self.render_scale = float(payload["meta"].get("render_scale", 1.0))
|
|
479
451
|
except (KeyError, ValueError) as e:
|
|
480
452
|
raise ValueError(f"Error loading map metadata: {e}") from e
|
|
@@ -576,8 +548,8 @@ class Tilemap:
|
|
|
576
548
|
designer.groups.append(AutotileGroup("Default"))
|
|
577
549
|
designer.selected_group_idx = 0
|
|
578
550
|
|
|
579
|
-
if hasattr(self.editor, "regex_automap_designer") and self.editor.regex_automap_designer
|
|
580
|
-
|
|
551
|
+
if (hasattr(self.editor, "regex_automap_designer") and self.editor.regex_automap_designer
|
|
552
|
+
and "project_state" in payload and "automap_rules" in payload["project_state"]):
|
|
581
553
|
try:
|
|
582
554
|
automap_rules_data = payload["project_state"]["automap_rules"]
|
|
583
555
|
if isinstance(automap_rules_data, list):
|
|
@@ -756,7 +728,7 @@ class Tilemap:
|
|
|
756
728
|
meta = {
|
|
757
729
|
"tile_size": f"{tile_w},{tile_h}",
|
|
758
730
|
"map_size": f"{map_w},{map_h}",
|
|
759
|
-
"
|
|
731
|
+
"offset": "0,0",
|
|
760
732
|
"render_scale": 1.0,
|
|
761
733
|
"version": "1.1",
|
|
762
734
|
"zoom_level": 1.0,
|
|
@@ -198,6 +198,7 @@ src/widgets/ui/notification.py
|
|
|
198
198
|
src/widgets/ui/particle_config_dialog.py
|
|
199
199
|
src/widgets/ui/property_editor.py
|
|
200
200
|
src/widgets/ui/region_selector.py
|
|
201
|
+
src/widgets/ui/resize_map_dialog.py
|
|
201
202
|
src/widgets/ui/scrollbar.py
|
|
202
203
|
src/widgets/ui/sidebar_container.py
|
|
203
204
|
src/widgets/ui/splitter.py
|
|
@@ -216,6 +217,7 @@ tests/test_drag_tracker.py
|
|
|
216
217
|
tests/test_editor_pan_mode.py
|
|
217
218
|
tests/test_gid_collision.py
|
|
218
219
|
tests/test_layers_autotile.py
|
|
220
|
+
tests/test_map_resize_model.py
|
|
219
221
|
tests/test_project_paths.py
|
|
220
222
|
tests/test_render_scale.py
|
|
221
223
|
tests/test_serialization_regression.py
|
|
@@ -109,6 +109,10 @@ class FontManager:
|
|
|
109
109
|
bold: bool | None = None,
|
|
110
110
|
italic: bool | None = None,
|
|
111
111
|
) -> pygame.font.Font:
|
|
112
|
+
if not pygame.get_init():
|
|
113
|
+
pygame.init()
|
|
114
|
+
if not pygame.font.get_init():
|
|
115
|
+
pygame.font.init()
|
|
112
116
|
"""
|
|
113
117
|
Get a font with specified properties.
|
|
114
118
|
|
|
@@ -148,9 +148,8 @@ class InputBox(WidgetBase):
|
|
|
148
148
|
self.insert_text(event.unicode)
|
|
149
149
|
return True
|
|
150
150
|
|
|
151
|
-
if self.is_focused and event.type == pygame.KEYUP:
|
|
152
|
-
|
|
153
|
-
self.selection_start = None
|
|
151
|
+
if self.is_focused and event.type == pygame.KEYUP and event.key in (pygame.K_LSHIFT, pygame.K_RSHIFT):
|
|
152
|
+
self.selection_start = None
|
|
154
153
|
|
|
155
154
|
return False
|
|
156
155
|
|
|
@@ -442,9 +441,8 @@ class InlineTextInput:
|
|
|
442
441
|
self.insert_text(event.unicode)
|
|
443
442
|
return True
|
|
444
443
|
|
|
445
|
-
if event.type == pygame.KEYUP:
|
|
446
|
-
|
|
447
|
-
self.selection_start = None
|
|
444
|
+
if event.type == pygame.KEYUP and event.key in (pygame.K_LSHIFT, pygame.K_RSHIFT):
|
|
445
|
+
self.selection_start = None
|
|
448
446
|
|
|
449
447
|
return False
|
|
450
448
|
|
|
@@ -470,3 +468,30 @@ class DigitInput(BaseTextInput):
|
|
|
470
468
|
|
|
471
469
|
def get_value(self) -> int:
|
|
472
470
|
return self.get_int_value()
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
class SignedIntInput(BaseTextInput):
|
|
474
|
+
def __init__(
|
|
475
|
+
self,
|
|
476
|
+
rect: Rect,
|
|
477
|
+
label: str,
|
|
478
|
+
key: str,
|
|
479
|
+
default_val: str = "",
|
|
480
|
+
tab_index: int | None = None,
|
|
481
|
+
):
|
|
482
|
+
super().__init__(
|
|
483
|
+
rect,
|
|
484
|
+
label,
|
|
485
|
+
key,
|
|
486
|
+
default_val,
|
|
487
|
+
tab_index,
|
|
488
|
+
allowed_chars="-0123456789",
|
|
489
|
+
)
|
|
490
|
+
|
|
491
|
+
def is_char_allowed(self, char: str) -> bool:
|
|
492
|
+
if char in "-":
|
|
493
|
+
return self.text == ""
|
|
494
|
+
return char.isdigit()
|
|
495
|
+
|
|
496
|
+
def get_value(self) -> int:
|
|
497
|
+
return self.get_int_value()
|