Skip to content

Commit bff84ae

Browse files
committed
Camera window, sound source constructor, delete frame
1 parent 9a5d813 commit bff84ae

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/editor/JulGameEditor/Components/ComponentInputs.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ function show_animator_properties(animator, animation_window_dict, animator_prev
240240
show_image_with_hover_preview(sprite.texture, sprite.size.x, sprite.size.y, animations[i].frames[k])
241241
end
242242
if CImGui.TreeNode("frame $(k)")
243+
CImGui.Button("Delete") && (deleteat!(animations[i].frames, k); break;)
243244
if animator.parent.sprite != C_NULL && animator.parent.sprite !== nothing
244245

245246
points = Ref(Vector{ImVec2}([ImVec2(anim_x, anim_y), ImVec2(anim_x + anim_w, anim_y + anim_h)]))
@@ -636,4 +637,4 @@ end
636637

637638
function scriptObj(name::String, fields::Array)
638639
() -> (name; fields)
639-
end
640+
end

src/editor/JulGameEditor/Editor.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,7 @@ module Editor
512512
if currentSceneMain !== nothing
513513
if currentSceneMain.scene.camera != gameCamera
514514
gameCamera = currentSceneMain.scene.camera
515+
cameraWindow.camera = gameCamera
515516
end
516517

517518
if JulGame.InputModule.get_button_held_down(currentSceneMain.input, "LCTRL") && JulGame.InputModule.get_button_pressed(currentSceneMain.input, "S")

src/engine/Component/SoundSource.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module SoundSourceModule
2222
volume::Int32
2323

2424
# Music
25-
function InternalSoundSource(parent::Any, path::String, channel::Int32, volume::Int32, isMusic::Bool, playOnStart::Bool = false)
25+
function InternalSoundSource(parent::Any, path::String, channel::Int32 = Int32(-1), volume::Int32 = Int32(-1), isMusic::Bool = false, playOnStart::Bool = false)
2626
this = new()
2727

2828
SDL2.SDL_ClearError()

0 commit comments

Comments
 (0)