This repository has been archived by the owner on Apr 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Starting some work on modular components for GUIs
- Loading branch information
Showing
2 changed files
with
64 additions
and
3 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
61 changes: 61 additions & 0 deletions
61
src/main/java/com/pahimar/ee/client/gui/component/Component.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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package com.pahimar.ee.client.gui.component; | ||
|
||
import net.minecraft.util.ResourceLocation; | ||
|
||
/** | ||
* TODO Finish Javadoc | ||
* | ||
* @author Pahimar (pahimar@gmail.com) | ||
* @version 3.0.0 | ||
* @since 3.0.0 | ||
*/ | ||
//FIXME Pick up here | ||
public class Component { | ||
|
||
protected String componentId; | ||
protected int width; | ||
protected int height; | ||
protected int xPosition; | ||
protected int yPosition; | ||
protected int uPosition; | ||
protected int vPosition; | ||
protected ResourceLocation resourceLocation; | ||
protected boolean isEnabled; | ||
protected boolean isVisible; | ||
|
||
/** | ||
* TODO Finish Javadoc | ||
* | ||
* @param componentId | ||
* @since 3.0.0 | ||
*/ | ||
public Component(final String componentId) { | ||
this.componentId = componentId; | ||
} | ||
|
||
/** | ||
* TODO Finish Javadoc | ||
* | ||
* @return | ||
* @since 3.0.0 | ||
*/ | ||
public int getWidth() { | ||
return width; | ||
} | ||
|
||
/** | ||
* TODO Finish Javadoc | ||
* | ||
* @return | ||
* @since 3.0.0 | ||
*/ | ||
public int getHeight() { | ||
return height; | ||
} | ||
|
||
public enum HoverState { | ||
DISABLED, | ||
NOT_HOVERED, | ||
HOVERED | ||
} | ||
} |