Cleanup
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user