Removed backVisible field from CustomImageObject
Updated new instance creations of GuiEntryListEntry whose constructor changed in last commit
This commit is contained in:
@@ -54,7 +54,7 @@ public class GuiKeyframeRepository extends GuiScreen implements GuiReplayOverlay
|
||||
if(!initialized) {
|
||||
screenTitle = I18n.format("replaymod.gui.keyframerepository.title");
|
||||
|
||||
keyframeSetList = new GuiEntryList<KeyframeSet>(GuiConstants.KEYFRAME_REPOSITORY_LIST, mc.fontRendererObj,
|
||||
keyframeSetList = new GuiEntryList<KeyframeSet>(mc.fontRendererObj,
|
||||
0, 45, 0, h);
|
||||
|
||||
for(KeyframeSet set : keyframeRepository)
|
||||
|
||||
@@ -95,7 +95,7 @@ public class GuiConnectPart extends GuiStudioPart {
|
||||
@Override
|
||||
public void initGui() {
|
||||
if(!initialized) {
|
||||
concatList = new GuiEntryList<GuiEntryListStringEntry>(1, fontRendererObj, 30, yPos, 150, 0);
|
||||
concatList = new GuiEntryList<GuiEntryListStringEntry>(fontRendererObj, 30, yPos, 150, 0);
|
||||
filesToConcat = new ArrayList<GuiEntryListStringEntry>();
|
||||
String selectedName = FilenameUtils.getBaseName(GuiReplayEditor.instance.getSelectedFile().getAbsolutePath());
|
||||
filesToConcat.add(new GuiEntryListStringEntry(selectedName));
|
||||
|
||||
@@ -15,19 +15,17 @@ import java.io.IOException;
|
||||
|
||||
public class CustomImageObject implements GuiEntryListEntry {
|
||||
|
||||
public CustomImageObject(Position position, String name, final File imageSource, boolean backVisible) throws IOException {
|
||||
public CustomImageObject(Position position, String name, final File imageSource) throws IOException {
|
||||
|
||||
this.position = new ExtendedPosition(RoundUtils.round(position.getX()), RoundUtils.round(position.getY()), RoundUtils.round(position.getZ()), 0, 0);
|
||||
|
||||
this.name = name;
|
||||
this.backVisible = backVisible;
|
||||
|
||||
setImageFile(imageSource);
|
||||
}
|
||||
|
||||
@Getter @Setter private ExtendedPosition position;
|
||||
@Getter @Setter private String name;
|
||||
@Getter @Setter private boolean backVisible;
|
||||
@Getter private File imageFile;
|
||||
|
||||
public void setImageFile(final File imageSource) throws IOException {
|
||||
|
||||
@@ -78,7 +78,11 @@ public class CustomObjectRenderer {
|
||||
GlStateManager.rotate(objectPosition.getRoll(), 0, 0, 1);
|
||||
GlStateManager.rotate(objectPosition.getPitch(), 1, 0, 0);
|
||||
|
||||
renderer.setColorRGBA_F(1, 1, 1, 0.5f);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
float opacity = objectPosition.getOpacity();
|
||||
GlStateManager.color(1, 1, 1, opacity);
|
||||
|
||||
float width = objectPosition.getWidth() * objectPosition.getScale();
|
||||
float height = objectPosition.getHeight() * objectPosition.getScale();
|
||||
@@ -95,12 +99,10 @@ public class CustomObjectRenderer {
|
||||
renderer.addVertexWithUV(maxX, maxY, 0, 0, 0);
|
||||
renderer.addVertexWithUV(maxX, minY, 0, 0, 1);
|
||||
|
||||
if(customImageObject.isBackVisible()) {
|
||||
renderer.addVertexWithUV(maxX, maxY, 0, 0, 0);
|
||||
renderer.addVertexWithUV(minX, maxY, 0, 1, 0);
|
||||
renderer.addVertexWithUV(minX, minY, 0, 1, 1);
|
||||
renderer.addVertexWithUV(maxX, minY, 0, 0, 1);
|
||||
}
|
||||
renderer.addVertexWithUV(maxX, maxY, 0, 0, 0);
|
||||
renderer.addVertexWithUV(minX, maxY, 0, 1, 0);
|
||||
renderer.addVertexWithUV(minX, minY, 0, 1, 1);
|
||||
renderer.addVertexWithUV(maxX, minY, 0, 0, 1);
|
||||
|
||||
tessellator.draw();
|
||||
renderer.setTranslation(0, 0, 0);
|
||||
|
||||
Reference in New Issue
Block a user