From 8424e9c998e3ee2c323f0152e5f8c011159b8599 Mon Sep 17 00:00:00 2001 From: Kolziak Date: Sat, 26 Jul 2025 13:15:18 +0200 Subject: [PATCH 1/3] keybinds for cameras --- assets/languages/en/Editors.xml | 2 ++ assets/languages/pl/Editors.xml | 4 ++- source/funkin/editors/charter/Charter.hx | 39 ++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 1 deletion(-) diff --git a/assets/languages/en/Editors.xml b/assets/languages/en/Editors.xml index 86ca86ac..3fe1239c 100644 --- a/assets/languages/en/Editors.xml +++ b/assets/languages/en/Editors.xml @@ -225,6 +225,8 @@ Go back to the start Go forward to the end + Add camera on Opponent + Add camera on Player Mute instrumental Mute voices diff --git a/assets/languages/pl/Editors.xml b/assets/languages/pl/Editors.xml index 2e306386..d41bd2cf 100644 --- a/assets/languages/pl/Editors.xml +++ b/assets/languages/pl/Editors.xml @@ -2,7 +2,7 @@ Autozapisywanie za {0} sekund{1} - ((Anulowane)! + (Anulowane)! Ok Anuluj @@ -225,6 +225,8 @@ Wróć do początku Idź do końca + Dodaj kamerę na Oponenta + Dodaj kamerę na Gracza Wycisz Instrumental Wycisz Wokale diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index 84d1dd57..244a784c 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -1853,6 +1853,34 @@ class Charter extends UIState { return bookmarks; } + function _opponent_camera_add(_) { + var __event:CharterEvent = null; + + __event = new CharterEvent(curStepFloat, [{ + name: "Camera Movement", + params:[0], + time: Conductor.getTimeForStep(curStepFloat) + }], true); + __event.refreshEventIcons(); + __event.global = true; + rightEventsGroup.add(__event); + undos.addToUndo(CEditEvent(__event, [], __event.events)); + + } + function _player_camera_add(_) { + var __event:CharterEvent = null; + + __event = new CharterEvent(curStepFloat, [{ + name: "Camera Movement", + params:[1], + time: Conductor.getTimeForStep(curStepFloat) + }], true); + __event.refreshEventIcons(); + rightEventsGroup.add(__event); + undos.addToUndo(CEditEvent(__event, [], __event.events)); + + } + function _bookmarks_add(_) { var addBookmarkAt = function(name:String, color:FlxColor, daStep:Float) { @@ -1965,6 +1993,17 @@ class Charter extends UIState { onSelect: _song_end }, null, + { + label: translate("song.addOpponentCamera"), + keybind: [Q], + onSelect: _opponent_camera_add + }, + { + label: translate("song.addPlayerCamera"), + keybind: [E], + onSelect: _player_camera_add + }, + null, { label: translate("bookmarks.addBookmarkHere"), onSelect: _bookmarks_add From c936fa7f45b4981d91af13dc35553b19b709cd7b Mon Sep 17 00:00:00 2001 From: Kolze <53307233+KolzeYT@users.noreply.github.com> Date: Sun, 27 Jul 2025 23:10:16 +0200 Subject: [PATCH 2/3] fixed event icons not updating after changing the character --- source/funkin/editors/charter/CharterStrumlineScreen.hx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/funkin/editors/charter/CharterStrumlineScreen.hx b/source/funkin/editors/charter/CharterStrumlineScreen.hx index e4b1b318..ce7aaad9 100644 --- a/source/funkin/editors/charter/CharterStrumlineScreen.hx +++ b/source/funkin/editors/charter/CharterStrumlineScreen.hx @@ -144,6 +144,9 @@ class CharterStrumlineScreen extends UISubstateWindow { saveButton = new UIButton(windowSpr.x + windowSpr.bWidth - 20 - 125, windowSpr.y + windowSpr.bHeight - 16 - 32, TU.translate("editor.saveClose"), function() { saveStrumline(); + for (grp in [Charter.instance.leftEventsGroup, Charter.instance.rightEventsGroup]) { + for (e in grp.members) e.refreshEventIcons(); + } close(); }, 125); add(saveButton); @@ -284,4 +287,4 @@ class CharacterButton extends UIButton { super.update(elapsed); } -} \ No newline at end of file +} From 756026745b116a4db58d4a40ddfe312b56e3fa51 Mon Sep 17 00:00:00 2001 From: Kolziak Date: Sun, 27 Jul 2025 23:11:11 +0200 Subject: [PATCH 3/3] Revert "fixed event icons not updating after changing the character" This reverts commit c936fa7f45b4981d91af13dc35553b19b709cd7b. --- source/funkin/editors/charter/CharterStrumlineScreen.hx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/source/funkin/editors/charter/CharterStrumlineScreen.hx b/source/funkin/editors/charter/CharterStrumlineScreen.hx index ce7aaad9..e4b1b318 100644 --- a/source/funkin/editors/charter/CharterStrumlineScreen.hx +++ b/source/funkin/editors/charter/CharterStrumlineScreen.hx @@ -144,9 +144,6 @@ class CharterStrumlineScreen extends UISubstateWindow { saveButton = new UIButton(windowSpr.x + windowSpr.bWidth - 20 - 125, windowSpr.y + windowSpr.bHeight - 16 - 32, TU.translate("editor.saveClose"), function() { saveStrumline(); - for (grp in [Charter.instance.leftEventsGroup, Charter.instance.rightEventsGroup]) { - for (e in grp.members) e.refreshEventIcons(); - } close(); }, 125); add(saveButton); @@ -287,4 +284,4 @@ class CharacterButton extends UIButton { super.update(elapsed); } -} +} \ No newline at end of file