mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-27 01:55:52 -05:00
Merge branch 'rewrite/master' of github.com:FunkinCrew/Funkin-secret into icon-charswitcher
This commit is contained in:
commit
028e90474c
3 changed files with 75 additions and 25 deletions
2
assets
2
assets
|
@ -1 +1 @@
|
|||
Subproject commit e591e9acc12b9aba6124332c4d66453f1f83368c
|
||||
Subproject commit 7d59681870d2b73417a9f5b553720e8b7120bbde
|
|
@ -145,6 +145,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
|||
public static final CHART_EDITOR_TOOLBOX_NOTEDATA_LAYOUT:String = Paths.ui('chart-editor/toolbox/notedata');
|
||||
|
||||
public static final CHART_EDITOR_TOOLBOX_EVENTDATA_LAYOUT:String = Paths.ui('chart-editor/toolbox/eventdata');
|
||||
public static final CHART_EDITOR_TOOLBOX_PLAYTEST_PROPERTIES_LAYOUT:String = Paths.ui('chart-editor/toolbox/playtest-properties');
|
||||
public static final CHART_EDITOR_TOOLBOX_METADATA_LAYOUT:String = Paths.ui('chart-editor/toolbox/metadata');
|
||||
public static final CHART_EDITOR_TOOLBOX_DIFFICULTY_LAYOUT:String = Paths.ui('chart-editor/toolbox/difficulty');
|
||||
public static final CHART_EDITOR_TOOLBOX_PLAYER_PREVIEW_LAYOUT:String = Paths.ui('chart-editor/toolbox/player-preview');
|
||||
|
@ -522,6 +523,11 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
|||
*/
|
||||
var playtestStartTime:Bool = false;
|
||||
|
||||
/**
|
||||
* If true, playtesting a chart will let you "gameover" / die when you lose ur health!
|
||||
*/
|
||||
var playtestPracticeMode:Bool = false;
|
||||
|
||||
// Visuals
|
||||
|
||||
/**
|
||||
|
@ -2496,9 +2502,6 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
|||
menubarItemDifficultyUp.onClick = _ -> incrementDifficulty(1);
|
||||
menubarItemDifficultyDown.onClick = _ -> incrementDifficulty(-1);
|
||||
|
||||
menubarItemPlaytestStartTime.onChange = event -> playtestStartTime = event.value;
|
||||
menubarItemPlaytestStartTime.selected = playtestStartTime;
|
||||
|
||||
menuBarItemThemeLight.onChange = function(event:UIEvent) {
|
||||
if (event.target.value) currentTheme = ChartEditorTheme.Light;
|
||||
};
|
||||
|
@ -2565,6 +2568,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
|||
menubarItemToggleToolboxMetadata.onChange = event -> this.setToolboxState(CHART_EDITOR_TOOLBOX_METADATA_LAYOUT, event.value);
|
||||
menubarItemToggleToolboxNotes.onChange = event -> this.setToolboxState(CHART_EDITOR_TOOLBOX_NOTEDATA_LAYOUT, event.value);
|
||||
menubarItemToggleToolboxEvents.onChange = event -> this.setToolboxState(CHART_EDITOR_TOOLBOX_EVENTDATA_LAYOUT, event.value);
|
||||
menubarItemToggleToolboxPlaytestProperties.onChange = event -> this.setToolboxState(CHART_EDITOR_TOOLBOX_PLAYTEST_PROPERTIES_LAYOUT, event.value);
|
||||
menubarItemToggleToolboxPlayerPreview.onChange = event -> this.setToolboxState(CHART_EDITOR_TOOLBOX_PLAYER_PREVIEW_LAYOUT, event.value);
|
||||
menubarItemToggleToolboxOpponentPreview.onChange = event -> this.setToolboxState(CHART_EDITOR_TOOLBOX_OPPONENT_PREVIEW_LAYOUT, event.value);
|
||||
|
||||
|
@ -3905,7 +3909,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
|||
if (FlxG.mouse.justPressed)
|
||||
{
|
||||
// Just clicked to place a note.
|
||||
if (overlapsGrid && !overlapsSelectionBorder)
|
||||
if (!isCursorOverHaxeUI && overlapsGrid && !overlapsSelectionBorder)
|
||||
{
|
||||
// We clicked on the grid without moving the mouse.
|
||||
|
||||
|
@ -4050,7 +4054,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
|||
|
||||
var isOrWillSelect = overlapsSelection || dragTargetNote != null || dragTargetEvent != null;
|
||||
// Handle grid cursor.
|
||||
if (overlapsGrid && !isOrWillSelect && !overlapsSelectionBorder && !gridPlayheadScrollAreaPressed)
|
||||
if (!isCursorOverHaxeUI && overlapsGrid && !isOrWillSelect && !overlapsSelectionBorder && !gridPlayheadScrollAreaPressed)
|
||||
{
|
||||
// Indicate that we can place a note here.
|
||||
|
||||
|
@ -4121,25 +4125,28 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
|||
}
|
||||
else
|
||||
{
|
||||
if (notePreview != null && FlxG.mouse.overlaps(notePreview))
|
||||
if (!isCursorOverHaxeUI)
|
||||
{
|
||||
targetCursorMode = Pointer;
|
||||
}
|
||||
else if (gridPlayheadScrollArea != null && FlxG.mouse.overlaps(gridPlayheadScrollArea))
|
||||
{
|
||||
targetCursorMode = Pointer;
|
||||
}
|
||||
else if (overlapsSelection)
|
||||
{
|
||||
targetCursorMode = Pointer;
|
||||
}
|
||||
else if (overlapsSelectionBorder)
|
||||
{
|
||||
targetCursorMode = Crosshair;
|
||||
}
|
||||
else if (overlapsGrid)
|
||||
{
|
||||
targetCursorMode = Cell;
|
||||
if (notePreview != null && FlxG.mouse.overlaps(notePreview))
|
||||
{
|
||||
targetCursorMode = Pointer;
|
||||
}
|
||||
else if (gridPlayheadScrollArea != null && FlxG.mouse.overlaps(gridPlayheadScrollArea))
|
||||
{
|
||||
targetCursorMode = Pointer;
|
||||
}
|
||||
else if (overlapsSelection)
|
||||
{
|
||||
targetCursorMode = Pointer;
|
||||
}
|
||||
else if (overlapsSelectionBorder)
|
||||
{
|
||||
targetCursorMode = Crosshair;
|
||||
}
|
||||
else if (overlapsGrid)
|
||||
{
|
||||
targetCursorMode = Cell;
|
||||
}
|
||||
}
|
||||
else if (overlapsHealthIcons)
|
||||
{
|
||||
|
@ -4760,7 +4767,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
|||
targetDifficulty: selectedDifficulty,
|
||||
// TODO: Add this.
|
||||
// targetCharacter: targetCharacter,
|
||||
practiceMode: true,
|
||||
practiceMode: playtestPracticeMode,
|
||||
minimalMode: minimal,
|
||||
startTimestamp: startTimestamp,
|
||||
overrideMusic: true,
|
||||
|
|
|
@ -81,6 +81,8 @@ class ChartEditorToolboxHandler
|
|||
onShowToolboxNoteData(state, toolbox);
|
||||
case ChartEditorState.CHART_EDITOR_TOOLBOX_EVENTDATA_LAYOUT:
|
||||
onShowToolboxEventData(state, toolbox);
|
||||
case ChartEditorState.CHART_EDITOR_TOOLBOX_PLAYTEST_PROPERTIES_LAYOUT:
|
||||
onShowToolboxPlaytestProperties(state, toolbox);
|
||||
case ChartEditorState.CHART_EDITOR_TOOLBOX_DIFFICULTY_LAYOUT:
|
||||
onShowToolboxDifficulty(state, toolbox);
|
||||
case ChartEditorState.CHART_EDITOR_TOOLBOX_METADATA_LAYOUT:
|
||||
|
@ -119,6 +121,8 @@ class ChartEditorToolboxHandler
|
|||
onHideToolboxNoteData(state, toolbox);
|
||||
case ChartEditorState.CHART_EDITOR_TOOLBOX_EVENTDATA_LAYOUT:
|
||||
onHideToolboxEventData(state, toolbox);
|
||||
case ChartEditorState.CHART_EDITOR_TOOLBOX_PLAYTEST_PROPERTIES_LAYOUT:
|
||||
onHideToolboxPlaytestProperties(state, toolbox);
|
||||
case ChartEditorState.CHART_EDITOR_TOOLBOX_DIFFICULTY_LAYOUT:
|
||||
onHideToolboxDifficulty(state, toolbox);
|
||||
case ChartEditorState.CHART_EDITOR_TOOLBOX_METADATA_LAYOUT:
|
||||
|
@ -193,6 +197,8 @@ class ChartEditorToolboxHandler
|
|||
toolbox = buildToolboxNoteDataLayout(state);
|
||||
case ChartEditorState.CHART_EDITOR_TOOLBOX_EVENTDATA_LAYOUT:
|
||||
toolbox = buildToolboxEventDataLayout(state);
|
||||
case ChartEditorState.CHART_EDITOR_TOOLBOX_PLAYTEST_PROPERTIES_LAYOUT:
|
||||
toolbox = buildToolboxPlaytestPropertiesLayout(state);
|
||||
case ChartEditorState.CHART_EDITOR_TOOLBOX_DIFFICULTY_LAYOUT:
|
||||
toolbox = buildToolboxDifficultyLayout(state);
|
||||
case ChartEditorState.CHART_EDITOR_TOOLBOX_METADATA_LAYOUT:
|
||||
|
@ -351,8 +357,12 @@ class ChartEditorToolboxHandler
|
|||
|
||||
static function onShowToolboxEventData(state:ChartEditorState, toolbox:CollapsibleDialog):Void {}
|
||||
|
||||
static function onShowToolboxPlaytestProperties(state:ChartEditorState, toolbox:CollapsibleDialog):Void {}
|
||||
|
||||
static function onHideToolboxEventData(state:ChartEditorState, toolbox:CollapsibleDialog):Void {}
|
||||
|
||||
static function onHideToolboxPlaytestProperties(state:ChartEditorState, toolbox:CollapsibleDialog):Void {}
|
||||
|
||||
static function buildEventDataFormFromSchema(state:ChartEditorState, target:Box, schema:SongEventSchema):Void
|
||||
{
|
||||
trace(schema);
|
||||
|
@ -448,6 +458,39 @@ class ChartEditorToolboxHandler
|
|||
}
|
||||
}
|
||||
|
||||
static function buildToolboxPlaytestPropertiesLayout(state:ChartEditorState):Null<CollapsibleDialog>
|
||||
{
|
||||
// fill with playtest properties
|
||||
var toolbox:CollapsibleDialog = cast RuntimeComponentBuilder.fromAsset(ChartEditorState.CHART_EDITOR_TOOLBOX_PLAYTEST_PROPERTIES_LAYOUT);
|
||||
|
||||
if (toolbox == null) return null;
|
||||
|
||||
toolbox.onDialogClosed = function(_) {
|
||||
state.menubarItemToggleToolboxPlaytestProperties.selected = false;
|
||||
}
|
||||
|
||||
var checkboxPracticeMode:Null<CheckBox> = toolbox.findComponent('practiceModeCheckbox', CheckBox);
|
||||
if (checkboxPracticeMode == null) throw 'ChartEditorToolboxHandler.buildToolboxPlaytestPropertiesLayout() - Could not find practiceModeCheckbox component.';
|
||||
|
||||
checkboxPracticeMode.selected = state.playtestPracticeMode;
|
||||
|
||||
checkboxPracticeMode.onClick = _ -> {
|
||||
state.playtestPracticeMode = checkboxPracticeMode.selected;
|
||||
};
|
||||
|
||||
var checkboxStartTime:Null<CheckBox> = toolbox.findComponent('playtestStartTimeCheckbox', CheckBox);
|
||||
if (checkboxStartTime == null)
|
||||
throw 'ChartEditorToolboxHandler.buildToolboxPlaytestPropertiesLayout() - Could not find playtestStartTimeCheckbox component.';
|
||||
|
||||
checkboxStartTime.selected = state.playtestStartTime;
|
||||
|
||||
checkboxStartTime.onClick = _ -> {
|
||||
state.playtestStartTime = checkboxStartTime.selected;
|
||||
};
|
||||
|
||||
return toolbox;
|
||||
}
|
||||
|
||||
static function buildToolboxDifficultyLayout(state:ChartEditorState):Null<CollapsibleDialog>
|
||||
{
|
||||
var toolbox:CollapsibleDialog = cast RuntimeComponentBuilder.fromAsset(ChartEditorState.CHART_EDITOR_TOOLBOX_DIFFICULTY_LAYOUT);
|
||||
|
|
Loading…
Reference in a new issue