here
This commit is contained in:
@@ -20,10 +20,12 @@ class CharacterAnimButtons extends UIButton {
|
||||
super(x,y, '$anim (${offset.x}, ${offset.y})', function () {
|
||||
CharacterEditor.instance.playAnimation(this.anim);
|
||||
}, 282);
|
||||
autoAlpha = false;
|
||||
|
||||
ghostButton = new UIButton(x+282+17, y, "", function () {
|
||||
CharacterEditor.instance.ghostAnim(this.anim);
|
||||
}, 32);
|
||||
ghostButton.autoAlpha = false;
|
||||
members.push(ghostButton);
|
||||
|
||||
ghostIcon = new FlxSprite(ghostButton.x + 8, ghostButton.y + 8).loadGraphic(Paths.image('editors/character/ghost-button'), true, 16, 16);
|
||||
@@ -38,6 +40,7 @@ class CharacterAnimButtons extends UIButton {
|
||||
CharacterEditor.instance.editAnimWithUI(this.anim);
|
||||
}, 32);
|
||||
editButton.color = FlxColor.YELLOW;
|
||||
editButton.autoAlpha = false;
|
||||
members.push(editButton);
|
||||
|
||||
editIcon = new FlxSprite(editButton.x + 8, editButton.y + 8).loadGraphic(Paths.image('editors/character/edit-button'));
|
||||
@@ -48,6 +51,7 @@ class CharacterAnimButtons extends UIButton {
|
||||
CharacterEditor.instance.deleteAnim(this.anim);
|
||||
}, 32);
|
||||
deleteButton.color = FlxColor.RED;
|
||||
deleteButton.autoAlpha = false;
|
||||
members.push(deleteButton);
|
||||
|
||||
deleteIcon = new FlxSprite(deleteButton.x + (15/2), deleteButton.y + 8).loadGraphic(Paths.image('editors/character/delete-button'));
|
||||
|
||||
@@ -219,29 +219,28 @@ class EventButton extends UIButton {
|
||||
public var deleteIcon:FlxSprite;
|
||||
|
||||
public function new(event:ChartEvent, icon:FlxSprite, id:Int, substate:CharterEventScreen, parent:UIButtonList<EventButton>) {
|
||||
super(0,0,"" ,function() {
|
||||
substate.changeTab(id);
|
||||
for(i in parent.buttons.members) {
|
||||
if(i is EventButton) {
|
||||
var i:EventButton = cast i;
|
||||
i.alpha = i == this ? 1 : 0.25;
|
||||
}
|
||||
}
|
||||
},73,40);
|
||||
members.push(icon);
|
||||
this.icon = icon;
|
||||
this.event = event;
|
||||
super(0,0,"" ,function() {
|
||||
substate.changeTab(id);
|
||||
for(i in parent.buttons.members)
|
||||
i.alpha = i == this ? 1 : 0.25;
|
||||
},73,40);
|
||||
autoAlpha = false;
|
||||
|
||||
members.push(icon);
|
||||
icon.setPosition(18 - icon.width / 2, 20 - icon.height / 2);
|
||||
|
||||
deleteButton = new UIButton(bWidth - 30, y + (bHeight - 26) / 2, "", function () {
|
||||
substate.events.splice(id, 1);
|
||||
substate.changeTab(id, false);
|
||||
parent.remove(this);
|
||||
}, 26, 26);
|
||||
deleteButton.color = FlxColor.RED;
|
||||
deleteButton.autoAlpha = false;
|
||||
members.push(deleteButton);
|
||||
|
||||
deleteIcon = new FlxSprite(deleteButton.x + (15/2), deleteButton.y + 4).loadGraphic(Paths.image('editors/character/delete-button'));
|
||||
|
||||
deleteIcon.antialiasing = false;
|
||||
members.push(deleteIcon);
|
||||
}
|
||||
|
||||
@@ -164,6 +164,7 @@ class CharacterButton extends UIButton {
|
||||
|
||||
public function new(x:Float, y:Float, char:String, parent:UIButtonList<CharacterButton>) {
|
||||
super(x, y, "", null, 250, 54);
|
||||
autoAlpha = false;
|
||||
|
||||
charIcon = new HealthIcon(Character.getIconFromCharName(char));
|
||||
charIcon.scale.set(0.3, 0.3);
|
||||
@@ -188,6 +189,7 @@ class CharacterButton extends UIButton {
|
||||
parent.remove(this);
|
||||
}, 32);
|
||||
deleteButton.color = 0xFFFF0000;
|
||||
deleteButton.autoAlpha = false;
|
||||
members.push(deleteButton);
|
||||
|
||||
deleteIcon = new FlxSprite(deleteButton.x + (15/2), deleteButton.y + 8).loadGraphic(Paths.image('editors/character/delete-button'));
|
||||
|
||||
@@ -23,8 +23,7 @@ class UIButton extends UISliceSprite {
|
||||
|
||||
public override function resize(w:Int, h:Int) {
|
||||
super.resize(w, h);
|
||||
if (field != null)
|
||||
field.fieldWidth = w;
|
||||
if (field != null) field.fieldWidth = w;
|
||||
}
|
||||
|
||||
public override function onHovered() {
|
||||
@@ -39,6 +38,7 @@ class UIButton extends UISliceSprite {
|
||||
public override function update(elapsed:Float) {
|
||||
field.follow(this, 0, (bHeight - field.height) / 2);
|
||||
if (!hovered && hasBeenPressed && FlxG.mouse.justReleased) hasBeenPressed = false;
|
||||
if (autoAlpha) alpha = field.alpha = selectable ? 1 : 0.4;
|
||||
super.update(elapsed);
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ class UIButtonList<T:UIButton> extends UIWindow {
|
||||
buttonCameras.bgColor = 0;
|
||||
|
||||
addButton = new UIButton(25, 16, "", null, Std.int(this.buttonSize.x));
|
||||
addButton.autoAlpha = false;
|
||||
addButton.color = 0xFF00FF00;
|
||||
addButton.cameras = [buttonCameras];
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ class UISprite extends FlxSprite {
|
||||
|
||||
public var focused(get, set):Bool;
|
||||
public var selectable:Bool = true;
|
||||
public var autoAlpha:Bool = true;
|
||||
|
||||
private inline function get_focused():Bool
|
||||
return UIState.state.currentFocus == cast this;
|
||||
|
||||
@@ -59,11 +59,12 @@ class UITextBox extends UISliceSprite implements IUIFocusable {
|
||||
super.update(elapsed);
|
||||
|
||||
var selected = selectable && focused;
|
||||
|
||||
if(selectable) {
|
||||
alpha = label.alpha = 1;
|
||||
} else {
|
||||
alpha = label.alpha = 0.4;
|
||||
if (autoAlpha) {
|
||||
if(selectable) {
|
||||
alpha = label.alpha = 1;
|
||||
} else {
|
||||
alpha = label.alpha = 0.4;
|
||||
}
|
||||
}
|
||||
|
||||
var off = multiline ? 4 : ((bHeight - label.height) / 2);
|
||||
|
||||
@@ -34,10 +34,7 @@ class Options
|
||||
public static var hitWindow:Float = 250;
|
||||
public static var songOffset:Float = 0;
|
||||
public static var framerate:Int = 120;
|
||||
public static var gpuOnlyBitmaps:Bool =
|
||||
#if mac false
|
||||
#elseif !web false
|
||||
#else true #end; // causes issues on mac
|
||||
public static var gpuOnlyBitmaps:Bool = #if (mac || web) false #else true #end; // causes issues on mac and web
|
||||
|
||||
public static var lastLoadedMod:String = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user