Skip to content

Commit

Permalink
Small tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
AnythingNose committed Dec 15, 2024
1 parent 1ac1c52 commit e65fa4d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 21 deletions.
2 changes: 1 addition & 1 deletion export_presets.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="../../Anything Nose Productions/Nose Paint/Builds/NosePaint.exe"
export_path="../../Anything Nose Productions/Nose Paint/Builds/NosePaint-v0.06-windows/NosePaint.exe"
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
Expand Down
2 changes: 1 addition & 1 deletion project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ config_version=5
[application]

config/name="Nose Paint"
config/version="0.0.5"
config/version="0.0.6"
run/main_scene="res://scenes/main.tscn"
config/features=PackedStringArray("4.3", "GL Compatibility")
boot_splash/image="res://assets/nosepaint-logo.png"
Expand Down
6 changes: 3 additions & 3 deletions scripts/canvas.gd
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ var eyedrop_colour : Color
var radius : int = default_brush_size
var stroke_start : Vector2i
var connect_on_release : bool
var colour_primary : Color = Color.WHITE:
var colour_primary : Color = Color(1,1,1,1):
set(value):
colour_primary = value
brush_colour_changed()
Expand Down Expand Up @@ -209,7 +209,8 @@ func end_eyedrop(keep_colour : bool = true) -> void:
## Image / Canvas Intialisation and Loading
func new_blank_image(dimensions: Vector2i) -> void:
# Create a new image and assign it to the texture
image = Image.create_empty(dimensions.x, dimensions.y, false, Image.FORMAT_RGB8)
image = Image.create_empty(dimensions.x, dimensions.y, false, Image.FORMAT_RGBA8)
image.fill(Color.BLACK)
init_canvas()


Expand Down Expand Up @@ -340,7 +341,6 @@ func _draw_horizontal_line(center: Vector2i, start_x: int, end_x: int, y: int) -
for dx : int in range(start_x, end_x + 1):
image.set_pixel(center.x + dx, y, colour_primary)


# Use Bresenham's line algorithm
func _plot_line(p0: Vector2i, p1: Vector2i) -> Array[Vector2i]:
var points: Array[Vector2i] = []
Expand Down
1 change: 1 addition & 0 deletions scripts/main.gd
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ func _ready() -> void:
current_palette = get_palette_filename(default_palettes[0].resource_path)
read_palette_folder()


func _input(event: InputEvent) -> void:
if event.is_action_pressed("new_image"):
new_file()
Expand Down
Loading

0 comments on commit e65fa4d

Please sign in to comment.