-
Notifications
You must be signed in to change notification settings - Fork 624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Made Crafting GUIs tall #2804
Made Crafting GUIs tall #2804
Conversation
} | ||
else | ||
{ | ||
try |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
if( btn == this.terminalStyleBox ) | ||
{ | ||
AEConfig.instance().getConfigManager().putSetting( iBtn.getSetting(), next ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
if( btn == this.terminalStyleBox ) | ||
{ | ||
AEConfig.instance().getConfigManager().putSetting( iBtn.getSetting(), next ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
else | ||
{ | ||
try |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yikes, 27 issues? Most of those are how they already were elsewhere in the project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feedback applies also to GuiCraftingCPU
as both are identical.
final int unusedSpace = this.height - this.ySize; | ||
this.guiTop = (int) Math.floor( unusedSpace / ( unusedSpace < 0 ? 3.8f : 2.0f ) ); | ||
int offset = this.guiTop + 8; | ||
this.setScrollBar(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why call setScrollBar()
twice? (L157)
@@ -60,7 +64,20 @@ | |||
|
|||
private final ContainerCraftConfirm ccc; | |||
|
|||
private final int rows = 5; | |||
private int rows = 5; | |||
private int maxRows = Integer.MAX_VALUE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having a rows
and maxRows
seems to be a bit redundant in their use. Moving it to a getter might also be an idea.
if( this.rows < 5 ) | ||
{ | ||
this.rows = 5; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whole sanitation should probably already happening in getRows()
or getMaxRows()
.
@@ -447,6 +504,11 @@ public void postUpdate( final List<IAEItemStack> list, final byte ref ) | |||
this.setScrollBar(); | |||
} | |||
|
|||
int getMaxRows() | |||
{ | |||
return AEConfig.instance().getConfigManager().getSetting( Settings.TERMINAL_STYLE ) == TerminalStyle.SMALL ? 5 : Integer.MAX_VALUE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should handle also the sanitation part. But for performance maybe keep this.rows
and rename this to something like calculateRows()
and call it during init?
a426098
to
caf9393
Compare
this.bindTexture( "guis/craftingreport.png" ); | ||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize ); | ||
final int x_width = 238; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -342,7 +418,15 @@ public void drawFG( final int offsetX, final int offsetY, final int mouseX, fina | |||
public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY ) | |||
{ | |||
this.bindTexture( "guis/craftingcpu.png" ); | |||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize ); | |||
final int x_width = 238; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
caf9393
to
20ea634
Compare
SonarQube analysis reported 14 issues Watch the comments in this conversation to review them. 8 extra issuesNote: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:
|
Partially resolves #2267