mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-27 10:05:41 -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_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_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_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_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');
|
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;
|
var playtestStartTime:Bool = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If true, playtesting a chart will let you "gameover" / die when you lose ur health!
|
||||||
|
*/
|
||||||
|
var playtestPracticeMode:Bool = false;
|
||||||
|
|
||||||
// Visuals
|
// Visuals
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2496,9 +2502,6 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
||||||
menubarItemDifficultyUp.onClick = _ -> incrementDifficulty(1);
|
menubarItemDifficultyUp.onClick = _ -> incrementDifficulty(1);
|
||||||
menubarItemDifficultyDown.onClick = _ -> incrementDifficulty(-1);
|
menubarItemDifficultyDown.onClick = _ -> incrementDifficulty(-1);
|
||||||
|
|
||||||
menubarItemPlaytestStartTime.onChange = event -> playtestStartTime = event.value;
|
|
||||||
menubarItemPlaytestStartTime.selected = playtestStartTime;
|
|
||||||
|
|
||||||
menuBarItemThemeLight.onChange = function(event:UIEvent) {
|
menuBarItemThemeLight.onChange = function(event:UIEvent) {
|
||||||
if (event.target.value) currentTheme = ChartEditorTheme.Light;
|
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);
|
menubarItemToggleToolboxMetadata.onChange = event -> this.setToolboxState(CHART_EDITOR_TOOLBOX_METADATA_LAYOUT, event.value);
|
||||||
menubarItemToggleToolboxNotes.onChange = event -> this.setToolboxState(CHART_EDITOR_TOOLBOX_NOTEDATA_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);
|
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);
|
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);
|
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)
|
if (FlxG.mouse.justPressed)
|
||||||
{
|
{
|
||||||
// Just clicked to place a note.
|
// Just clicked to place a note.
|
||||||
if (overlapsGrid && !overlapsSelectionBorder)
|
if (!isCursorOverHaxeUI && overlapsGrid && !overlapsSelectionBorder)
|
||||||
{
|
{
|
||||||
// We clicked on the grid without moving the mouse.
|
// 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;
|
var isOrWillSelect = overlapsSelection || dragTargetNote != null || dragTargetEvent != null;
|
||||||
// Handle grid cursor.
|
// Handle grid cursor.
|
||||||
if (overlapsGrid && !isOrWillSelect && !overlapsSelectionBorder && !gridPlayheadScrollAreaPressed)
|
if (!isCursorOverHaxeUI && overlapsGrid && !isOrWillSelect && !overlapsSelectionBorder && !gridPlayheadScrollAreaPressed)
|
||||||
{
|
{
|
||||||
// Indicate that we can place a note here.
|
// Indicate that we can place a note here.
|
||||||
|
|
||||||
|
@ -4120,6 +4124,8 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (!isCursorOverHaxeUI)
|
||||||
{
|
{
|
||||||
if (notePreview != null && FlxG.mouse.overlaps(notePreview))
|
if (notePreview != null && FlxG.mouse.overlaps(notePreview))
|
||||||
{
|
{
|
||||||
|
@ -4141,6 +4147,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
||||||
{
|
{
|
||||||
targetCursorMode = Cell;
|
targetCursorMode = Cell;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (overlapsHealthIcons)
|
else if (overlapsHealthIcons)
|
||||||
{
|
{
|
||||||
targetCursorMode = Pointer;
|
targetCursorMode = Pointer;
|
||||||
|
@ -4760,7 +4767,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
||||||
targetDifficulty: selectedDifficulty,
|
targetDifficulty: selectedDifficulty,
|
||||||
// TODO: Add this.
|
// TODO: Add this.
|
||||||
// targetCharacter: targetCharacter,
|
// targetCharacter: targetCharacter,
|
||||||
practiceMode: true,
|
practiceMode: playtestPracticeMode,
|
||||||
minimalMode: minimal,
|
minimalMode: minimal,
|
||||||
startTimestamp: startTimestamp,
|
startTimestamp: startTimestamp,
|
||||||
overrideMusic: true,
|
overrideMusic: true,
|
||||||
|
|
|
@ -81,6 +81,8 @@ class ChartEditorToolboxHandler
|
||||||
onShowToolboxNoteData(state, toolbox);
|
onShowToolboxNoteData(state, toolbox);
|
||||||
case ChartEditorState.CHART_EDITOR_TOOLBOX_EVENTDATA_LAYOUT:
|
case ChartEditorState.CHART_EDITOR_TOOLBOX_EVENTDATA_LAYOUT:
|
||||||
onShowToolboxEventData(state, toolbox);
|
onShowToolboxEventData(state, toolbox);
|
||||||
|
case ChartEditorState.CHART_EDITOR_TOOLBOX_PLAYTEST_PROPERTIES_LAYOUT:
|
||||||
|
onShowToolboxPlaytestProperties(state, toolbox);
|
||||||
case ChartEditorState.CHART_EDITOR_TOOLBOX_DIFFICULTY_LAYOUT:
|
case ChartEditorState.CHART_EDITOR_TOOLBOX_DIFFICULTY_LAYOUT:
|
||||||
onShowToolboxDifficulty(state, toolbox);
|
onShowToolboxDifficulty(state, toolbox);
|
||||||
case ChartEditorState.CHART_EDITOR_TOOLBOX_METADATA_LAYOUT:
|
case ChartEditorState.CHART_EDITOR_TOOLBOX_METADATA_LAYOUT:
|
||||||
|
@ -119,6 +121,8 @@ class ChartEditorToolboxHandler
|
||||||
onHideToolboxNoteData(state, toolbox);
|
onHideToolboxNoteData(state, toolbox);
|
||||||
case ChartEditorState.CHART_EDITOR_TOOLBOX_EVENTDATA_LAYOUT:
|
case ChartEditorState.CHART_EDITOR_TOOLBOX_EVENTDATA_LAYOUT:
|
||||||
onHideToolboxEventData(state, toolbox);
|
onHideToolboxEventData(state, toolbox);
|
||||||
|
case ChartEditorState.CHART_EDITOR_TOOLBOX_PLAYTEST_PROPERTIES_LAYOUT:
|
||||||
|
onHideToolboxPlaytestProperties(state, toolbox);
|
||||||
case ChartEditorState.CHART_EDITOR_TOOLBOX_DIFFICULTY_LAYOUT:
|
case ChartEditorState.CHART_EDITOR_TOOLBOX_DIFFICULTY_LAYOUT:
|
||||||
onHideToolboxDifficulty(state, toolbox);
|
onHideToolboxDifficulty(state, toolbox);
|
||||||
case ChartEditorState.CHART_EDITOR_TOOLBOX_METADATA_LAYOUT:
|
case ChartEditorState.CHART_EDITOR_TOOLBOX_METADATA_LAYOUT:
|
||||||
|
@ -193,6 +197,8 @@ class ChartEditorToolboxHandler
|
||||||
toolbox = buildToolboxNoteDataLayout(state);
|
toolbox = buildToolboxNoteDataLayout(state);
|
||||||
case ChartEditorState.CHART_EDITOR_TOOLBOX_EVENTDATA_LAYOUT:
|
case ChartEditorState.CHART_EDITOR_TOOLBOX_EVENTDATA_LAYOUT:
|
||||||
toolbox = buildToolboxEventDataLayout(state);
|
toolbox = buildToolboxEventDataLayout(state);
|
||||||
|
case ChartEditorState.CHART_EDITOR_TOOLBOX_PLAYTEST_PROPERTIES_LAYOUT:
|
||||||
|
toolbox = buildToolboxPlaytestPropertiesLayout(state);
|
||||||
case ChartEditorState.CHART_EDITOR_TOOLBOX_DIFFICULTY_LAYOUT:
|
case ChartEditorState.CHART_EDITOR_TOOLBOX_DIFFICULTY_LAYOUT:
|
||||||
toolbox = buildToolboxDifficultyLayout(state);
|
toolbox = buildToolboxDifficultyLayout(state);
|
||||||
case ChartEditorState.CHART_EDITOR_TOOLBOX_METADATA_LAYOUT:
|
case ChartEditorState.CHART_EDITOR_TOOLBOX_METADATA_LAYOUT:
|
||||||
|
@ -351,8 +357,12 @@ class ChartEditorToolboxHandler
|
||||||
|
|
||||||
static function onShowToolboxEventData(state:ChartEditorState, toolbox:CollapsibleDialog):Void {}
|
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 onHideToolboxEventData(state:ChartEditorState, toolbox:CollapsibleDialog):Void {}
|
||||||
|
|
||||||
|
static function onHideToolboxPlaytestProperties(state:ChartEditorState, toolbox:CollapsibleDialog):Void {}
|
||||||
|
|
||||||
static function buildEventDataFormFromSchema(state:ChartEditorState, target:Box, schema:SongEventSchema):Void
|
static function buildEventDataFormFromSchema(state:ChartEditorState, target:Box, schema:SongEventSchema):Void
|
||||||
{
|
{
|
||||||
trace(schema);
|
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>
|
static function buildToolboxDifficultyLayout(state:ChartEditorState):Null<CollapsibleDialog>
|
||||||
{
|
{
|
||||||
var toolbox:CollapsibleDialog = cast RuntimeComponentBuilder.fromAsset(ChartEditorState.CHART_EDITOR_TOOLBOX_DIFFICULTY_LAYOUT);
|
var toolbox:CollapsibleDialog = cast RuntimeComponentBuilder.fromAsset(ChartEditorState.CHART_EDITOR_TOOLBOX_DIFFICULTY_LAYOUT);
|
||||||
|
|
Loading…
Reference in a new issue