This commit is contained in:
Ne_Eo
2024-08-02 02:01:16 +02:00
parent 07a1a64c22
commit 2338374e41
8 changed files with 9 additions and 31 deletions
+1 -4
View File
@@ -49,10 +49,7 @@ class CharterNote extends UISprite implements ICharterSelectable {
}
public override function updateButtonHandler() {
__rect.x = x;
__rect.y = y;
__rect.width = 40;
__rect.height = 40;
__rect.set(x, y, 40, 40);
UIState.state.updateRectButtonHandler(this, __rect, onHovered);
}
+1 -4
View File
@@ -67,10 +67,7 @@ class UICheckbox extends UISprite {
}
public override function updateButton() {
__rect.x = x;
__rect.y = y;
__rect.width = field.width + 30;
__rect.height = field.height > height ? field.height : height;
__rect.set(x, y, field.width + 30, field.height > height ? field.height : height);
UIState.state.updateRectButtonHandler(this, __rect, onHovered);
}
}
+1 -4
View File
@@ -92,10 +92,7 @@ class UIRadioButton extends UISprite {
}
public override function updateButton() {
__rect.x = x;
__rect.y = y;
__rect.width = field.width + 30;
__rect.height = field.height > height ? field.height : height;
__rect.set(x, y, field.width + 30, field.height > height ? field.height : height);
UIState.state.updateRectButtonHandler(this, __rect, onHovered);
}
+1 -4
View File
@@ -19,10 +19,7 @@ class UISliceSprite extends UISprite {
public override function updateButton() {
if (incorporeal) return;
__rect.x = x;
__rect.y = y;
__rect.width = bWidth;
__rect.height = bHeight;
__rect.set(x, y, bWidth, bHeight);
UIState.state.updateRectButtonHandler(this, __rect, onHovered);
}
+1 -4
View File
@@ -118,9 +118,6 @@ class UISprite extends FlxSprite {
}
public function updateSpriteRect() {
__rect.x = x;
__rect.y = y;
__rect.width = width;
__rect.height = height;
__rect.set(x, y, width, height);
}
}
+1 -4
View File
@@ -66,10 +66,7 @@ class UITopMenuButton extends UISliceSprite {
var opened = curMenu != null ? curMenu.contextMenuOpened() : false;
if(opened && FlxG.mouse.justPressed) {
__rect.x = x;
__rect.y = y;
__rect.width = bWidth;
__rect.height = bHeight;
__rect.set(x, y, bWidth, bHeight);
if(UIState.state.isOverlapping(this, __rect)) {
curMenu.close();
justClosed = 2;
+2 -3
View File
@@ -21,8 +21,7 @@ class UIWindow extends UISliceSprite {
cursor = ARROW;
if(collapsable) {
__rect.x = x; __rect.y = y;
__rect.width = bWidth; __rect.height = topHeight;
__rect.set(x, y, bWidth, topHeight);
if(UIState.state.isOverlapping(this, __rect)) {
cursor = CLICK;
@@ -44,6 +43,6 @@ class UIWindow extends UISliceSprite {
__rect.y = y+topHeight;
__rect.height = bHeight-topHeight;
}
hovered = UIState.state.isOverlapping(this, __rect);
hovered = content.exists && UIState.state.isOverlapping(this, __rect);
}
}
@@ -24,10 +24,7 @@ class OldUISliceSpriteTri extends UISprite {
public override function updateButton() {
if (incorporeal) return;
__rect.x = x;
__rect.y = y;
__rect.width = bWidth;
__rect.height = bHeight;
__rect.set(x, y, bWidth, bHeight);
UIState.state.updateRectButtonHandler(this, __rect, onHovered);
}