mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-08-19 06:24:56 +00:00
Merge pull request #152 from FunkinCrew/feature/chart-note-snapping-ui
Improved UI for note snapping (and notif on difficulty change)
This commit is contained in:
commit
26501e59dd
|
@ -2043,37 +2043,14 @@ class ChartEditorState extends HaxeUIState
|
|||
if (shouldPause) stopAudioPlayback();
|
||||
}
|
||||
|
||||
function handleZoom():Void
|
||||
{
|
||||
if (FlxG.keys.justPressed.MINUS)
|
||||
{
|
||||
currentZoomLevel /= 2;
|
||||
|
||||
// Update the grid.
|
||||
ChartEditorThemeHandler.updateTheme(this);
|
||||
// Update the note positions.
|
||||
noteDisplayDirty = true;
|
||||
}
|
||||
|
||||
if (FlxG.keys.justPressed.PLUS)
|
||||
{
|
||||
currentZoomLevel *= 2;
|
||||
|
||||
// Update the grid.
|
||||
ChartEditorThemeHandler.updateTheme(this);
|
||||
// Update the note positions.
|
||||
noteDisplayDirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
function handleSnap():Void
|
||||
{
|
||||
if (FlxG.keys.justPressed.LEFT)
|
||||
if (FlxG.keys.justPressed.LEFT && !FlxG.keys.pressed.CONTROL)
|
||||
{
|
||||
noteSnapQuantIndex--;
|
||||
}
|
||||
|
||||
if (FlxG.keys.justPressed.RIGHT)
|
||||
if (FlxG.keys.justPressed.RIGHT && !FlxG.keys.pressed.CONTROL)
|
||||
{
|
||||
noteSnapQuantIndex++;
|
||||
}
|
||||
|
@ -2970,6 +2947,8 @@ class ChartEditorState extends HaxeUIState
|
|||
var songRemainingString:String = '-${songRemainingMinutes}:${songRemainingSeconds}';
|
||||
|
||||
setUIValue('playbarSongRemaining', songRemainingString);
|
||||
|
||||
setUIValue('playbarNoteSnap', '1/${noteSnapQuant}');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3180,6 +3159,16 @@ class ChartEditorState extends HaxeUIState
|
|||
refreshSongMetadataToolbox();
|
||||
}
|
||||
}
|
||||
|
||||
#if !mac
|
||||
NotificationManager.instance.addNotification(
|
||||
{
|
||||
title: 'Switch Difficulty',
|
||||
body: 'Switched difficulty to ${selectedDifficulty.toTitleCase()}',
|
||||
type: NotificationType.Success,
|
||||
expiryMs: ChartEditorState.NOTIFICATION_DISMISS_TIME
|
||||
});
|
||||
#end
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -132,7 +132,7 @@ class ChartEditorThemeHandler
|
|||
// 2 * (Strumline Size) + 1 grid squares wide, by (4 * quarter notes per measure) grid squares tall.
|
||||
// This gets reused to fill the screen.
|
||||
var gridWidth:Int = Std.int(ChartEditorState.GRID_SIZE * TOTAL_COLUMN_COUNT);
|
||||
var gridHeight:Int = Std.int(ChartEditorState.GRID_SIZE * Conductor.stepsPerMeasure * state.currentZoomLevel);
|
||||
var gridHeight:Int = Std.int(ChartEditorState.GRID_SIZE * Conductor.stepsPerMeasure);
|
||||
state.gridBitmap = FlxGridOverlay.createGrid(ChartEditorState.GRID_SIZE, ChartEditorState.GRID_SIZE, gridWidth, gridHeight, true, gridColor1, gridColor2);
|
||||
|
||||
// Selection borders
|
||||
|
|
Loading…
Reference in a new issue