mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Compare commits
1 commit
30eed8ad19
...
544535ede7
Author | SHA1 | Date | |
---|---|---|---|
544535ede7 |
|
@ -10,7 +10,7 @@ msgstr ""
|
|||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Language-Team: Chinese Simplified\n"
|
||||
"Language: zh_CN\n"
|
||||
"PO-Revision-Date: 2024-12-27 07:28\n"
|
||||
"PO-Revision-Date: 2024-12-16 23:11\n"
|
||||
|
||||
msgid "OK"
|
||||
msgstr "确定"
|
||||
|
@ -226,7 +226,7 @@ msgstr "初始角度:"
|
|||
|
||||
#. Found under the Select menu, It's a checkbox that, if enabled, wraps around brush strokes if some part of them goes out of selection bounds.
|
||||
msgid "Wrap Strokes"
|
||||
msgstr "环绕描边"
|
||||
msgstr ""
|
||||
|
||||
msgid "Clear"
|
||||
msgstr "取消选中"
|
||||
|
@ -1181,24 +1181,24 @@ msgstr "色调影响因素:"
|
|||
|
||||
#. An image effect that adjusts the colors of the image by using curves.
|
||||
msgid "Color Curves"
|
||||
msgstr "颜色曲线"
|
||||
msgstr ""
|
||||
|
||||
#. Refers to a color channel, such as the red, green, blue or alpha channels.
|
||||
msgid "Channel:"
|
||||
msgstr "通道:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Red"
|
||||
msgstr "红色"
|
||||
msgstr ""
|
||||
|
||||
msgid "Green"
|
||||
msgstr "绿色"
|
||||
msgstr ""
|
||||
|
||||
#. Refers to the value (as in HSV) of the colors of an image.
|
||||
msgid "Value"
|
||||
msgstr "值"
|
||||
msgstr ""
|
||||
|
||||
msgid "Presets"
|
||||
msgstr "预设"
|
||||
msgstr ""
|
||||
|
||||
msgid "Apply"
|
||||
msgstr "应用"
|
||||
|
@ -1268,7 +1268,7 @@ msgid "Developed by Orama Interactive"
|
|||
msgstr "由 Orama Interactive 开发 - 简体中文翻译 By 大眼仔~旭(Anan)"
|
||||
|
||||
msgid "©2019-present by Orama Interactive and contributors"
|
||||
msgstr "© 版权所有 2019~2025 - Orama Interactive 和贡献者"
|
||||
msgstr "© 版权所有 2019~2024 - Orama Interactive 和贡献者"
|
||||
|
||||
msgid "Website"
|
||||
msgstr "网站"
|
||||
|
@ -1874,7 +1874,7 @@ msgstr "如果启用,应用程序窗口可以变得透明。 这会影响性
|
|||
|
||||
#. An option found in the preferences, under the Performance section. A dummy driver is basically a driver that doesn't do anything. When this option is enabled, audio does not play, but it can help save some performance.
|
||||
msgid "Use dummy audio driver"
|
||||
msgstr "使用虚拟音频驱动程序"
|
||||
msgstr ""
|
||||
|
||||
#. Found in the Preferences, under Drivers. Specifies the renderer/video driver being used.
|
||||
msgid "Renderer:"
|
||||
|
@ -2311,7 +2311,7 @@ msgstr "取消链接单元格"
|
|||
|
||||
#. An option found in the right click menu of an audio cel. If selected, the audio of the audio layer will start playing from this frame.
|
||||
msgid "Play audio here"
|
||||
msgstr "在此处播放音频"
|
||||
msgstr ""
|
||||
|
||||
msgid "Properties"
|
||||
msgstr "属性"
|
||||
|
@ -2351,10 +2351,10 @@ msgstr "组"
|
|||
|
||||
#. A tilemap is a type of layer, which is divided by grid cells, the size of which is determined by the tileset it uses. Each grid cell is mapped to a tile in the tileset. Tilemaps can be used to create game levels and layouts.
|
||||
msgid "Tilemap"
|
||||
msgstr "图块"
|
||||
msgstr ""
|
||||
|
||||
msgid "Audio"
|
||||
msgstr "音频"
|
||||
msgstr ""
|
||||
|
||||
msgid "Layers"
|
||||
msgstr "图层"
|
||||
|
@ -2386,12 +2386,12 @@ msgstr "添加 3D 图层"
|
|||
#. One of the options of the create new layer button.
|
||||
#: src/UI/Timeline/AnimationTimeline.tscn
|
||||
msgid "Add Tilemap Layer"
|
||||
msgstr "添加图块图层"
|
||||
msgstr ""
|
||||
|
||||
#. One of the options of the create new layer button.
|
||||
#: src/UI/Timeline/AnimationTimeline.tscn
|
||||
msgid "Add Audio Layer"
|
||||
msgstr "添加音频图层"
|
||||
msgstr ""
|
||||
|
||||
#: src/UI/Timeline/AnimationTimeline.tscn
|
||||
msgid "Remove current layer"
|
||||
|
@ -2526,14 +2526,14 @@ msgstr "展开/折叠组"
|
|||
|
||||
#. Refers to the audio file of an audio layer.
|
||||
msgid "Audio file:"
|
||||
msgstr "音频文件:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Load file"
|
||||
msgstr "加载文件"
|
||||
msgstr ""
|
||||
|
||||
#. An option in the audio layer properties, allows users to play the audio starting from a specific frame.
|
||||
msgid "Play at frame:"
|
||||
msgstr "在帧中播放:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Palette"
|
||||
msgstr "调色板"
|
||||
|
@ -3111,7 +3111,7 @@ msgstr "录制器"
|
|||
|
||||
#. Tiles are images of a specific shape, usually rectangular, that are laid out in a grid. They are used in tile-based video games. https://en.wikipedia.org/wiki/Tile-based_video_game
|
||||
msgid "Tiles"
|
||||
msgstr "平铺"
|
||||
msgstr ""
|
||||
|
||||
msgid "Crop"
|
||||
msgstr "裁剪"
|
||||
|
@ -3522,47 +3522,47 @@ msgstr "您想从 %s 下载图像吗?"
|
|||
#: src/Classes/TileSetCustom.gd
|
||||
#: src/UI/Dialogs/ImportPreviewDialog.gd
|
||||
msgid "Tileset"
|
||||
msgstr "图块集"
|
||||
msgstr ""
|
||||
|
||||
#. A tileset is a collection of tiles.
|
||||
#: src/UI/Timeline/NewTileMapLayerDialog.tscn
|
||||
msgid "Tileset:"
|
||||
msgstr "图块集:"
|
||||
msgstr ""
|
||||
|
||||
#. A tileset is a collection of tiles.
|
||||
#: src/UI/Dialogs/ProjectProperties.tscn
|
||||
msgid "Tilesets"
|
||||
msgstr "图块集"
|
||||
msgstr ""
|
||||
|
||||
#: src/UI/Timeline/NewTileMapLayerDialog.tscn
|
||||
msgid "New tileset"
|
||||
msgstr "新建图块集"
|
||||
msgstr ""
|
||||
|
||||
#: src/UI/Timeline/NewTileMapLayerDialog.tscn
|
||||
msgid "Tileset name:"
|
||||
msgstr "图块集名称:"
|
||||
msgstr ""
|
||||
|
||||
#: src/UI/Timeline/NewTileMapLayerDialog.tscn
|
||||
msgid "Tile size:"
|
||||
msgstr "图块大小:"
|
||||
msgstr ""
|
||||
|
||||
#: src/UI/TilesPanel.tscn
|
||||
msgid "Draw tiles"
|
||||
msgstr "绘制图块"
|
||||
msgstr ""
|
||||
|
||||
#: src/UI/TilesPanel.tscn
|
||||
msgid "Rotate tile left (counterclockwise)"
|
||||
msgstr "向左旋转图块(逆时针)"
|
||||
msgstr ""
|
||||
|
||||
#: src/UI/TilesPanel.tscn
|
||||
msgid "Rotate tile right (clockwise)"
|
||||
msgstr "向右旋转图块(顺时针)"
|
||||
msgstr ""
|
||||
|
||||
#: src/UI/TilesPanel.tscn
|
||||
msgid "Flip tile horizontally"
|
||||
msgstr "水平翻转图块"
|
||||
msgstr ""
|
||||
|
||||
#: src/UI/TilesPanel.tscn
|
||||
msgid "Flip tile vertically"
|
||||
msgstr "垂直翻转图块"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -287,10 +287,7 @@ func open_pxo_file(path: String, is_backup := false, replace_empty := true) -> v
|
|||
var image := Image.create_from_data(
|
||||
tile_size.x, tile_size.y, false, new_project.get_image_format(), image_data
|
||||
)
|
||||
tileset.add_tile(image, null, 0)
|
||||
for cel in new_project.get_all_pixel_cels():
|
||||
if cel is CelTileMap:
|
||||
cel.find_times_used_of_tiles()
|
||||
tileset.add_tile(image, null)
|
||||
zip_reader.close()
|
||||
new_project.export_directory_path = path.get_base_dir()
|
||||
|
||||
|
@ -881,7 +878,7 @@ func open_image_as_tileset(
|
|||
Rect2i(frame_width * xx, frame_height * yy, frame_width, frame_height)
|
||||
)
|
||||
@warning_ignore("int_as_enum_without_cast")
|
||||
tileset.add_tile(cropped_image, null, 0)
|
||||
tileset.add_tile(cropped_image, null)
|
||||
project.tilesets.append(tileset)
|
||||
|
||||
|
||||
|
@ -904,7 +901,7 @@ func open_image_as_tileset_smart(
|
|||
)
|
||||
cropped_image.blit_rect(image, rect, offset)
|
||||
@warning_ignore("int_as_enum_without_cast")
|
||||
tileset.add_tile(cropped_image, null, 0)
|
||||
tileset.add_tile(cropped_image, null)
|
||||
project.tilesets.append(tileset)
|
||||
|
||||
|
||||
|
|
|
@ -330,7 +330,7 @@ func serialize_undo_data_source_image(
|
|||
if source_image.get_size() != image.get_size():
|
||||
undo_data[self]["resize"] = true
|
||||
_resize_cells(source_image.get_size())
|
||||
tileset.handle_project_resize(self)
|
||||
tileset.clear_tileset(self)
|
||||
var tile_editing_mode := TileSetPanel.tile_editing_mode
|
||||
if tile_editing_mode == TileSetPanel.TileEditingMode.MANUAL:
|
||||
tile_editing_mode = TileSetPanel.TileEditingMode.AUTO
|
||||
|
@ -352,13 +352,6 @@ func deserialize_undo_data(dict: Dictionary, undo_redo: UndoRedo, undo: bool) ->
|
|||
undo_redo.add_do_method(tileset.deserialize_undo_data.bind(dict.tileset, self))
|
||||
|
||||
|
||||
## Called when loading a new project. Loops through all [member cells]
|
||||
## and finds the amount of times each tile from the [member tileset] is being used.
|
||||
func find_times_used_of_tiles() -> void:
|
||||
for cell in cells:
|
||||
tileset.tiles[cell.index].times_used += 1
|
||||
|
||||
|
||||
## Gets called every time a change is being applied to the [param image],
|
||||
## such as when finishing drawing with a draw tool, or when applying an image effect.
|
||||
## This method responsible for updating the indices of the [member cells], as well as
|
||||
|
|
|
@ -16,9 +16,9 @@ var name := ""
|
|||
var tile_size: Vector2i
|
||||
## The collection of tiles in the form of an [Array] of type [TileSetCustom.Tile].
|
||||
var tiles: Array[Tile] = []
|
||||
## If [code]true[/code], the code in [method handle_project_resize] does not execute.
|
||||
## If [code]true[/code], the code in [method clear_tileset] does not execute.
|
||||
## This variable is used to prevent multiple cels from clearing the tileset at the same time.
|
||||
## In [method handle_project_resize], the variable is set to [code]true[/code], and then
|
||||
## In [method clear_tileset], the variable is set to [code]true[/code], and then
|
||||
## immediately set to [code]false[/code] in the next frame using [method Object.set_deferred].
|
||||
var _tileset_has_been_cleared := false
|
||||
|
||||
|
@ -50,9 +50,8 @@ func _init(_tile_size: Vector2i, _name := "", add_empty_tile := true) -> void:
|
|||
## Adds a new [param image] as a tile to the tileset.
|
||||
## The [param cel] parameter references the [CelTileMap] that this change is coming from,
|
||||
## and the [param edit_mode] parameter contains the tile editing mode at the time of this change.
|
||||
func add_tile(image: Image, cel: CelTileMap, times_used := 1) -> void:
|
||||
func add_tile(image: Image, cel: CelTileMap) -> void:
|
||||
var tile := Tile.new(image)
|
||||
tile.times_used = times_used
|
||||
tiles.append(tile)
|
||||
updated.emit(cel, -1)
|
||||
|
||||
|
@ -116,15 +115,14 @@ func remove_unused_tiles(cel: CelTileMap) -> bool:
|
|||
return tile_removed
|
||||
|
||||
|
||||
## Clears the used tiles of tileset. Called when the project gets resized,
|
||||
## Clears the tileset. Usually called when the project gets resized,
|
||||
## and tilemap cels are updating their size and clearing the tileset to re-create it.
|
||||
func handle_project_resize(cel: CelTileMap) -> void:
|
||||
func clear_tileset(cel: CelTileMap) -> void:
|
||||
if _tileset_has_been_cleared:
|
||||
return
|
||||
for i in range(tiles.size() - 1, 0, -1):
|
||||
var tile := tiles[i]
|
||||
if tile.times_used > 0:
|
||||
tiles.erase(tile)
|
||||
tiles.clear()
|
||||
var empty_image := Image.create_empty(tile_size.x, tile_size.y, false, Image.FORMAT_RGBA8)
|
||||
tiles.append(Tile.new(empty_image))
|
||||
updated.emit(cel, -1)
|
||||
_tileset_has_been_cleared = true
|
||||
set_deferred("_tileset_has_been_cleared", false)
|
||||
|
|
Loading…
Reference in a new issue