Finish update
|
Before Width: | Height: | Size: 652 B After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 652 B After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 737 B After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 8.6 KiB |
@@ -27,13 +27,8 @@ class CharacterSelection extends EditorTreeMenu
|
||||
];
|
||||
|
||||
list.insert(0, new NewOption("New Character", "New Character", function() {
|
||||
openSubState(new UIWarningSubstate("New Character", "This feature isnt implemented yet", [
|
||||
{
|
||||
label: "OK",
|
||||
onClick: function(t) {
|
||||
|
||||
}
|
||||
}
|
||||
openSubState(new UIWarningSubstate("New Character: Feature Not Implemented!", "This feature isnt implemented yet. Please wait for more cne updates to have this functional.\n\n\n- Codename Devs", [
|
||||
{label: "Ok", color: 0xFFFF0000, onClick: function(t) {}}
|
||||
]));
|
||||
}));
|
||||
|
||||
|
||||
@@ -53,8 +53,8 @@ class Charter extends UIState {
|
||||
public var gridBackdropDummy:CharterBackdropDummy;
|
||||
|
||||
public var strumlineInfoBG:FlxSprite;
|
||||
public var strumlineAddButton:CharterStrumlineExtraButton;
|
||||
public var strumlineLockButton:CharterStrumlineExtraButton;
|
||||
public var strumlineAddButton:CharterStrumlineButton;
|
||||
public var strumlineLockButton:CharterStrumlineButton;
|
||||
|
||||
public var hitsound:FlxSound;
|
||||
public var metronome:FlxSound;
|
||||
@@ -378,10 +378,10 @@ class Charter extends UIState {
|
||||
strumlineInfoBG.y = 23;
|
||||
strumlineInfoBG.scrollFactor.set();
|
||||
|
||||
strumlineAddButton = new CharterStrumlineExtraButton("editors/charter/add-strumline", "Create New");
|
||||
strumlineAddButton = new CharterStrumlineButton("editors/charter/add-strumline", "Create New");
|
||||
strumlineAddButton.onClick = createStrumWithUI;
|
||||
|
||||
strumlineLockButton = new CharterStrumlineExtraButton("editors/charter/add-strumline", "Lock/Unlock");
|
||||
strumlineLockButton = new CharterStrumlineButton("editors/charter/lock-strumline", "Lock/Unlock");
|
||||
strumlineLockButton.onClick = function () {
|
||||
if (strumLines != null) strumLines.draggable = !strumLines.draggable;
|
||||
};
|
||||
|
||||
@@ -32,13 +32,8 @@ class CharterSelection extends EditorTreeMenu {
|
||||
})
|
||||
];
|
||||
list.push(new NewOption("New Difficulty", "New Difficulty", function() {
|
||||
openSubState(new UIWarningSubstate("New Difficulty", "This feature isnt implemented yet", [
|
||||
{
|
||||
label: "OK",
|
||||
onClick: function(t) {
|
||||
|
||||
}
|
||||
}
|
||||
openSubState(new UIWarningSubstate("New Difficulty: Feature Not Implemented!", "This feature isnt implemented yet. Please wait for more cne updates to have this functional.\n\n\n- Codename Devs", [
|
||||
{label: "Ok", color: 0xFFFF0000, onClick: function(t) {}}
|
||||
]));
|
||||
}));
|
||||
optionsTree.add(new OptionsScreen(s.name, "Select a difficulty to continue.", list));
|
||||
@@ -91,6 +86,15 @@ class CharterSelection extends EditorTreeMenu {
|
||||
}
|
||||
|
||||
public function saveSong(creation:SongCreationData) {
|
||||
var songAlreadlyExsits:Bool = [for (s in freeplayList.songs) s.name.toLowerCase()].contains(creation.meta.name.toLowerCase().replace("-", " "));
|
||||
|
||||
if (songAlreadlyExsits) {
|
||||
openSubState(new UIWarningSubstate("Creating Song: Error!", "The song you are trying to create alreadly exists, if you would like to override it delete the song first!", [
|
||||
{label: "Ok", color: 0xFFFF0000, onClick: function(t) {}}
|
||||
]));
|
||||
return;
|
||||
}
|
||||
|
||||
// Paths
|
||||
var songsDir:String = '${Paths.getAssetsRoot()}/songs/';
|
||||
var songFolder:String = '$songsDir${creation.meta.name.replace("-", " ")}';
|
||||
@@ -115,13 +119,8 @@ class CharterSelection extends EditorTreeMenu {
|
||||
})
|
||||
];
|
||||
list.push(new NewOption("New Difficulty", "New Difficulty", function() {
|
||||
openSubState(new UIWarningSubstate("New Difficulty", "This feature isnt implemented yet", [
|
||||
{
|
||||
label: "OK",
|
||||
onClick: function(t) {
|
||||
|
||||
}
|
||||
}
|
||||
openSubState(new UIWarningSubstate("New Difficulty: Feature Not Implemented!", "This feature isnt implemented yet. Please wait for more cne updates to have this functional.\n\n\n- Codename Devs", [
|
||||
{label: "Ok", color: 0xFFFF0000, onClick: function(t) {}}
|
||||
]));
|
||||
}));
|
||||
optionsTree.add(new OptionsScreen(creation.meta.name, "Select a difficulty to continue.", list));
|
||||
|
||||
@@ -13,7 +13,7 @@ class CharterStrumline extends UISprite {
|
||||
|
||||
public var draggingSprite:UISprite;
|
||||
public var healthIcon:HealthIcon;
|
||||
public var button:CharterStrumlineButton;
|
||||
public var button:CharterStrumlineOptions;
|
||||
|
||||
public var draggable:Bool = false;
|
||||
public var dragging:Bool = false;
|
||||
@@ -47,7 +47,7 @@ class CharterStrumline extends UISprite {
|
||||
draggingSprite.cursor = BUTTON;
|
||||
members.push(draggingSprite);
|
||||
|
||||
button = new CharterStrumlineButton(this);
|
||||
button = new CharterStrumlineOptions(this);
|
||||
members.push(button);
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ class CharterStrumline extends UISprite {
|
||||
}
|
||||
}
|
||||
|
||||
class CharterStrumlineButton extends UITopMenuButton {
|
||||
class CharterStrumlineOptions extends UITopMenuButton {
|
||||
var strLine:CharterStrumline;
|
||||
public function new(parent:CharterStrumline) {
|
||||
super(0, 95, null, "Options ↓", []);
|
||||
@@ -132,13 +132,17 @@ class CharterStrumlineButton extends UITopMenuButton {
|
||||
label: "Edit",
|
||||
onSelect: function (_) {
|
||||
Charter.instance.editStrumline(strLine.strumLine);
|
||||
}
|
||||
},
|
||||
color: 0xFFFFFF00,
|
||||
icon: 2
|
||||
},
|
||||
{
|
||||
label: "Delete",
|
||||
onSelect: function (_) {
|
||||
Charter.instance.deleteStrumlineFromData(strLine.strumLine);
|
||||
}
|
||||
},
|
||||
color: 0xFFFF0000,
|
||||
icon: 3
|
||||
}
|
||||
];
|
||||
super.openContextMenu();
|
||||
|
||||
@@ -2,7 +2,7 @@ package funkin.editors.charter;
|
||||
|
||||
import flixel.math.FlxPoint;
|
||||
|
||||
class CharterStrumlineExtraButton extends UISprite {
|
||||
class CharterStrumlineButton extends UISprite {
|
||||
public var button:UISprite;
|
||||
public var text:UIText;
|
||||
|
||||
@@ -30,7 +30,7 @@ class CharterStrumlineExtraButton extends UISprite {
|
||||
var buttonScale:FlxPoint = FlxPoint.get(0,0);
|
||||
|
||||
public override function update(elapsed:Float) {
|
||||
button.follow(this, ((40 * 4) - button.width) / 2, 18);
|
||||
button.follow(this, ((40 * 4) - button.width) / 2, 24);
|
||||
text.follow(this, 0, 84);
|
||||
|
||||
super.update(elapsed);
|
||||
@@ -115,6 +115,7 @@ typedef UIContextMenuOption = {
|
||||
var ?keybind:Array<FlxKey>;
|
||||
var ?keybinds:Array<Array<FlxKey>>;
|
||||
var ?keybindText:String;
|
||||
var ?color:Int;
|
||||
var ?icon:Int;
|
||||
var ?onSelect:UIContextMenuOption->Void;
|
||||
var ?childs:Array<UIContextMenuOption>;
|
||||
@@ -132,6 +133,7 @@ class UIContextMenuOptionSpr extends UISliceSprite {
|
||||
label = new UIText(20, 2, 0, option.label);
|
||||
this.option = option;
|
||||
this.parent = parent;
|
||||
this.color = option.color;
|
||||
|
||||
if (option.icon != null && option.icon > 0) {
|
||||
icon = new FlxSprite(0, 0).loadGraphic(Paths.image('editors/ui/context-icons'), true, 20, 20);
|
||||
|
||||
@@ -72,7 +72,7 @@ class UIWarningSubstate extends MusicBeatSubstate {
|
||||
|
||||
var xPos = (FlxG.width - (30 + (170 * buttons.length))) / 2;
|
||||
for(k=>b in buttons) {
|
||||
var button = new UIButton(xPos + 20 + (170 * k), spr.y + spr.bHeight - (42 + 16), b.label, function() {
|
||||
var button = new UIButton(xPos + 20 + (170 * k), spr.y + spr.bHeight - (36 + 16), b.label, function() {
|
||||
b.onClick(this);
|
||||
close();
|
||||
}, 160, 30);
|
||||
|
||||
@@ -13,6 +13,7 @@ class NewOption extends TextOption {
|
||||
|
||||
iconSpr = new FlxSprite().loadGraphic(Paths.image("editors/new"));
|
||||
iconSpr.setPosition(90 - iconSpr.width, (__text.height - iconSpr.height) / 2);
|
||||
iconSpr.offset.set(20, -15);
|
||||
add(iconSpr);
|
||||
}
|
||||
}
|
||||