-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6592ec8
commit 1d4dc2d
Showing
15 changed files
with
237 additions
and
323 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 18 additions & 25 deletions
43
src/main/java/net/minecraft/client/gui/GuiResourcePackList.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,48 @@ | ||
package net.minecraft.client.gui; | ||
|
||
import java.util.List; | ||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.client.renderer.Tessellator; | ||
import net.minecraft.client.resources.ResourcePackListEntry; | ||
import net.minecraft.util.EnumChatFormatting; | ||
|
||
public abstract class GuiResourcePackList extends GuiListExtended | ||
{ | ||
import java.util.List; | ||
|
||
public abstract class GuiResourcePackList extends GuiListExtended { | ||
protected final Minecraft mc; | ||
protected final List<ResourcePackListEntry> field_148204_l; | ||
protected final List<ResourcePackListEntry> resourcePackList; | ||
|
||
public GuiResourcePackList(Minecraft mcIn, int p_i45055_2_, int p_i45055_3_, List<ResourcePackListEntry> p_i45055_4_) | ||
{ | ||
super(mcIn, p_i45055_2_, p_i45055_3_, 32, p_i45055_3_ - 55 + 4, 36); | ||
public GuiResourcePackList(Minecraft mcIn, int width, int height, List<ResourcePackListEntry> resourcePackList) { | ||
super(mcIn, width, height, 32, height - 55 + 4, 36); | ||
this.mc = mcIn; | ||
this.field_148204_l = p_i45055_4_; | ||
this.resourcePackList = resourcePackList; | ||
this.field_148163_i = false; | ||
this.setHasListHeader(true, (int)((float)mcIn.fontRendererObj.FONT_HEIGHT * 1.5F)); | ||
this.setHasListHeader((int)(mcIn.fontRendererObj.FONT_HEIGHT * 1.5F)); | ||
} | ||
|
||
protected void drawListHeader(int p_148129_1_, int p_148129_2_, Tessellator p_148129_3_) | ||
{ | ||
String s = EnumChatFormatting.UNDERLINE + String.valueOf(EnumChatFormatting.BOLD) + this.getListHeader(); | ||
this.mc.fontRendererObj.drawString(s, p_148129_1_ + this.width / 2 - this.mc.fontRendererObj.getStringWidth(s) / 2, Math.min(this.top + 3, p_148129_2_), 16777215); | ||
protected void drawListHeader(int x, int y, Tessellator tessellator) { | ||
String header = EnumChatFormatting.UNDERLINE + "" + EnumChatFormatting.BOLD + getListHeader(); | ||
this.mc.fontRendererObj.drawString(header, x + this.width / 2 - this.mc.fontRendererObj.getStringWidth(header) / 2, Math.min(this.top + 3, y), 16777215); | ||
} | ||
|
||
protected abstract String getListHeader(); | ||
|
||
public List<ResourcePackListEntry> getList() | ||
{ | ||
return this.field_148204_l; | ||
public List<ResourcePackListEntry> getList() { | ||
return this.resourcePackList; | ||
} | ||
|
||
protected int getSize() | ||
{ | ||
protected int getSize() { | ||
return this.getList().size(); | ||
} | ||
|
||
public ResourcePackListEntry getListEntry(int index) | ||
{ | ||
public ResourcePackListEntry getListEntry(int index) { | ||
return this.getList().get(index); | ||
} | ||
|
||
public int getListWidth() | ||
{ | ||
public int getListWidth() { | ||
return this.width; | ||
} | ||
|
||
protected int getScrollBarX() | ||
{ | ||
protected int getScrollBarX() { | ||
return this.right - 6; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.