Skip to content

Commit

Permalink
Release 1.13.7 & Fix HorizontalScrolling & Remove useless annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
trychen committed Feb 7, 2020
1 parent c4ce291 commit 127d08a
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 57 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ org.gradle.jvmargs=-Xmx3G

# Mod Properties
mod_id = Pangu
mod_version = 1.13.4
mod_version = 1.13.7
mod_group = cn.mccraft.pangu
mod_core_plugin = cn.mccraft.pangu.core.asm.PanguPlugin

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/cn/mccraft/pangu/core/PanguCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@Mod(
modid = PanguCore.ID,
name = "Pangu Core",
version = "1.13.4",
version = "1.13.7",
useMetadata = true,
acceptedMinecraftVersions = "[1.12.2,1.13)"
)
Expand Down
22 changes: 8 additions & 14 deletions src/main/java/cn/mccraft/pangu/core/client/ui/Button.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package cn.mccraft.pangu.core.client.ui;

import lombok.Data;
import lombok.Getter;
import lombok.NonNull;
import lombok.Setter;
import lombok.*;
import lombok.experimental.Accessors;

import java.util.function.Consumer;
Expand Down Expand Up @@ -32,17 +29,17 @@ public abstract class Button extends Component {
@Getter
protected Consumer<ButtonClickEvent> buttonClickEvent;

@Deprecated
public Button(int width, int height) {
super();
setSize(width, height);
}

public Button(float width, float height) {
super();
setSize(width, height);
}

@Deprecated
public Button(int width, int height) {
this((float) width, height);
}

public void onClick(int mouseButton, int mouseX, int mouseY) {
if (isDisabled()) return;
if (isPlayPressSound()) playPressSound();
Expand Down Expand Up @@ -91,10 +88,7 @@ public Button onButtonClick(Consumer<ButtonClickEvent> consumer) {

@Data
public static class ButtonClickEvent {
@NonNull
private Button button;

@NonNull
private int mouseButton, mouseX, mouseY;
private final Button button;
private final int mouseButton, mouseX, mouseY;
}
}
7 changes: 7 additions & 0 deletions src/main/java/cn/mccraft/pangu/core/client/ui/Container.java
Original file line number Diff line number Diff line change
Expand Up @@ -245,4 +245,11 @@ public void drawBackground() {

public void drawForeground() {
}

@Override
public Container setScreen(Screen screen) {
for (Component component : components) component.setScreen(screen);
super.setScreen(screen);
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ public class TextField extends Component implements Focusable {
protected int lineScrollOffset;

@Getter
@Setter
protected int cursorPosition;

@Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ private void applyScrollLimits() {
}

public float getMaxScroll() {
return this.getContentHeight() - getHeight();
return this.getContentWidth() - getWidth();
}

@Override
Expand Down
39 changes: 0 additions & 39 deletions src/main/java/cn/mccraft/pangu/core/network/KeyBasedMessage.java

This file was deleted.

0 comments on commit 127d08a

Please sign in to comment.