moapi.gui
Class TextInputField

java.lang.Object
  extended by net.minecraft.src.Gui
      extended by net.minecraft.src.GuiButton
          extended by moapi.gui.TextInputField
Direct Known Subclasses:
KeyBindingField, TextField

public abstract class TextInputField
extends net.minecraft.src.GuiButton

A part of the inheritance chain for buttons for text input fields to be group identified

Since:
0.7

Field Summary
protected  net.minecraft.src.FontRenderer fontRenderer
          For rendering text
protected  boolean global
          Whether to use global mode or not
protected  GuiController gui
          The GUI for controlling MOAPI output
protected  ModOption option
          Option relevant to this getText() field
protected  net.minecraft.src.GuiScreen parentGuiScreen
          For tabbing functionality
 
Fields inherited from class net.minecraft.src.GuiButton
displayString, drawButton, enabled, height, id, width, xPosition, yPosition
 
Fields inherited from class net.minecraft.src.Gui
zLevel
 
Constructor Summary
TextInputField(int i, int j, int k, net.minecraft.src.FontRenderer r, GuiController gui)
          To interface child with parent
 
Method Summary
 void drawButton(net.minecraft.client.Minecraft minecraft, int i, int j)
          Draw a textarea with a label inside and an editable text space at i,j
protected  int getCursorCounter()
          Get the current cursor counter value
 ModOption getOption()
          Get the option related to this getText() field
 boolean isFocused()
          Check whether this text input field is focused or not
 void setFocused(boolean flag)
          Set whether the textarea is in focus or not
abstract  void textboxKeyTyped(char c, int i)
          Method for handling keyboard input
 void updateCursorCounter()
          Update the cursor counter value
 
Methods inherited from class net.minecraft.src.GuiButton
getHoverState, mouseDragged, mousePressed, mouseReleased
 
Methods inherited from class net.minecraft.src.Gui
drawCenteredString, drawGradientRect, drawHorizontalLine, drawRect, drawString, drawTexturedModalRect, drawVerticalLine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

option

protected ModOption option
Option relevant to this getText() field


global

protected boolean global
Whether to use global mode or not


fontRenderer

protected final net.minecraft.src.FontRenderer fontRenderer
For rendering text


parentGuiScreen

protected net.minecraft.src.GuiScreen parentGuiScreen
For tabbing functionality


gui

protected GuiController gui
The GUI for controlling MOAPI output

Constructor Detail

TextInputField

public TextInputField(int i,
                      int j,
                      int k,
                      net.minecraft.src.FontRenderer r,
                      GuiController gui)
To interface child with parent

Method Detail

textboxKeyTyped

public abstract void textboxKeyTyped(char c,
                                     int i)
Method for handling keyboard input

Parameters:
c - Character types
i - Integer representation of c

drawButton

public void drawButton(net.minecraft.client.Minecraft minecraft,
                       int i,
                       int j)
Draw a textarea with a label inside and an editable text space at i,j

Overrides:
drawButton in class net.minecraft.src.GuiButton

getCursorCounter

protected int getCursorCounter()
Get the current cursor counter value

Returns:
Current cursor counter value

updateCursorCounter

public void updateCursorCounter()
Update the cursor counter value


setFocused

public void setFocused(boolean flag)
Set whether the textarea is in focus or not

Parameters:
flag - True when focused

isFocused

public boolean isFocused()
Check whether this text input field is focused or not

Returns:
True when focused

getOption

public ModOption getOption()
Get the option related to this getText() field