hi can someone test making events i can't use cne anymore

This commit is contained in:
Frakits
2025-07-24 21:19:40 +03:00
parent 848092a37e
commit ad8b6a9dad
6 changed files with 29 additions and 7 deletions
+7 -3
View File
@@ -1017,7 +1017,6 @@ class Charter extends UIState {
if (FlxG.mouse.justReleasedRight) {
if (deletedNotes.length > 0) {
undos.addToUndo(CDeleteSelection(deletedNotes.copy()));
FlxG.sound.play(Paths.sound('editors/charter/noteDelete'));
}
else if (noteDeleteAnims.garbageIcon.alpha <= .5) {
var mousePos = FlxG.mouse.getScreenPosition(uiCamera);
@@ -1540,6 +1539,7 @@ class Charter extends UIState {
}
public static function saveAs(data:Dynamic, ?replacer:(key:Dynamic, value:Dynamic) -> Dynamic, ?space:String, ?options:SaveSubstate.SaveSubstateData, ?saveOptions:Map<String, Bool>, shouldBuild:Bool = true) {
FlxG.sound.play(Paths.sound('editors/save'));
if (shouldBuild && instance != null) instance.buildChart();
var cur = FlxG.state;
while(true) {
@@ -2076,11 +2076,15 @@ class Charter extends UIState {
return newChilds;
}
inline function _note_addsustain(t)
inline function _note_addsustain(t) {
FlxG.sound.play(Paths.sound('editors/charter/sustainAdd'));
changeNoteSustain(1);
}
inline function _note_subtractsustain(t)
inline function _note_subtractsustain(t) {
FlxG.sound.play(Paths.sound('editors/charter/sustainDelete'));
changeNoteSustain(-1);
}
function _note_selectall(_) {
selection = cast notesGroup.members.copy();
@@ -29,8 +29,14 @@ class CharterEventAdd extends UISliceSprite {
if (FlxG.mouse.justReleased && FlxG.state.subState == null) {
if (curCharterEvent != null)
Charter.instance.openSubState(new CharterEventScreenNew(curCharterEvent));
else
Charter.instance.openSubState(new CharterEventScreen(step, global));
else {
var chartEvent = new CharterEvent(step, [], global);
chartEvent.events = [];
chartEvent.global = global;
Charter.instance.createSelection([chartEvent]);
Charter.instance.openSubState(new CharterEventScreenNew(chartEvent));
}
}
}
+4 -1
View File
@@ -28,7 +28,10 @@ class UIButton extends UISliceSprite {
public override function onHovered() {
super.onHovered();
if (FlxG.mouse.justPressed) hasBeenPressed = true;
if (FlxG.mouse.justPressed) {
hasBeenPressed = true;
FlxG.sound.play(Paths.sound('editors/buttonClick'));
}
if (FlxG.mouse.justReleased && callback != null && shouldPress && hasBeenPressed) {
callback();
hasBeenPressed = false;
+5
View File
@@ -105,6 +105,10 @@ class UIState extends MusicBeatState {
buttonHandler = null;
}
if (FlxG.mouse.justPressed) {
FlxG.sound.play(Paths.sound('editors/click'));
}
if (FlxG.mouse.justReleased)
currentFocus = (hoveredSprite is IUIFocusable) ? (cast hoveredSprite) : null;
@@ -150,6 +154,7 @@ class UIState extends MusicBeatState {
}
public function openContextMenu(options:Array<UIContextMenuOption>, ?callback:UIContextMenuCallback, ?x:Float, ?y:Float, ?w:Int) {
FlxG.sound.play(Paths.sound('editors/windowAppear'));
var state = FlxG.state;
while(state.subState != null && !(state._requestSubStateReset && state._requestedSubState == null))
state = state.subState;
+4 -1
View File
@@ -110,6 +110,7 @@ class UITextBox extends UISliceSprite implements IUIFocusable {
case RIGHT:
changeSelection(1);
case BACKSPACE:
FlxG.sound.play(Paths.sound('editors/textRemove'));
if (position > 0) {
label.text = label.text.substr(0, position-1) + label.text.substr(position);
changeSelection(-1);
@@ -119,6 +120,7 @@ class UITextBox extends UISliceSprite implements IUIFocusable {
case END:
position = label.text.length;
case V:
FlxG.sound.play(Paths.sound('editors/textType'));
// Hey lj here, fixed copying because before we checked if the modifier was left or right ctrl
// but somehow it gave a int outside of the KeyModifier's range :sob:
// apparently there is a boolean that just checks for you. yw :D
@@ -129,13 +131,14 @@ class UITextBox extends UISliceSprite implements IUIFocusable {
var data:String = Clipboard.generalClipboard.getData(TEXT_FORMAT);
if (data != null) onTextInput(data);
case C:
FlxG.sound.play(Paths.sound('editors/textType'));
// if we are not holding ctrl, ignore
if (!modifier.ctrlKey) return;
// copying
Clipboard.generalClipboard.setData(TEXT_FORMAT, label.text);
default:
// nothing
FlxG.sound.play(Paths.sound('editors/textType'));
}
}
+1
View File
@@ -15,6 +15,7 @@ class UIWindow extends UISliceSprite {
content = new FlxTypedGroup<FlxBasic>();
members.push(content);
FlxG.sound.play(Paths.sound('editors/windowAppear'));
}
public override function update(elapsed:Float) {