mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 01:29:05 +00:00
Effects Rendering Borders
This commit is contained in:
1 parent
d7d968bf86
commit
a37b32c1a5
10 files changed
+39
-11
No files matched your search
@@ -91,6 +91,9 @@ public class ProfileController implements IProfileHandler {
|
||||
}
|
||||
|
||||
public synchronized void login(EntityPlayer player) {
|
||||
if(!ConfigMain.ProfilesEnabled)
|
||||
return;
|
||||
|
||||
if (player == null)
|
||||
return;
|
||||
Profile profile;
|
||||
|
||||
@@ -16,6 +16,8 @@ import org.lwjgl.opengl.GL11;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static noppes.npcs.client.gui.player.inventory.GuiCNPCInventory.specialIcons;
|
||||
|
||||
public class SubGuiEffectGeneral extends SubGuiInterface implements ITextfieldListener {
|
||||
private final GuiNPCManageEffects parent;
|
||||
public CustomEffect effect;
|
||||
@@ -128,10 +130,8 @@ public class SubGuiEffectGeneral extends SubGuiInterface implements ITextfieldLi
|
||||
func_152125_a(x, y, 0, 0, 1, 1, iconRenderSize, iconRenderSize, 1, 1);
|
||||
}
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
|
||||
// TODO: FIX TEXTURE
|
||||
// textureManager.bindTexture(new ResourceLocation(CustomNpcPlusDBC.ID + ":textures/gui/icons.png"));
|
||||
// func_152125_a(x, y, 0, 240, 16, 16, iconRenderSize, iconRenderSize, 256, 256);
|
||||
textureManager.bindTexture(specialIcons);
|
||||
func_152125_a(x, y, 0, 224, 16, 16, iconRenderSize, iconRenderSize, 256, 256);
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -28,6 +28,8 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
|
||||
import static noppes.npcs.client.gui.player.inventory.GuiCNPCInventory.specialIcons;
|
||||
|
||||
public class GuiNPCManageEffects extends GuiNPCInterface2 implements ICustomScrollListener, IScrollData, IGuiData, ISubGuiListener, GuiYesNoCallback {
|
||||
public GuiCustomScroll scrollEffects;
|
||||
public HashMap<String, Integer> data = new HashMap<>();
|
||||
@@ -170,10 +172,8 @@ public class GuiNPCManageEffects extends GuiNPCInterface2 implements ICustomScro
|
||||
func_152125_a(x, y, 0, 0, 1, 1, iconRenderSize, iconRenderSize, 1, 1);
|
||||
}
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
|
||||
// TODO: Fix ICONS
|
||||
// textureManager.bindTexture(new ResourceLocation(CustomNpcPlusDBC.ID + ":textures/gui/icons.png"));
|
||||
// func_152125_a(x, y, 0, 240, 16, 16, iconRenderSize, iconRenderSize, 256, 256);
|
||||
textureManager.bindTexture(specialIcons);
|
||||
func_152125_a(x, y, 0, 224, 16, 16, iconRenderSize, iconRenderSize, 256, 256);
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
|
||||
x += iconRenderSize + 3;
|
||||
|
||||
@@ -83,7 +83,7 @@ public class GuiNPCGlobalMainMenu extends GuiNPCInterface2 {
|
||||
tagButton.setIconPos(24, 24, 192, 32).setIconTexture(specialIcons);
|
||||
|
||||
registerButton(effectsButton = new GuiNpcSquareButton(19, 0, 0, 20, "global.customeffects", 0xFF333333));
|
||||
effectsButton.setIconPos(24, 24, 192, 32).setIconTexture(specialIcons);
|
||||
effectsButton.setIconPos(24, 24, 24, 56).setIconTexture(specialIcons);
|
||||
|
||||
// Layout composite buttons optimally.
|
||||
layoutButtons();
|
||||
|
||||
@@ -83,7 +83,7 @@ public class GuiCNPCInventory extends GuiNPCInterface {
|
||||
|
||||
int effectBarX = guiLeft + xSize + 65;
|
||||
int effectBarY = guiTop + 10;
|
||||
int effectBarWidth = 24;
|
||||
int effectBarWidth = 20;
|
||||
int effectBarHeight = ySize;
|
||||
effectBar = new GuiEffectBar(effectBarX, effectBarY, effectBarWidth, effectBarHeight);
|
||||
}
|
||||
@@ -107,7 +107,7 @@ public class GuiCNPCInventory extends GuiNPCInterface {
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
|
||||
updateEffectBar();
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
if (effectBar != null) {
|
||||
if (!ConfigClient.HideEffectsBar && effectBar != null && !effectBar.entries.isEmpty()) {
|
||||
effectBar.drawScreen(mouseX, mouseY, partialTicks);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import noppes.npcs.client.gui.util.GuiNpcLabel;
|
||||
import noppes.npcs.client.gui.util.GuiNpcTextField;
|
||||
import noppes.npcs.client.gui.util.ITextfieldListener;
|
||||
import noppes.npcs.config.ConfigClient;
|
||||
import noppes.npcs.config.ConfigMain;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import tconstruct.client.tabs.AbstractTab;
|
||||
|
||||
@@ -77,6 +78,9 @@ public class GuiSettings extends GuiCNPCInventory implements ITextfieldListener,
|
||||
|
||||
y += 22;
|
||||
|
||||
this.addLabel(new GuiNpcLabel(8, "settings.effectsBar", guiLeft + 8, guiTop + 14 + y));
|
||||
this.addButton(new GuiNpcButton(8, guiLeft + 105, guiTop + 9 + y, 50, 20, new String[]{"gui.no", "gui.yes"}, ConfigClient.HideEffectsBar?1:0));
|
||||
|
||||
y += 22;
|
||||
|
||||
y += 22;
|
||||
@@ -154,6 +158,12 @@ public class GuiSettings extends GuiCNPCInventory implements ITextfieldListener,
|
||||
ConfigClient.BannerAlerts = button.getValue() == 1;
|
||||
ConfigClient.BannerAlertsProperty.set(ConfigClient.BannerAlerts);
|
||||
}
|
||||
if(button.id == 8){
|
||||
ConfigClient.HideEffectsBar = button.getValue() == 1;
|
||||
ConfigClient.HideEffectsBarProperty.set(ConfigClient.HideEffectsBar);
|
||||
}
|
||||
|
||||
ConfigClient.config.save();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import noppes.npcs.client.ClientCacheHandler;
|
||||
import noppes.npcs.client.renderer.ImageData;
|
||||
import noppes.npcs.controllers.data.CustomEffect;
|
||||
@@ -13,6 +14,8 @@ import org.lwjgl.opengl.GL11;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static noppes.npcs.client.gui.player.inventory.GuiCNPCInventory.specialIcons;
|
||||
|
||||
public class GuiEffectBar extends GuiScreen {
|
||||
public int x, y, width, height;
|
||||
public int scrollY = 0; // Tracks vertical scrolling
|
||||
@@ -77,6 +80,11 @@ public class GuiEffectBar extends GuiScreen {
|
||||
int texWidth = imageData.getTotalWidth();
|
||||
|
||||
func_152125_a(x + 2, drawY + 2, iconU, iconV, iconWidth, iconHeight, iconRenderSize, iconRenderSize, texWidth, texWidth);
|
||||
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
minecraft.getTextureManager().bindTexture(specialIcons);
|
||||
func_152125_a(x + 2, drawY + 2, 0, 224, 16, 16, iconRenderSize, iconRenderSize, 256, 256);
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
}
|
||||
|
||||
// If mouse hovers over this effect, save tooltip info
|
||||
|
||||
@@ -47,6 +47,9 @@ public class ConfigClient
|
||||
public static Property ChatBubblesFontTypeProperty;
|
||||
public static boolean ChatBubblesFontType = false;
|
||||
|
||||
public static Property HideEffectsBarProperty;
|
||||
public static boolean HideEffectsBar = false;
|
||||
|
||||
/**
|
||||
* Questing Properties
|
||||
**/
|
||||
@@ -127,6 +130,9 @@ public class ConfigClient
|
||||
ChatBubblesFontTypeProperty = config.get(VISUAL, "Chat Bubbles Font Type", false, "Enable the use of Custom Font for Chat Bubbles");
|
||||
ChatBubblesFontType = ChatBubblesFontTypeProperty.getBoolean(false);
|
||||
|
||||
HideEffectsBarProperty = config.get(VISUAL, "Hide Effects Bar", false, "Hides CNPC+ Inventory Effects Bar");
|
||||
HideEffectsBar = HideEffectsBarProperty.getBoolean(false);
|
||||
|
||||
// Questing
|
||||
TrackingInfoAlignmentProperty = config.get(QUESTING, "Tracking Info Alignment", 3, "Client sided! Determines where tracking quest info shows up on the screen based on a number from 0 to 8. Default: 3");
|
||||
TrackingInfoAlignment = TrackingInfoAlignmentProperty.getInt(3);
|
||||
|
||||
Reference in new issue
Block a user