diff --git a/src/editor/JulGameEditor/Components/CameraWindow.jl b/src/editor/JulGameEditor/Components/CameraWindow.jl index f9da779..97bb6a4 100644 --- a/src/editor/JulGameEditor/Components/CameraWindow.jl +++ b/src/editor/JulGameEditor/Components/CameraWindow.jl @@ -75,19 +75,6 @@ function show_camera_window(this::CameraWindow) CImGui.Text("Starting Coordinates: $(this.camera.startingCoordinates.x), $(this.camera.startingCoordinates.y)") - # Temporary Float32 storage - start_x32 = Float32(this.camera.startingCoordinates.x) - start_y32 = Float32(this.camera.startingCoordinates.y) - isEdited = @c CImGui.InputFloat("Starting Coordinates X", &start_x32, 1) - if isEdited - this.camera.startingCoordinates = Vector2f(Float64(start_x32), this.camera.startingCoordinates.y) - end - CImGui.SameLine() - isEdited = @c CImGui.InputFloat("Starting Coordinates Y", &start_y32, 1) - if isEdited - this.camera.startingCoordinates = Vector2f(this.camera.startingCoordinates.x, Float64(start_y32)) - end - # camera background color # CImGui.Text("Background Color:") # color_r = UInt8(this.camera.backgroundColor[1]) diff --git a/src/editor/JulGameEditor/Editor.jl b/src/editor/JulGameEditor/Editor.jl index c1383d7..f45db09 100644 --- a/src/editor/JulGameEditor/Editor.jl +++ b/src/editor/JulGameEditor/Editor.jl @@ -697,9 +697,13 @@ module Editor config = Dict{String, String}() if isfile(filename) open(filename, "r") do file - for line in eachline(file) - key, value = split(line, "=") - config[key] = value + try + for line in eachline(file) + key, value = split(line, "=") + config[key] = value + end + catch e + @warn e end end end diff --git a/src/engine/Entity.jl b/src/engine/Entity.jl index 86f5f94..f39eb5b 100644 --- a/src/engine/Entity.jl +++ b/src/engine/Entity.jl @@ -168,7 +168,7 @@ module EntityModule return end - this.shape = InternalShape(this::Entity, shape.color, shape.isFilled, shape.offset, shape.size; isWorldEntity = shape.isWorldEntity, position = shape.position, layer = shape.layer) + this.shape = InternalShape(this::Entity, shape.color, shape.isFilled, shape.offset, shape.size; isWorldEntity = shape.isWorldEntity, position = shape.position, layer = shape.layer, alpha = shape.alpha) return this.shape end diff --git a/src/engine/UI/ScreenButton.jl b/src/engine/UI/ScreenButton.jl index 3a5921f..da294d8 100644 --- a/src/engine/UI/ScreenButton.jl +++ b/src/engine/UI/ScreenButton.jl @@ -122,7 +122,7 @@ module ScreenButtonModule end @debug "Loading image from disk, there are $(length(JulGame.IMAGE_CACHE)) images in cache" - return CallSDLFunction(SDL2.IMG_Load, joinpath(fullPath)) + return CallSDLFunction(SDL2.IMG_Load, joinpath(fullPath, imagePath)) end function get_comma_separated_path(path::String) diff --git a/src/utils/Utils.jl b/src/utils/Utils.jl index a155178..1e66d00 100644 --- a/src/utils/Utils.jl +++ b/src/utils/Utils.jl @@ -5,7 +5,10 @@ function CallSDLFunction(func::Function, args...) # Call SDL function and check for errors ret = func(args...) if (isa(ret, Number) && ret < 0) || ret == C_NULL - @error "$(unsafe_string(SDL2.SDL_GetError()))" + @error "SDL Error: $(unsafe_string(SDL2.SDL_GetError())) + || with function $(func) + || with args $(args)" + Base.show_backtrace(stdout, catch_backtrace()) end