Skip to content
This repository has been archived by the owner on Nov 7, 2022. It is now read-only.

Commit

Permalink
Small JD changes #4
Browse files Browse the repository at this point in the history
  • Loading branch information
boomboompower committed Mar 28, 2020
1 parent 213d6b0 commit 40f7f10
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import net.minecraft.command.ICommandSender;

/**
* NOTE: This class is temporary & it's methods will eventually be tuned into a new gui.
* NOTE: This class is temporary and it's methods will eventually be tuned into a new gui.
*/
public class SkinCommand extends ModCommand {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public void applyShader() {

/**
* Tells the EntityRenderer class to stop using its shader. Throws an error if someone tried to register
* this class before Minecraft created its EntityRenderer instance. >.>
* this class before Minecraft created its EntityRenderer instance.
*/
public void killShader() {
Prerequisites.notNull(this.entityRenderer, "ShaderPatch should be called after postInit()");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

/**
* Provides the base methods for a Gui, these methods are designed to be applicable to multiple Minecraft versions.
* <br />
* <br>
* It should be noted that all render methods are ran in sandboxed environments meaning if an error occurs, the game will not crash.
*
* @author boomboompower
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ public InteractiveDrawable disableTranslatable() {
/**
* Returns 0 if the button is disabled, 1 if the mouse is NOT hovering over this button and 2 if it IS hovering over
* this button.
*
* @param mouseOver true if the mouse is over this button
* @return an integer state based on what the color of this button should be
*/
protected int getHoverState(boolean mouseOver) {
int state = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public class ModernHeader extends Gui implements InteractiveDrawable {
/**
* Basic constructor for UI headers. Scale size is 1.5 of normal text. Draws an underline.
*
* @param gui the parent of this header
* @param x the x location of the header
* @param y the y location of the header
* @param header the text which will be rendered
Expand All @@ -99,10 +100,11 @@ public ModernHeader(ModernGui gui, int x, int y, String header) {
/**
* Basic constructor for UI headers. Draws an underline.
*
* @param gui the parent of this header
* @param x the x location of the header
* @param y the y location of the header
* @param header the text which will be rendered
* @param scaleSize the scale of the text. (scale > 1 means bigger)
* @param scaleSize the scale of the text. (scale greater than 1 means bigger)
*/
public ModernHeader(ModernGui gui, int x, int y, String header, float scaleSize) {
this(gui, x, y, header, scaleSize, true);
Expand All @@ -111,10 +113,11 @@ public ModernHeader(ModernGui gui, int x, int y, String header, float scaleSize)
/**
* Basic constructor for UI headers. Draws an underline.
*
* @param gui the parent of this header
* @param x the x location of the header
* @param y the y location of the header
* @param header the text which will be rendered
* @param scaleSize the scale of the text. (scale > 1 means bigger)
* @param scaleSize the scale of the text. (scale greater than 1 means bigger)
*/
public ModernHeader(ModernGui gui, int x, int y, String header, int scaleSize) {
this(gui, x, y, header, scaleSize, true);
Expand All @@ -123,10 +126,11 @@ public ModernHeader(ModernGui gui, int x, int y, String header, int scaleSize) {
/**
* Basic constructor for UI headers.
*
* @param gui the parent of this header
* @param x the x location of the header
* @param y the y location of the header
* @param header the text which will be rendered
* @param scaleSize the scale of the text. (scale > 1 means bigger)
* @param scaleSize the scale of the text. (scale greater than 1 means bigger)
* @param drawUnderline true if an underline should be drawn.
*/
public ModernHeader(ModernGui gui, int x, int y, String header, float scaleSize, boolean drawUnderline) {
Expand All @@ -136,6 +140,7 @@ public ModernHeader(ModernGui gui, int x, int y, String header, float scaleSize,
/**
* Basic constructor for UI headers.
*
* @param gui the parent of this header
* @param x the x location of the header
* @param y the y location of the header
* @param header the text which will be rendered
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,14 @@ public void setText(String text) {
}

/**
* Returns the contents of the textbox
* @return Returns the contents of the textbox
*/
public String getText() {
return this.text;
}

/**
* returns the text between the cursor and selectionEnd
* @return returns the text between the cursor and selectionEnd
*/
public String getSelectedText() {
int i = this.cursorPosition < this.selectionEnd ? this.cursorPosition: this.selectionEnd;
Expand All @@ -137,6 +137,8 @@ public String getSelectedText() {

/**
* replaces selected text, or inserts text at the position on the cursor
*
* @param text the text to write
*/
public void writeText(String text) {
String s = "";
Expand Down Expand Up @@ -173,6 +175,8 @@ public void writeText(String text) {
/**
* Deletes the specified number of words starting at the cursor position. Negative numbers will delete words left of
* the cursor.
*
* @param words the words to delete
*/
public void deleteWords(int words) {
if (this.text.length() != 0) {
Expand Down

0 comments on commit 40f7f10

Please sign in to comment.