please check out all of these amazing sound effects of course

This commit is contained in:
Frakits
2025-07-25 18:35:16 +03:00
parent a9bc7c5ba9
commit 84985b93d4
7 changed files with 31 additions and 8 deletions
@@ -12,9 +12,10 @@ class CodenameBuildField extends TextField {
reload();
}
public function reload()
public function reload() {
text = '${Flags.VERSION_MESSAGE}';
#if debug
text += '\n${Flags.COMMIT_MESSAGE}';
#end
}
}
@@ -424,10 +424,12 @@ class CharacterAnimButton extends UIButton {
public function toggleGhost() {
if (valid && parent.ghosts.indexOf(anim) == -1) {
FlxG.sound.play(Paths.sound('editors/character/ghostEnable'));
parent.ghosts.push(anim);
ghostIcon.animation.play("alive", true);
ghostIcon.color = 0xFFFFFFFF;
} else {
FlxG.sound.play(Paths.sound('editors/character/ghostDisable'));
parent.ghosts.remove(anim);
ghostIcon.animation.play("dead", true);
ghostIcon.color = 0xFFADADAD;
@@ -99,6 +99,7 @@ class CharacterAnimsWindow extends UIButtonList<CharacterAnimButton> {
displayAnimsFramesList.remove(name);
public function deleteAnimation(button:CharacterAnimButton, addToUndo:Bool = true) {
FlxG.sound.play(Paths.sound('editors/delete'));
if (buttons.members.length <= 1) return;
if (character.getAnimName() == button.anim)
@:privateAccess CharacterEditor.instance._animation_down(null);
@@ -453,6 +453,7 @@ class CharacterEditor extends UIState {
function _file_save(_) {
#if sys
FlxG.sound.play(Paths.sound('editors/save'));
CoolUtil.safeSaveFile(
'${Paths.getAssetsRoot()}/data/characters/${character.curCharacter}.xml',
buildCharacter()
@@ -464,6 +465,7 @@ class CharacterEditor extends UIState {
}
function _file_saveas(_) {
FlxG.sound.play(Paths.sound('editors/save'));
openSubState(new SaveSubstate(buildCharacter(), {
defaultSaveFile: '${character.curCharacter}.xml'
}));
@@ -496,6 +498,7 @@ class CharacterEditor extends UIState {
}
function _undo(undo:CharacterEditorChange) {
FlxG.sound.play(Paths.sound('editors/undo'));
switch (undo) {
case null: // do nothing
case CCharEditPosition(oldPos, newPos):
@@ -566,6 +569,7 @@ class CharacterEditor extends UIState {
}
function _redo(redo:CharacterEditorChange) {
FlxG.sound.play(Paths.sound('editors/redo'));
switch (redo) {
case null: // do nothing
case CCharEditPosition(oldPos, newPos):
+17 -6
View File
@@ -210,7 +210,7 @@ class Charter extends UIState {
{
label: translate("edit.copy"),
keybind: [CONTROL, C],
onSelect: _edit_copy
onSelect: cast _edit_copy
},
{
label: translate("edit.paste"),
@@ -511,6 +511,7 @@ class Charter extends UIState {
strumlineLockButton = new CharterStrumlineButton("editors/charter/lock-strumline", translate("lock-unlock"));
strumlineLockButton.onClick = function () {
FlxG.sound.play(Paths.sound(!strumLines.draggable ? 'editors/charter/strumUnlock' : 'editors/charter/strumLock'));
if (strumLines != null) {
strumLines.draggable = !strumLines.draggable;
strumlineLockButton.textTweenColor.color = strumLines.draggable ? 0xFF5C95CA : 0xFFE16565;
@@ -1079,6 +1080,7 @@ class Charter extends UIState {
if (selected == null) return selected;
if (selected is CharterNote) {
FlxG.sound.play(Paths.sound('editors/charter/noteDelete'));
var note:CharterNote = cast selected;
note.strumLineID = strumLines.members.indexOf(note.strumLine);
note.strumLine = null; // For static undos :D
@@ -1472,6 +1474,7 @@ class Charter extends UIState {
public static function saveChart(shouldBuild:Bool = true, withEvents:Bool = true) {
#if sys
FlxG.sound.play(Paths.sound('editors/save'));
saveTo('${Paths.getAssetsRoot()}/songs/${__song.toLowerCase()}', !withEvents, shouldBuild);
if (undos != null) undos.save();
#else
@@ -1488,6 +1491,7 @@ class Charter extends UIState {
public static function saveEvents(shouldBuild:Bool = true) {
#if sys
FlxG.sound.play(Paths.sound('editors/save'));
if (shouldBuild && instance != null) instance.buildChart();
var data = {events: Chart.filterChartForSaving(PlayState.SONG, false, false, true).events};
@@ -1510,6 +1514,7 @@ class Charter extends UIState {
public static function saveMeta(shouldBuild:Bool = true) {
#if sys
FlxG.sound.play(Paths.sound('editors/save'));
if (shouldBuild && instance != null) instance.buildChart();
CoolUtil.safeSaveFile(
'${Paths.getAssetsRoot()}/songs/${__song.toLowerCase()}/meta.json',
@@ -1575,7 +1580,8 @@ class Charter extends UIState {
function _file_saveas_fnflegacy(_) saveLegacyChartAs();
function _file_saveas_psych(_) savePsychChartAs();
function _edit_copy(_) {
function _edit_copy(_, playSFX=true) {
if (playSFX) FlxG.sound.play(Paths.sound('editors/undo'));
if(selection.length == 0) return;
var minStep:Float = selection[0].step;
@@ -1594,6 +1600,7 @@ class Charter extends UIState {
];
}
function _edit_paste(_) {
FlxG.sound.play(Paths.sound('editors/paste'));
if (clipboard.length <= 0) return;
var minStep = curStep;
@@ -1613,7 +1620,7 @@ class Charter extends UIState {
}
}
selection = sObjects;
_edit_copy(_); // to fix stupid bugs
_edit_copy(_, false); // to fix stupid bugs
checkSelectionForBPMUpdates();
@@ -1621,13 +1628,15 @@ class Charter extends UIState {
}
function _edit_cut(_) {
FlxG.sound.play(Paths.sound('editors/cut'));
if (selection == null || selection.length == 0) return;
_edit_copy(_);
_edit_copy(_, false);
deleteSelection(selection, false);
}
function _edit_delete(_) {
FlxG.sound.play(Paths.sound('editors/delete'));
if (selection == null || selection.length == 0) return;
selection.loop((n:CharterNote) -> {
noteDeleteAnims.deleteNotes.push({note: n, time: noteDeleteAnims.deleteTime});
@@ -1636,6 +1645,7 @@ class Charter extends UIState {
}
function _undo(undo:CharterChange) {
FlxG.sound.play(Paths.sound('editors/undo'));
switch(undo) {
case null: // do nothing
case CDeleteStrumLine(strumLineID, strumLine):
@@ -1696,6 +1706,7 @@ class Charter extends UIState {
}
function _redo(redo:CharterChange) {
FlxG.sound.play(Paths.sound('editors/redo'));
switch(redo) {
case null: // do nothing
case CDeleteStrumLine(strumLineID, strumLine):
@@ -2040,8 +2051,8 @@ class Charter extends UIState {
inline function _snap_decreasesnap(_) changequant(-1);
inline function _snap_resetsnap(_) setquant(16);
inline function changequant(change:Int) {quant = quants[FlxMath.wrap(quants.indexOf(quant) + change, 0, quants.length-1)]; buildSnapsUI();};
inline function setquant(newQuant:Int) {quant = newQuant; buildSnapsUI();}
inline function changequant(change:Int) {FlxG.sound.play(Paths.sound('editors/charter/snappingChange')); quant = quants[FlxMath.wrap(quants.indexOf(quant) + change, 0, quants.length-1)]; buildSnapsUI();};
inline function setquant(newQuant:Int) {FlxG.sound.play(Paths.sound('editors/charter/snappingChange')); quant = newQuant; buildSnapsUI();}
function buildSnapsUI():Array<UIContextMenuOption> {
var snapsTopButton:UITopMenuButton = topMenuSpr == null ? null : cast topMenuSpr.members[snapIndex];
@@ -508,6 +508,7 @@ class StageEditor extends UIState {
function _file_save(_) {
#if sys
FlxG.sound.play(Paths.sound('editors/save'));
CoolUtil.safeSaveFile(
'${Paths.getAssetsRoot()}/data/stages/${__stage}.xml',
buildStage()
@@ -519,6 +520,7 @@ class StageEditor extends UIState {
}
function _file_saveas(_) {
FlxG.sound.play(Paths.sound('editors/save'));
openSubState(new SaveSubstate(buildStage(), {
defaultSaveFile: '${__stage}.xml'
}));
@@ -729,6 +731,7 @@ class StageEditor extends UIState {
}
function _edit_undo(_) {
FlxG.sound.play(Paths.sound('editors/undo'));
var undo = undos.undo();
switch(undo) {
case null:
@@ -754,6 +757,7 @@ class StageEditor extends UIState {
}
function _edit_redo(_) {
FlxG.sound.play(Paths.sound('editors/redo'));
var redo = undos.redo();
switch(redo) {
case null:
+1 -1
View File
@@ -18,7 +18,7 @@ class WarningState extends MusicBeatState {
disclaimer = new FunkinText(16, titleAlphabet.y + titleAlphabet.height + 10, FlxG.width - 32, "", 32);
disclaimer.alignment = CENTER;
disclaimer.text = "This is a warning state! Make a script #./data/states/WarningState.hx# to edit this text! \n\n Note: you can use asterisks or hashtags to highlight your text in red or yellow, or you can just make your own markup using postCreate (you have to change the text in create() to apply the default markup)";
disclaimer.text = "This is a warning state! Make a script #./data/states/WarningState.hx# to edit this text! \n\n Note: you can use *asterisks* or #hashtags# to highlight your text in *red* or #yellow#, or you can just make your own markup using postCreate (you have to change the text in create() to apply the default markup)";
super.create();