mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 09:09:47 +00:00
Fix various typos
This commit is contained in:
parent
2a13f48987
commit
98cef503c2
2
.github/workflows/static-checks.yml
vendored
2
.github/workflows/static-checks.yml
vendored
|
@ -25,4 +25,4 @@ jobs:
|
|||
uses: codespell-project/actions-codespell@v1
|
||||
with:
|
||||
skip: ./addons,*.po
|
||||
ignore_words_list: cello,doubleclick
|
||||
ignore_words_list: chello,doubleclick
|
||||
|
|
|
@ -128,7 +128,7 @@ class MenuAPI:
|
|||
|
||||
func add_menu_item(menu_type: int, item_name: String, item_metadata, item_id := -1) -> int:
|
||||
# item_metadata is usually a popup node you want to appear when you click the item_name
|
||||
# that popup should also have an (menu_item_clicked) function inside it's script
|
||||
# that popup should also have an (menu_item_clicked) function inside its script
|
||||
var popup_menu: PopupMenu = _get_popup_menu(menu_type)
|
||||
if not popup_menu:
|
||||
return -1
|
||||
|
|
|
@ -71,7 +71,7 @@ func _define_js() -> void:
|
|||
)
|
||||
|
||||
|
||||
# If (load_directly = false) then image info (image and it's name)
|
||||
# If (load_directly = false) then image info (image and its name)
|
||||
# will not be directly farwarded it to OpenSave
|
||||
func load_image(load_directly := true):
|
||||
if OS.get_name() != "HTML5" or !OS.has_feature("JavaScript"):
|
||||
|
|
|
@ -336,7 +336,7 @@ func _load_palettes() -> void:
|
|||
"data", "last_palette", DEFAULT_PALETTE_NAME
|
||||
)
|
||||
for i in range(len(search_locations)):
|
||||
# If palette is not in palettes write path - make it's copy in the write path
|
||||
# If palette is not in palettes write path - make its copy in the write path
|
||||
var make_copy := false
|
||||
if search_locations[i] != palettes_write_path:
|
||||
make_copy = true
|
||||
|
@ -347,8 +347,7 @@ func _load_palettes() -> void:
|
|||
var palette: Palette = load(base_directory.plus_file(file_name))
|
||||
if palette:
|
||||
if make_copy:
|
||||
# Makes a copy of the palette
|
||||
_save_palette(palette)
|
||||
_save_palette(palette) # Makes a copy of the palette
|
||||
palette.resource_name = palette.resource_path.get_file().trim_suffix(".tres")
|
||||
# On Windows for some reason paths can contain "res://" in front of them which breaks saving
|
||||
palette.resource_path = palette.resource_path.trim_prefix("res://")
|
||||
|
|
|
@ -98,7 +98,7 @@ func _on_Preset_item_selected(index: int) -> void:
|
|||
set_default_values()
|
||||
Palettes.NewPalettePresetType.FROM_CURRENT_PALETTE:
|
||||
colors_settings.hide()
|
||||
# If any palette was selected copy it's settings to dialog
|
||||
# If any palette was selected, copy its settings to dialog
|
||||
if current_palette:
|
||||
name_input.text = current_palette.name
|
||||
comment_input.text = current_palette.comment
|
||||
|
|
|
@ -12,7 +12,7 @@ export var comment: String = ""
|
|||
export var width := DEFAULT_WIDTH
|
||||
export var height := DEFAULT_HEIGHT
|
||||
|
||||
# Sparse colors dictionary - actual color position in the palette is determined by it's index
|
||||
# Sparse colors dictionary - actual color position in the palette is determined by its index
|
||||
export var colors: Dictionary = {}
|
||||
|
||||
# How many colors fit in palette grid
|
||||
|
@ -66,7 +66,7 @@ func reindex_colors_on_size_reduce(remove_trailing: bool) -> void:
|
|||
if remove_trailing and new_index >= colors_max:
|
||||
colors.erase(old_index)
|
||||
|
||||
# Move color to new lower index - erase it from it's original index
|
||||
# Move color to new lower index - erase it from its original index
|
||||
elif new_index < old_index:
|
||||
colors[new_index] = colors[old_index]
|
||||
colors[new_index].index = new_index
|
||||
|
@ -129,7 +129,7 @@ func remove_color(index: int) -> void:
|
|||
func insert_color(index: int, new_color: Color) -> void:
|
||||
var c := PaletteColor.new(new_color, index)
|
||||
# If insert happens on non empty swatch recursively move the original color
|
||||
# and every other color to it's right one swatch to right
|
||||
# and every other color to its right one swatch to right
|
||||
if colors.get(index) != null:
|
||||
move_right(index)
|
||||
colors[index] = c
|
||||
|
|
|
@ -17,7 +17,7 @@ onready var delete_color_button := $"%DeleteColor"
|
|||
onready var edit_palette_dialog := $"%EditPaletteDialog"
|
||||
onready var create_palette_dialog := $"%CreatePaletteDialog"
|
||||
|
||||
# Color picker button itself is hidden but it's popup is used to edit color swatches
|
||||
# Color picker button itself is hidden but its popup is used to edit color swatches
|
||||
onready var hidden_color_picker := $"%HiddenColorPickerButton"
|
||||
|
||||
|
||||
|
@ -164,7 +164,7 @@ func _on_PaletteGrid_swatch_double_clicked(_mb: int, index: int, click_position:
|
|||
hidden_color_picker.color = color
|
||||
hidden_color_picker.emit_signal("color_changed", hidden_color_picker.color)
|
||||
|
||||
# Open color picker popup with it's right bottom corner next to swatch
|
||||
# Open color picker popup with its right bottom corner next to swatch
|
||||
var popup = hidden_color_picker.get_popup()
|
||||
popup.rect_position = click_position - popup.rect_size
|
||||
popup.popup()
|
||||
|
|
|
@ -181,7 +181,7 @@ func _add_extension(file_name: String) -> void:
|
|||
_enable_extension(extension)
|
||||
|
||||
# If an extension doesn't crash pixelorama then it is proven innocent
|
||||
# And we should now delete it's "Faulty.txt" file
|
||||
# And we should now delete its "Faulty.txt" file
|
||||
remover_directory.remove(EXTENSIONS_PATH.plus_file("Faulty.txt"))
|
||||
|
||||
|
||||
|
|
|
@ -168,14 +168,14 @@ func add_line(loaded_line_data := {}, is_tracker := false):
|
|||
|
||||
# This code in if block is purely for beautification
|
||||
if pos_x.value > p_size.x / 2 and !loaded_line_data:
|
||||
# If new line is created ahed of half project distance then
|
||||
# reverse it's angle
|
||||
# If new line is created ahead of half project distance then
|
||||
# reverse its angle
|
||||
line_data.angle = 180
|
||||
|
||||
if is_tracker: # if we are creating tracker line then length adjustment is not required
|
||||
if tracker_line != null: # Also if the tracker line already exists then cancel creation
|
||||
return
|
||||
else: # If we are not creating a perspective line then adjust it's length
|
||||
else: # If we are not creating a perspective line then adjust its length
|
||||
if !loaded_line_data:
|
||||
line_data.length = p_size.x
|
||||
|
||||
|
@ -183,7 +183,7 @@ func add_line(loaded_line_data := {}, is_tracker := false):
|
|||
var line = preload("res://src/UI/PerspectiveEditor/PerspectiveLine.tscn").instance()
|
||||
line.initiate(line_data, self)
|
||||
|
||||
# Set it's mode accordingly
|
||||
# Set its mode accordingly
|
||||
if is_tracker: # Settings for Tracker mode
|
||||
line.track_mouse = true
|
||||
tracker_line = line
|
||||
|
|
Loading…
Reference in a new issue