mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-26 15:07:14 +00:00
Merge remote-tracking branch 'origin/feature/chart-note-snapping-ui' into HEAD
This commit is contained in:
commit
1acce31123
|
@ -185,7 +185,6 @@ class ChartEditorState extends HaxeUIState
|
|||
* INSTANCE DATA
|
||||
*/
|
||||
// ==============================
|
||||
public var currentZoomLevel:Float = 1.0;
|
||||
|
||||
/**
|
||||
* The internal index of what note snapping value is in use.
|
||||
|
@ -1789,7 +1788,6 @@ class ChartEditorState extends HaxeUIState
|
|||
|
||||
// These ones only happen if the modal dialog is not open.
|
||||
handleScrollKeybinds();
|
||||
// handleZoom();
|
||||
handleSnap();
|
||||
handleCursor();
|
||||
|
||||
|
@ -2020,32 +2018,9 @@ 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 !mac
|
||||
|
@ -2059,7 +2034,7 @@ class ChartEditorState extends HaxeUIState
|
|||
#end
|
||||
}
|
||||
|
||||
if (FlxG.keys.justPressed.RIGHT)
|
||||
if (FlxG.keys.justPressed.RIGHT && !FlxG.keys.pressed.CONTROL)
|
||||
{
|
||||
noteSnapQuantIndex++;
|
||||
#if !mac
|
||||
|
@ -2934,6 +2909,8 @@ class ChartEditorState extends HaxeUIState
|
|||
var songRemainingString:String = '-${songRemainingMinutes}:${songRemainingSeconds}';
|
||||
|
||||
setUIValue('playbarSongRemaining', songRemainingString);
|
||||
|
||||
setUIValue('playbarNoteSnap', '1/${noteSnapQuant}');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3144,6 +3121,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