mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-17 19:15:13 +00:00
rename usecustomscroll
This commit is contained in:
1 parent
99c33a728d
commit
534056e8b2
6 files changed
+15
-14
No files matched your search
@@ -98,7 +98,7 @@ public class IMCHandler {
|
||||
}
|
||||
|
||||
// true if not set to false
|
||||
info.setCustomScroll(tag.hasKey("useCustomScroll") && tag.getBoolean("useCustomScroll"));
|
||||
info.setUseCustomScroll(tag.hasKey("useCustomScroll") && tag.getBoolean("useCustomScroll"));
|
||||
info.setShowFavoritesButton(!tag.hasKey("showFavoritesButton") || tag.getBoolean("showFavoritesButton"));
|
||||
info.setShowOverlayButton(!tag.hasKey("showOverlayButton") || tag.getBoolean("showOverlayButton"));
|
||||
|
||||
|
||||
@@ -213,13 +213,13 @@ public class DebugHandlerWidget extends Widget implements IContainerInputHandler
|
||||
}
|
||||
|
||||
public String getRenderLabel() {
|
||||
return handlerInfo.useCustomScroll() ? "On" : "Off";
|
||||
return handlerInfo.getUseCustomScroll() ? "On" : "Off";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onButtonPress(boolean rightclick) {
|
||||
handlerInfo.setCustomScroll(!handlerInfo.useCustomScroll());
|
||||
updatePatch(6, handlerInfo.useCustomScroll() ? 1 : 0, 0);
|
||||
handlerInfo.setUseCustomScroll(!handlerInfo.getUseCustomScroll());
|
||||
updatePatch(6, handlerInfo.getUseCustomScroll() ? 1 : 0, 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -588,11 +588,11 @@ public class DebugHandlerWidget extends Widget implements IContainerInputHandler
|
||||
final int width = intOrDefault(parts[3], info.getWidth());
|
||||
final int maxRecipesPerPage = intOrDefault(parts[4], info.getMaxRecipesPerPage());
|
||||
final int order = intOrDefault(parts[5], NEIClientConfig.handlerOrdering.getOrDefault(handler, 0));
|
||||
final boolean useCustomScroll = intOrDefault(parts[6], info.useCustomScroll() ? 1 : 0) == 1;
|
||||
final boolean useCustomScroll = intOrDefault(parts[6], info.getUseCustomScroll() ? 1 : 0) == 1;
|
||||
|
||||
info.setYShift(yShift);
|
||||
info.setHandlerDimensions(height, width, maxRecipesPerPage);
|
||||
info.setCustomScroll(useCustomScroll);
|
||||
info.setUseCustomScroll(useCustomScroll);
|
||||
NEIClientConfig.handlerOrdering.put(handler, order);
|
||||
}
|
||||
|
||||
|
||||
@@ -351,7 +351,7 @@ public abstract class GuiRecipe<H extends IRecipeHandler> extends GuiContainer i
|
||||
if (!cacheKey.equals(this.recipePageCacheKey)) {
|
||||
this.recipePageCacheKey = cacheKey;
|
||||
|
||||
final boolean recipeGrow = this.handlerInfo.useCustomScroll()
|
||||
final boolean recipeGrow = this.handlerInfo.getUseCustomScroll()
|
||||
&& this.handlerInfo.getMaxRecipesPerPage() <= 1;
|
||||
final List<Widget> widgets = new ArrayList<>();
|
||||
int shiftY = 0;
|
||||
@@ -373,7 +373,7 @@ public abstract class GuiRecipe<H extends IRecipeHandler> extends GuiContainer i
|
||||
|
||||
this.container.setWidgets(widgets);
|
||||
|
||||
if (this.handlerInfo.useCustomScroll()) {
|
||||
if (this.handlerInfo.getUseCustomScroll()) {
|
||||
this.container.setVerticalScroll(null);
|
||||
} else if (this.container.w == this.xSize - 6) {
|
||||
this.container.setVerticalScroll(VERTICAL_SCROLLBAR);
|
||||
|
||||
@@ -265,7 +265,7 @@ public abstract class GuiRecipeTab extends Widget {
|
||||
NEIClientConfig.logger.info("Error setting handler dimensions for " + handler);
|
||||
}
|
||||
|
||||
info.setCustomScroll(
|
||||
info.setUseCustomScroll(
|
||||
record.isSet("useCustomScroll") ? Boolean.parseBoolean(record.get("useCustomScroll")) : false);
|
||||
handlerMap.put(handler, info);
|
||||
NEIClientConfig.logger.info("Loaded " + handler);
|
||||
|
||||
@@ -125,11 +125,11 @@ public class HandlerInfo {
|
||||
this.showOverlayButton = showOverlayButton;
|
||||
}
|
||||
|
||||
public boolean useCustomScroll() {
|
||||
public boolean getUseCustomScroll() {
|
||||
return this.useCustomScroll;
|
||||
}
|
||||
|
||||
public void setCustomScroll(boolean useCustomScroll) {
|
||||
public void setUseCustomScroll(boolean useCustomScroll) {
|
||||
this.useCustomScroll = useCustomScroll;
|
||||
}
|
||||
|
||||
@@ -165,8 +165,8 @@ public class HandlerInfo {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setCustomScroll(boolean useCustomScroll) {
|
||||
info.setCustomScroll(useCustomScroll);
|
||||
public Builder setUseCustomScroll(boolean useCustomScroll) {
|
||||
info.setUseCustomScroll(useCustomScroll);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,8 @@ public class NEIRecipeWidget extends Widget {
|
||||
public void update() {
|
||||
this.w = this.handlerInfo.getWidth();
|
||||
|
||||
if (this.showAsWidget || !this.handlerInfo.useCustomScroll() || this.handlerInfo.getMaxRecipesPerPage() > 1) {
|
||||
if (this.showAsWidget || !this.handlerInfo.getUseCustomScroll()
|
||||
|| this.handlerInfo.getMaxRecipesPerPage() > 1) {
|
||||
this.h = this.handlerInfo.getHeight() + this.handlerInfo.getYShift();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user