Some additional fixes from other branch.
This commit is contained in:
@@ -24,10 +24,10 @@ import java.util.Map;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.widget.button.Button;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
|
||||
import appeng.api.config.AccessRestriction;
|
||||
import appeng.api.config.ActionItems;
|
||||
@@ -52,7 +52,7 @@ import appeng.api.config.YesNo;
|
||||
import appeng.core.localization.ButtonToolTips;
|
||||
|
||||
|
||||
public class GuiImgButton extends GuiButton implements ITooltip
|
||||
public class GuiImgButton extends Button implements ITooltip
|
||||
{
|
||||
private static final Pattern COMPILE = Pattern.compile( "%s" );
|
||||
private static final Pattern PATTERN_NEW_LINE = Pattern.compile( "\\n", Pattern.LITERAL );
|
||||
@@ -298,8 +298,8 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
|
||||
if( displayName != null )
|
||||
{
|
||||
String name = I18n.translateToLocal( displayName );
|
||||
String value = I18n.translateToLocal( displayValue );
|
||||
String name = I18n.format( displayName );
|
||||
String value = I18n.format( displayValue );
|
||||
|
||||
if( name == null || name.isEmpty() )
|
||||
{
|
||||
|
||||
@@ -20,10 +20,10 @@ package appeng.client.gui.widgets;
|
||||
|
||||
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.client.gui.widget.TextFieldWidget;
|
||||
|
||||
|
||||
public class GuiNumberBox extends GuiTextField
|
||||
public class GuiNumberBox extends TextFieldWidget
|
||||
{
|
||||
|
||||
private final Class type;
|
||||
|
||||
@@ -20,14 +20,14 @@ package appeng.client.gui.widgets;
|
||||
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.widget.button.Button;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import appeng.container.interfaces.IProgressProvider;
|
||||
import appeng.core.localization.GuiText;
|
||||
|
||||
|
||||
public class GuiProgressBar extends GuiButton implements ITooltip
|
||||
public class GuiProgressBar extends Button implements ITooltip
|
||||
{
|
||||
|
||||
private final IProgressProvider source;
|
||||
|
||||
@@ -20,7 +20,7 @@ package appeng.client.gui.widgets;
|
||||
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.widget.button.Button;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.RenderItem;
|
||||
@@ -28,7 +28,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
|
||||
public class GuiTabButton extends GuiButton implements ITooltip
|
||||
public class GuiTabButton extends Button implements ITooltip
|
||||
{
|
||||
private final RenderItem itemRenderer;
|
||||
private final String message;
|
||||
|
||||
@@ -22,13 +22,13 @@ package appeng.client.gui.widgets;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.widget.button.Button;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
|
||||
|
||||
public class GuiToggleButton extends GuiButton implements ITooltip
|
||||
public class GuiToggleButton extends Button implements ITooltip
|
||||
{
|
||||
private static final Pattern PATTERN_NEW_LINE = Pattern.compile( "\\n", Pattern.LITERAL );
|
||||
private final int iconIdxOn;
|
||||
@@ -87,8 +87,8 @@ public class GuiToggleButton extends GuiButton implements ITooltip
|
||||
{
|
||||
if( this.displayName != null )
|
||||
{
|
||||
String name = I18n.translateToLocal( this.displayName );
|
||||
String value = I18n.translateToLocal( this.displayHint );
|
||||
String name = I18n.format( this.displayName );
|
||||
String value = I18n.format( this.displayHint );
|
||||
|
||||
if( name == null || name.isEmpty() )
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@ package appeng.client.gui.widgets;
|
||||
|
||||
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.client.gui.widget.TextFieldWidget;
|
||||
import net.minecraft.client.renderer.BufferBuilder;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
@@ -35,7 +35,7 @@ import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
*
|
||||
* The rendering does pay attention to the size of the '_' caret.
|
||||
*/
|
||||
public class MEGuiTextField extends GuiTextField
|
||||
public class MEGuiTextField extends TextFieldWidget
|
||||
{
|
||||
private static final int PADDING = 2;
|
||||
|
||||
@@ -75,7 +75,7 @@ public class MEGuiTextField extends GuiTextField
|
||||
final boolean requiresFocus = this.isMouseIn( xPos, yPos );
|
||||
if( !this.isFocused() )
|
||||
{
|
||||
this.setFocused( requiresFocus );
|
||||
this.setFocused2( requiresFocus );
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user