More refactoring (tm)
This commit is contained in:
@@ -222,41 +222,41 @@ public class WorldMapSection3 implements WorldMapSection {
|
||||
garbageValue = "-35"
|
||||
)
|
||||
@Export("alignWidgetSize")
|
||||
static void alignWidgetSize(Widget var0, int var1, int var2, boolean var3) {
|
||||
int var4 = var0.width;
|
||||
int var5 = var0.height;
|
||||
if (var0.widthAlignment == 0) {
|
||||
var0.width = var0.rawWidth;
|
||||
} else if (var0.widthAlignment == 1) {
|
||||
var0.width = var1 - var0.rawWidth;
|
||||
} else if (var0.widthAlignment == 2) {
|
||||
var0.width = var0.rawWidth * var1 >> 14;
|
||||
static void alignWidgetSize(Widget component, int parentWidth, int parentHeight, boolean var3) {
|
||||
int var4 = component.width;
|
||||
int var5 = component.height;
|
||||
if (component.widthAlignment == 0) {
|
||||
component.width = component.rawWidth;
|
||||
} else if (component.widthAlignment == 1) {
|
||||
component.width = parentWidth - component.rawWidth;
|
||||
} else if (component.widthAlignment == 2) {
|
||||
component.width = component.rawWidth * parentWidth >> 14;
|
||||
}
|
||||
|
||||
if (var0.heightAlignment == 0) {
|
||||
var0.height = var0.rawHeight;
|
||||
} else if (var0.heightAlignment == 1) {
|
||||
var0.height = var2 - var0.rawHeight;
|
||||
} else if (var0.heightAlignment == 2) {
|
||||
var0.height = var2 * var0.rawHeight >> 14;
|
||||
if (component.heightAlignment == 0) {
|
||||
component.height = component.rawHeight;
|
||||
} else if (component.heightAlignment == 1) {
|
||||
component.height = parentHeight - component.rawHeight;
|
||||
} else if (component.heightAlignment == 2) {
|
||||
component.height = parentHeight * component.rawHeight >> 14;
|
||||
}
|
||||
|
||||
if (var0.widthAlignment == 4) {
|
||||
var0.width = var0.height * var0.field958 / var0.field959;
|
||||
if (component.widthAlignment == 4) {
|
||||
component.width = component.height * component.field958 / component.field959;
|
||||
}
|
||||
|
||||
if (var0.heightAlignment == 4) {
|
||||
var0.height = var0.width * var0.field959 / var0.field958;
|
||||
if (component.heightAlignment == 4) {
|
||||
component.height = component.width * component.field959 / component.field958;
|
||||
}
|
||||
|
||||
if (var0.contentType == 1337) {
|
||||
Client.viewportWidget = var0;
|
||||
if (component.contentType == 1337) {
|
||||
Client.viewportWidget = component;
|
||||
}
|
||||
|
||||
if (var3 && var0.field975 != null && (var4 != var0.width || var5 != var0.height)) {
|
||||
if (var3 && component.field975 != null && (var4 != component.width || var5 != component.height)) {
|
||||
ScriptEvent var6 = new ScriptEvent();
|
||||
var6.widget = var0;
|
||||
var6.args0 = var0.field975;
|
||||
var6.widget = component;
|
||||
var6.args0 = component.field975;
|
||||
Client.scriptEvents.addFirst(var6);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user