event screen looks better

This commit is contained in:
lunarcleint
2023-08-03 16:43:03 -07:00
parent c9e631e776
commit e341380f49
2 changed files with 21 additions and 16 deletions
@@ -45,6 +45,7 @@ class CharterEventScreen extends UISubstateWindow {
events = chartEvent.events.copy();
eventsList = new UIButtonList<EventButton>(0,0,75, 570, "", FlxPoint.get(73, 40), null, 0);
eventsList.drawTop = false;
eventsList.addButton.callback = () -> openSubState(new CharterEventTypeSelection(function(eventName) {
events.push({
time: Conductor.getTimeForStep(chartEvent.step),
+20 -16
View File
@@ -30,6 +30,8 @@ class UISliceSprite extends UISprite {
bHeight = h;
}
public var drawTop:Bool = true;
public override function draw() {
var x:Float = this.x;
var y:Float = this.y;
@@ -45,26 +47,28 @@ class UISliceSprite extends UISprite {
var bottom:FlxFrame = frames.frames[framesOffset + 7];
var bottomright:FlxFrame = frames.frames[framesOffset + 8];
// TOP LEFT
frame = topleft;
setPosition(x, y);
__setSize(topleft.frame.width, topleft.frame.height);
super.drawSuper();
if (drawTop) {
// TOP LEFT
frame = topleft;
setPosition(x, y);
__setSize(topleft.frame.width, topleft.frame.height);
super.drawSuper();
// TOP
if (bWidth > topleft.frame.width + topright.frame.width) {
frame = top;
setPosition(x + topleft.frame.width, y);
__setSize(bWidth - topleft.frame.width - topright.frame.width, top.frame.height);
// TOP
if (bWidth > topleft.frame.width + topright.frame.width) {
frame = top;
setPosition(x + topleft.frame.width, y);
__setSize(bWidth - topleft.frame.width - topright.frame.width, top.frame.height);
super.drawSuper();
}
// TOP RIGHT
frame = topright;
setPosition(x + bWidth - topright.frame.width, y);
__setSize(topright.frame.width, topright.frame.height);
super.drawSuper();
}
// TOP RIGHT
frame = topright;
setPosition(x + bWidth - topright.frame.width, y);
__setSize(topright.frame.width, topright.frame.height);
super.drawSuper();
// MIDDLE LEFT
if (bHeight > top.frame.height + bottom.frame.height) {
frame = middleleft;