i forgot what i added

This commit is contained in:
lunarcleint
2023-09-09 20:31:12 -07:00
parent 68810795a8
commit 6774061fca
5 changed files with 14 additions and 11 deletions
+1 -1
View File
@@ -616,7 +616,7 @@ class Charter extends UIState {
} else {
if (mouseOnGrid && mousePos.y > 0 && mousePos.y < (__endStep)*40) {
var note = new CharterNote();
note.updatePos(FlxMath.bound(FlxG.keys.pressed.SHIFT ? (mousePos.y / 40) : Math.floor(mousePos.y / 40), 0, __endStep-1), id % 4, 0, 0, strumLines.members[Std.int(id/4)]);
note.updatePos(FlxMath.bound(FlxG.keys.pressed.SHIFT ? ((mousePos.y-20) / 40) : Math.floor(mousePos.y / 40), 0, __endStep-1), id % 4, 0, 0, strumLines.members[Std.int(id/4)]);
notesGroup.add(note);
selection = [note];
undos.addToUndo(CCreateSelection([note]));
@@ -62,7 +62,7 @@ class CharterEventScreen extends UISubstateWindow {
paramsPanel = new FlxGroup();
add(paramsPanel);
saveButton = new UIButton(windowSpr.x + windowSpr.bWidth - 10, windowSpr.y + windowSpr.bHeight - 10, "Save & Close", function() {
saveButton = new UIButton(windowSpr.x + windowSpr.bWidth - 20, windowSpr.y + windowSpr.bHeight - 16 - 32, "Save & Close", function() {
saveCurTab();
chartEvent.refreshEventIcons();
@@ -88,7 +88,6 @@ class CharterEventScreen extends UISubstateWindow {
Charter.instance.updateBPMEvents();
});
saveButton.x -= saveButton.bWidth;
saveButton.y -= saveButton.bHeight;
add(saveButton);
closeButton = new UIButton(saveButton.x - 10, saveButton.y, "Close", ()->close());
+1 -1
View File
@@ -162,7 +162,7 @@ class CharterNote extends UISprite implements ICharterSelectable {
public override function draw() {
if (snappedToStrumline)
x = (strumLine != null ? strumLine.button.x : 0) + (id % 4) * 40;
x = (strumLine != null ? strumLine.x : 0) + (id % 4) * 40;
drawMembers();
drawSuper();
@@ -51,6 +51,9 @@ class CharterStrumline extends UISprite {
members.push(button);
}
private var __healthYOffset:Float = 0;
private var __draggingYOffset:Float = 0;
public override function update(elapsed:Float) {
if (FlxG.keys.justPressed.K) draggable = !draggable;
if (healthIcon != null) {
@@ -58,20 +61,21 @@ class CharterStrumline extends UISprite {
healthIcon.scale.set(healthScale, healthScale);
healthIcon.updateHitbox();
healthIcon.follow(this, ((40 * 4) - healthIcon.width) / 2, FlxMath.lerp(healthIcon.y - y, draggable ? 29 : 7, 1/20));
healthIcon.follow(this, ((40 * 4) - healthIcon.width) / 2, 7 + (__healthYOffset = FlxMath.lerp(__healthYOffset, draggable ? 22 : 0, 1/20)));
}
draggingSprite.selectable = draggable;
UIState.state.updateSpriteRect(draggingSprite);
var dragScale:Float = FlxMath.lerp(draggingSprite.scale.x, draggable ? 1 : 0.8, 1/16);
draggingSprite.scale.set(dragScale, dragScale);
draggingSprite.updateHitbox();
draggingSprite.follow(this, (160/2) - (draggingSprite.width/2), FlxMath.lerp(draggingSprite.y - y, draggable ? 9 : 6, 1/12));
draggingSprite.alpha = FlxMath.lerp(draggingSprite.alpha, draggable ? 0.4 : 0, 1/12);
draggingSprite.follow(this, (160/2) - (draggingSprite.width/2), 6 + (__draggingYOffset = FlxMath.lerp(__draggingYOffset, draggable ? 3 : 0, 1/12)));
var fullAlpha:Float = UIState.state.isOverlapping(draggingSprite, @:privateAccess draggingSprite.__rect) ? 0.8 : 0.35;
draggingSprite.alpha = FlxMath.lerp(draggingSprite.alpha, draggable ? fullAlpha : 0, 1/12);
button.follow(this, 0, 95);
draggingSprite.selectable = draggable;
UIState.state.updateSpriteRect(draggingSprite);
super.update(elapsed);
}
@@ -127,7 +127,7 @@ class CharterStrumlineScreen extends UISubstateWindow {
}, 125);
add(saveButton);
closeButton = new UIButton(saveButton.x - 20, saveButton.y, creatingStrumLine ? "Cancel" : "Close", function() {
closeButton = new UIButton(saveButton.x - 20 - saveButton.bWidth, saveButton.y, creatingStrumLine ? "Cancel" : "Close", function() {
if (creatingStrumLine && onSave != null) onSave(null);
close();
}, 125);