mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-13 03:07:34 +00:00
Fixes and tweaks
This commit is contained in:
1 parent
8b92c04c45
commit
435ff3f5de
6 files changed
+23
-15
No files matched your search
@@ -43,7 +43,7 @@ public class GuiUtil {
|
||||
drawRectD(x, startY + 1, x + 1, endY, color);
|
||||
}
|
||||
|
||||
public static void drawRectD(double left, double top, double right, double bottom, int color) {
|
||||
public static void drawRectD(double left, double top, double right, double bottom) {
|
||||
double j1;
|
||||
|
||||
if (left < right) {
|
||||
@@ -58,15 +58,10 @@ public class GuiUtil {
|
||||
bottom = j1;
|
||||
}
|
||||
|
||||
float f3 = (float) (color >> 24 & 255) / 255.0F;
|
||||
float f = (float) (color >> 16 & 255) / 255.0F;
|
||||
float f1 = (float) (color >> 8 & 255) / 255.0F;
|
||||
float f2 = (float) (color & 255) / 255.0F;
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glColor4f(f, f1, f2, 1);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.addVertex(left, bottom, 0.0D);
|
||||
tessellator.addVertex(right, bottom, 0.0D);
|
||||
@@ -77,6 +72,16 @@ public class GuiUtil {
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
}
|
||||
|
||||
|
||||
public static void drawRectD(double left, double top, double right, double bottom, int color) {
|
||||
float f3 = (float) (color >> 24 & 255) / 255.0F;
|
||||
float f = (float) (color >> 16 & 255) / 255.0F;
|
||||
float f1 = (float) (color >> 8 & 255) / 255.0F;
|
||||
float f2 = (float) (color & 255) / 255.0F;
|
||||
GL11.glColor4f(f, f1, f2, f3);
|
||||
drawRectD(left, top, right, bottom);
|
||||
}
|
||||
|
||||
public static void drawGradientRect(int left, int top, int right, int bottom, int startColor, int endColor) {
|
||||
double zLevel = 0;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ public class AnimationGraphEditor extends ViewportGraphEditor {
|
||||
|
||||
public void initGui(int startX, int startY, int endX, int endY) {
|
||||
super.initGui(startX, startY, endX, endY);
|
||||
frameTypePanel.initGui(startX - 60, startY, startX, endY);
|
||||
frameTypePanel.initGui(startX - 70, startY, startX, endY);
|
||||
}
|
||||
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks, int wheel) {
|
||||
|
||||
@@ -154,11 +154,11 @@ public class OverlayKeyPresetViewer {
|
||||
totalHeight += element.getHeight();
|
||||
|
||||
totalHeight -= yStartSpacing;
|
||||
scroll.maxScroll = Math.max(0, totalHeight - height);
|
||||
|
||||
heightFactor = height / totalHeight;
|
||||
scrollbarHeight = Math.max((int) (height * heightFactor), 20);
|
||||
scrollFactor = (height - yStartSpacing - scrollbarHeight) / maxScroll;
|
||||
|
||||
scroll.maxScroll = Math.max(0, totalHeight - height);
|
||||
}
|
||||
|
||||
public void update(int wheel) {
|
||||
|
||||
@@ -12,7 +12,7 @@ public class PanelFrameType {
|
||||
|
||||
public int startX, startY, endX, endY, width, height;
|
||||
public float scale = 0.6f;
|
||||
public int elementHeight = 12, elementSpacing = 3;
|
||||
public int elementHeight = 10, elementSpacing = 2;
|
||||
|
||||
public LinkedList<Element> list = new LinkedList<>();
|
||||
|
||||
@@ -33,9 +33,10 @@ public class PanelFrameType {
|
||||
}
|
||||
|
||||
public void draw() {
|
||||
// GuiUtil.drawRectD(startX,startY,endX,endY, 0xffffffff);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(startX, startY, 0);
|
||||
GuiUtil.drawRectD(0, 0, width, 6 * (elementHeight + elementSpacing)-2, 0x77000000);
|
||||
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
Element element = list.get(i);
|
||||
@@ -76,14 +77,16 @@ public class PanelFrameType {
|
||||
float offsetY = index * (elementHeight + elementSpacing) / 1;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0, offsetY, 0);
|
||||
GuiUtil.drawRectD(0, 0, width / 1, (elementHeight) / 1, 0x0);
|
||||
GuiUtil.drawRectD(0, 0, 3 / 1, (elementHeight) / 1, type.color);
|
||||
GuiUtil.drawRectD(0, 0, width - 1, elementHeight, 0xaa000000); //type black bg
|
||||
|
||||
type.getColor().glColor();
|
||||
GuiUtil.drawRectD(0, 0, 3, elementHeight); //type color
|
||||
|
||||
GL11.glScalef(scale, scale, 1);
|
||||
|
||||
GL11.glTranslatef(0, elementHeight / 2, 0);
|
||||
String name = String.format("%s", type.toString());
|
||||
graph.getFontRenderer().drawString(name, 6, 0, 0xffffff);
|
||||
graph.getFontRenderer().drawString(name, 7, 0, 0xffffff);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package noppes.npcs.constants.animation;
|
||||
import noppes.npcs.client.utils.Color;
|
||||
|
||||
public enum EnumFrameType {
|
||||
ROTATION_X(0xff3352), ROTATION_Y(0x8bdc00), ROTATION_Z(0x2890ff), PIVOT_X(0xff3352), PIVOT_Y(0x8bdc00), PIVOT_Z(0x2890ff);
|
||||
ROTATION_X(0xffff3352), ROTATION_Y(0xff8bdc00), ROTATION_Z(0xff2890ff), PIVOT_X(0xffff3352), PIVOT_Y(0xff8bdc00), PIVOT_Z(0xff2890ff);
|
||||
|
||||
public int color;
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 9.9 KiB |
Reference in new issue
Block a user