-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed code for detecting snitch on place + WIP GUI stuff
- Loading branch information
1 parent
8aabc51
commit 242c486
Showing
19 changed files
with
137 additions
and
90 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
1 change: 1 addition & 0 deletions
1
src/main/java/com/gmail/nuclearcat1337/snitch_master/gui/ConfigGuiFactory.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
11 changes: 0 additions & 11 deletions
11
src/main/java/com/gmail/nuclearcat1337/snitch_master/gui/controls/ControlGui.java
This file was deleted.
Oops, something went wrong.
70 changes: 70 additions & 0 deletions
70
src/main/java/com/gmail/nuclearcat1337/snitch_master/gui/controls/DropMenu.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,70 @@ | ||
package com.gmail.nuclearcat1337.snitch_master.gui.controls; | ||
|
||
import com.gmail.nuclearcat1337.snitch_master.SnitchMaster; | ||
import com.gmail.nuclearcat1337.snitch_master.util.GeneralUtils; | ||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.client.gui.Gui; | ||
import net.minecraft.client.gui.GuiButton; | ||
import net.minecraft.client.renderer.GlStateManager; | ||
import net.minecraft.util.ResourceLocation; | ||
|
||
/** | ||
* Created by Mr_Little_Kitty on 1/20/2017. | ||
*/ | ||
public class DropMenu extends GuiButton | ||
{ | ||
public static final ResourceLocation MENU_BUTTON = new ResourceLocation(SnitchMaster.MODID,"snitchMasterMain.png"); | ||
|
||
public DropMenu(int buttonId, int x, int y) | ||
{ | ||
super(buttonId, x, y, 16, 16, ""); | ||
} | ||
|
||
|
||
|
||
@Override | ||
public boolean mousePressed(Minecraft mc, int mouseX, int mouseY) | ||
{ | ||
if(super.mousePressed(mc,mouseX,mouseY)) | ||
{ | ||
|
||
return true; | ||
} | ||
return false; | ||
} | ||
|
||
@Override | ||
public void drawButton(Minecraft mc, int mouseX, int mouseY) | ||
{ | ||
if(this.visible) | ||
{ | ||
//GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); | ||
this.hovered = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height; | ||
int i = this.getHoverState(this.hovered); | ||
|
||
GlStateManager.color(1.0f,1.0f,1.0f,1.0f); | ||
|
||
GlStateManager.enableBlend(); | ||
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO); | ||
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA); | ||
|
||
mc.getTextureManager().bindTexture(BUTTON_TEXTURES); | ||
this.drawTexturedModalRect(this.xPosition, this.yPosition, 0, 46 + i * 20, this.width / 2, this.height); | ||
this.drawTexturedModalRect(this.xPosition + this.width / 2, this.yPosition, 200 - this.width / 2, 46 + i * 20, this.width / 2, this.height); | ||
|
||
// if(i == 2) //They are hovering over the button | ||
// { | ||
// float f3 = (float)(16777120 >> 24 & 255) / 255.0F; | ||
// float f = (float)(16777120 >> 16 & 255) / 255.0F; | ||
// float f1 = (float)(16777120 >> 8 & 255) / 255.0F; | ||
// float f2 = (float)(16777120 & 255) / 255.0F; | ||
// GlStateManager.color(f, f1, f2, f3); | ||
// } | ||
|
||
mc.getTextureManager().bindTexture(MENU_BUTTON); | ||
this.drawTexturedModalRect(this.xPosition+4,this.yPosition+4,0,0,8,8); | ||
|
||
this.mouseDragged(mc, mouseX, mouseY); | ||
} | ||
} | ||
} |
61 changes: 0 additions & 61 deletions
61
src/main/java/com/gmail/nuclearcat1337/snitch_master/gui/controls/OptionSlider.java
This file was deleted.
Oops, something went wrong.
3 changes: 2 additions & 1 deletion
3
...t1337/snitch_master/gui/EditColorGui.java → ...itch_master/gui/screens/EditColorGui.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
2 changes: 1 addition & 1 deletion
2
...snitch_master/gui/EditDescriptionGui.java → ...aster/gui/screens/EditDescriptionGui.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
3 changes: 2 additions & 1 deletion
3
...1337/snitch_master/gui/EditStringGui.java → ...tch_master/gui/screens/EditStringGui.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
3 changes: 2 additions & 1 deletion
3
...earcat1337/snitch_master/gui/MainGui.java → ...37/snitch_master/gui/screens/MainGui.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
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
3 changes: 2 additions & 1 deletion
3
...at1337/snitch_master/gui/SettingsGui.java → ...nitch_master/gui/screens/SettingsGui.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
3 changes: 2 additions & 1 deletion
3
...h_master/gui/TargetedSnitchUpdateGui.java → .../gui/screens/TargetedSnitchUpdateGui.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
2 changes: 1 addition & 1 deletion
2
...ava/com/gmail/nuclearcat1337/snitch_master/gui/snitchliststable/SnitchListNameColumn.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
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
2 changes: 1 addition & 1 deletion
2
src/main/java/com/gmail/nuclearcat1337/snitch_master/handlers/KeyHandler.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
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