Nice. Is it still 3D based or more like 2D blits?
Those screencaps are from the CanvasGUI, it's pure Java painting. Though the difference between that and the in game HUD system is minimal. The HUD system, which doesn't have default textures but I could easily write them into it and will be doing so soon, is 2D blitting, and the textures I use are almost identical to the images you see here but using a dynamic texture for printing text or painting onto. I used the regular Swing Canvas for most of the menus because of how light weight it is, but the beauty of it is that the canvas itself can have a backdrop, such as a shot from the GL rendering in some of the earlier screencaps.
It is all animated as well, menus "slide" into and out of view, on both the Canvas and the HUD, by only using a few lines of code, one single animation class, and animation "data" classes. I had to use ArrayLists for animation tracking, which ate up some memory, but there's no telling how many animations will be happening at any given moment so it was a necessary evil. That specific GUI is created with the following code, of course I have added more to it since I made those screencaps:
package app;
import java.awt.Color;
import kitt.com.jpct.tex.TextureStored;
import kitt.com.swing.canvas.CanvasButton;
import kitt.com.swing.canvas.CanvasGUI;
import kitt.com.swing.canvas.CanvasLabel;
import kitt.com.swing.canvas.CanvasVideo;
import kitt.com.swing.canvas.CanvasWidget;
import kitt.com.swing.canvas.anim.CanvasAnimationData;
import kitt.com.swing.canvas.data.CanvasImageFont;
import kitt.com.swing.canvas.kits.MenuKit;
import kitt.com.swing.canvas.kits.ToggleMenuKit;
import kitt.com.swing.canvas.kits.WidgetKits;
public class CanvasGUISystem {
public static final int MODE_CLEAR = 0;
public static final int MODE_VIDEO = 1;
public static final int MODE_MAIN = 2;
public static final int MODE_STATUS = 3;
public static final int MODE_MODES = 4;
public static final int MODE_AVATAR = 5;
public static final int MODE_SYSTEM = 6;
public static final int MODE_FILES = 6;
public static final int STATUS_AVATAR = 0;
public static final int STATUS_THREADS = 1;
public static final int STATUS_RAM = 2;
public static final int STATUS_STORAGE = 3;
public static final int STATUS_HARDENING = 4;
public static final int STATUS_SPEED = 5;
public static final int STATUS_USED_RAM = 6;
public static final int STATUS_USED_STORAGE = 7;
public static final int STATUS_USED_HARDENING = 8;
public static final int STATUS_COUNT = 9;
protected CanvasGUI canvas = null;
protected MenuKit mainmenu = null;
protected CanvasAnimationData mainmenuappear = null;
protected MenuKit statusmenu = null;
protected CanvasAnimationData statusmenuappear = null;
protected ToggleMenuKit modelist = null;
protected CanvasAnimationData modelistappear = null;
protected ToggleMenuKit programlist = null;
protected CanvasAnimationData programlistappear = null;
protected ToggleMenuKit filelist = null;
protected CanvasAnimationData filelistappear = null;
protected MenuKit filemenu = null;
protected CanvasAnimationData filemenuappear = null;
protected CanvasWidget statusparent = null;
protected CanvasLabel[] statusfields = null;
protected CanvasAnimationData statusappear = null;
protected CanvasLabel logo = null;
protected CanvasAnimationData logoappear = null;
protected CanvasVideo video = null;
protected TextureStored[] icons = null;
protected boolean[][] modestates = null;
protected int currentmode = -1;
protected Color availableprogram = new Color(0,255,255);
protected Color unavailableprogram = new Color(255,255,0);
protected Color foreground = new Color(0,255,0);
protected int guimode = 0;
public CanvasGUISystem(CanvasGUI canvas, TextureStored[] icons) {
this.canvas = canvas;
this.icons = icons;
CanvasGUI.DEFAULT_DISABLED = new Color(255,0,0,128);
CanvasGUI.DEFAULT_HOVER = new Color(0,255,0,128);
CanvasGUI.DEFAULT_PRESSED = new Color(0,0,255,128);
CanvasGUI.DEFAULT_FOREGROUND = this.foreground;
CanvasGUI.DEFAULT_BACKGROUND = CanvasGUI.HALFBLACK;
this.createGUI();
}
protected void createGUI() {
this.createLogo();
this.createMainMenu();
this.createModeList();
this.createProgramList();
this.createStatusMenu();
this.createStatus();
this.createFileMenu();
this.createFileList();
this.modestates = new boolean[this.modelist.options.length - 1][];
for(int i = 0; i < this.modestates.length; i++)
this.modestates[i] = new boolean[this.programlist.options.length];
CanvasButton button = new CanvasButton(null, "Return\nTo\nGame", 920, 689, 100, 75);
button.setID("Option-5");
this.canvas.addWidget(button);
this.video = new CanvasVideo(null, 50, 50, 924, 668);
this.video.setFlags(CanvasGUI.IMAGE_STRETCH | CanvasGUI.IMAGE_CENTER);
this.video.setVisible(false);
this.canvas.addWidget(this.video);
this.canvas.sortWidgets();
}
protected void createLogo() {
this.logo = new CanvasLabel(null, null, 262, 134, 500, 500);
this.logo.setFlags(CanvasGUI.SHOWTEXT | CanvasGUI.TEXT_CENTER | CanvasGUI.TEXT_MIDDLE | CanvasGUI.IMAGE_STRETCH);
this.logo.setZOrder(-1);
this.logo.setImageFont(new CanvasImageFont(CanvasGUI.IMAGEFONT, 1.5f));
this.logo.setName("Loading ...");
for(TextureStored image : this.icons)
if(image.getName().equals("icon-logo-full"))
this.logo.setImage(image.getImage());
this.canvas.addWidget(this.logo);
}
protected void createMainMenu() {
CanvasGUI.DEFAULT_FOREGROUND = this.foreground;
String[][] options = {
{"Game-Start", "Start"},
{"Game-Load", "Load"},
{"Game-Configure", "Settings"},
{"Game-Delete", "Delete"},
{"Game-Quit", "Quit"}
};
this.mainmenu = WidgetKits.makeMenu(this.canvas, "MainMenu",
null, 150, 40,
options, 5, -1);
this.mainmenu.parent.setLocation(512 - (this.mainmenu.parent.getSize().width / 2), 900);
this.mainmenu.parent.setVisible(false);
this.mainmenuappear = CanvasAnimationData.Create(0.0f, -200.0f, 0.05f, true);
}
protected void createStatusMenu() {
CanvasGUI.DEFAULT_FOREGROUND = this.foreground;
String[][] options = {
{"Status-Play", "Return"},
{"Status-Avatar", "Avatar"},
{"Status-Programs", "Programs"},
{"Status-Files", "Files"},
{"Status-System", "System"},
{"Status-Main", "Main Menu"}
};
this.statusmenu = WidgetKits.makeMenu(this.canvas, "MainMenu",
null, 175, 40,
options, 1, -1);
this.statusmenu.parent.setLocation(-this.statusmenu.parent.getSize().width, 50);
this.statusmenu.parent.setVisible(false);
this.statusmenuappear = CanvasAnimationData.Create(50 + this.statusmenu.parent.getSize().width, 0.0f, 0.05f, true);
}
protected void createStatus() {
CanvasGUI.DEFAULT_FOREGROUND = this.availableprogram;
this.statusparent = new CanvasWidget(null, 100 + this.statusmenu.parent.getSize().width, -500, 500, 500);
this.statusparent.setFlags(CanvasGUI.BORDER | CanvasGUI.FILL);
this.statusparent.setBackground(CanvasGUI.HALFBLACK);
this.statusparent.setForeground(new Color(128,255,128,128));
this.statusparent.setVisible(false);
this.canvas.addWidget(this.statusparent);
this.statusappear = CanvasAnimationData.Create(0.0f, 550.0f, 0.05f, true);
CanvasImageFont font = new CanvasImageFont(CanvasGUI.IMAGEFONT, 1.0f);
CanvasLabel label = new CanvasLabel(this.statusparent, "Avatar:", 10, 10, 230, 40);
label.setImageFont(font);
label.setFlags(CanvasGUI.TEXT_MIDDLE | CanvasGUI.TEXT_LEFT | CanvasGUI.SHOWTEXT);
this.canvas.addWidget(label);
label = new CanvasLabel(this.statusparent, "Threads:", 10, 90, 230, 40);
label.setImageFont(font);
label.setFlags(CanvasGUI.TEXT_MIDDLE | CanvasGUI.TEXT_LEFT | CanvasGUI.SHOWTEXT);
this.canvas.addWidget(label);
label = new CanvasLabel(this.statusparent, "RAM:", 10, 130, 230, 40);
label.setImageFont(font);
label.setFlags(CanvasGUI.TEXT_MIDDLE | CanvasGUI.TEXT_LEFT | CanvasGUI.SHOWTEXT);
this.canvas.addWidget(label);
label = new CanvasLabel(this.statusparent, "/", 340, 130, 20, 40);
label.setImageFont(font);
label.setFlags(CanvasGUI.TEXT_MIDDLE | CanvasGUI.TEXT_CENTER | CanvasGUI.SHOWTEXT);
this.canvas.addWidget(label);
label = new CanvasLabel(this.statusparent, "Storage:", 10, 170, 230, 40);
label.setImageFont(font);
label.setFlags(CanvasGUI.TEXT_MIDDLE | CanvasGUI.TEXT_LEFT | CanvasGUI.SHOWTEXT);
this.canvas.addWidget(label);
label = new CanvasLabel(this.statusparent, "/", 340, 170, 20, 40);
label.setImageFont(font);
label.setFlags(CanvasGUI.TEXT_MIDDLE | CanvasGUI.TEXT_CENTER | CanvasGUI.SHOWTEXT);
this.canvas.addWidget(label);
label = new CanvasLabel(this.statusparent, "Hardening:", 10, 210, 230, 40);
label.setImageFont(font);
label.setFlags(CanvasGUI.TEXT_MIDDLE | CanvasGUI.TEXT_LEFT | CanvasGUI.SHOWTEXT);
this.canvas.addWidget(label);
label = new CanvasLabel(this.statusparent, "/", 340, 210, 20, 40);
label.setImageFont(font);
label.setFlags(CanvasGUI.TEXT_MIDDLE | CanvasGUI.TEXT_CENTER | CanvasGUI.SHOWTEXT);
this.canvas.addWidget(label);
label = new CanvasLabel(this.statusparent, "Speed:", 10, 250, 230, 40);
label.setImageFont(font);
label.setFlags(CanvasGUI.TEXT_MIDDLE | CanvasGUI.TEXT_LEFT | CanvasGUI.SHOWTEXT);
this.canvas.addWidget(label);
this.statusfields = new CanvasLabel[CanvasGUISystem.STATUS_COUNT];
for(int i = 0; i < CanvasGUISystem.STATUS_COUNT; i++) {
if(i == 0) {
this.statusfields[i] = new CanvasLabel(this.statusparent, "Shiva", 100, 50, 360, 40);
this.statusfields[i].setFlags(CanvasGUI.TEXT_MIDDLE | CanvasGUI.TEXT_RIGHT | CanvasGUI.SHOWTEXT);
} else if(i < CanvasGUISystem.STATUS_USED_RAM) {
this.statusfields[i] = new CanvasLabel(this.statusparent, "000", 240, 50 + (i * 40), 100, 40);
this.statusfields[i].setFlags(CanvasGUI.TEXT_MIDDLE | CanvasGUI.TEXT_RIGHT | CanvasGUI.SHOWTEXT);
} else {
this.statusfields[i] = new CanvasLabel(this.statusparent, "000", 360, 130 + ((i - CanvasGUISystem.STATUS_USED_RAM) * 40), 100, 40);
this.statusfields[i].setFlags(CanvasGUI.TEXT_MIDDLE | CanvasGUI.TEXT_LEFT | CanvasGUI.SHOWTEXT);
}
this.statusfields[i].setImageFont(font);
this.canvas.addWidget(this.statusfields[i]);
}
}
protected void createProgramList() {
CanvasGUI.DEFAULT_FOREGROUND = this.availableprogram;
String[][] options = {
{"Program-0", "Buffer"},
{"Program-1", "Clone"},
{"Program-2", "Crash Bomb"},
{"Program-3", "Decode"},
{"Program-4", "Deflector"},
{"Program-5", "Firewall"},
{"Program-6", "Mask"},
{"Program-7", "Slicer"},
{"Program-8", "Spy Bot"},
{"Program-9", "Torrent"}
};
String[] iconname = {
"icon-buffer",
"icon-clone",
"icon-crash-bomb",
"icon-decode",
"icon-deflector",
"icon-firewall",
"icon-mask",
"icon-slicer",
"icon-spy-bot",
"icon-torrent"
};
this.programlist = WidgetKits.makeToggleMenu(this.canvas, "ProgramList",
null, 200, 40,
options, 2, CanvasGUI.HEXAGONAL | CanvasGUI.BORDER | CanvasGUI.SHOWTEXT |
CanvasGUI.TEXT_RIGHT | CanvasGUI.TEXT_MIDDLE | CanvasGUI.FILL | CanvasGUI.IMAGE_STRETCH);
this.programlist.parent.setLocation(100 + this.modelist.parent.getSize().width, -this.programlist.parent.getSize().height);
this.programlist.parent.setVisible(false);
for (int i = 0; i < this.programlist.options.length; i++) {
TextureStored icon = null;
for(int ic = 0; ic < this.icons.length && icon == null; ic++)
if(this.icons[ic].getName().equals(iconname[i]))
icon = this.icons[ic];
if(icon != null)
this.programlist.options[i].setImage(icon.getImage());
}
this.programlistappear = CanvasAnimationData.Create(0.0f, this.modelist.parent.getY() + this.programlist.parent.getSize().height, 0.05f, true);
}
protected void createFileList() {
CanvasGUI.DEFAULT_FOREGROUND = this.availableprogram;
String[][] options = new String[45][];
for(int i = 0; i < options.length; i++) {
options[i] = new String[2];
options[i][0] = "File-" + i;
options[i][1] = "File (" + (i * 10) + ")";
}
this.filelist = WidgetKits.makeToggleMenu(this.canvas, "FileList",
null, 250, 40,
options, 3, CanvasGUI.HEXAGONAL | CanvasGUI.BORDER | CanvasGUI.SHOWTEXT |
CanvasGUI.TEXT_RIGHT | CanvasGUI.TEXT_MIDDLE | CanvasGUI.FILL | CanvasGUI.IMAGE_STRETCH);
this.filelist.parent.setLocation(100 + this.filemenu.parent.getSize().width, -this.filelist.parent.getSize().height);
this.filelist.parent.setVisible(false);
this.filelist.parent.setSingleToggle(true);
this.filelistappear = CanvasAnimationData.Create(0.0f, this.filemenu.parent.getY() + this.filelist.parent.getSize().height, 0.05f, true);
}
protected void createModeList() {
CanvasGUI.DEFAULT_FOREGROUND = this.foreground;
String[][] options = {
{"Mode-0", "Attacker"},
{"Mode-1", "Defender"},
{"Mode-2", "Stealth"},
{"Mode-3", "Interrogator"},
{"Mode-4", "Ripper"},
{"Mode-5", "Tank"},
{"Mode-6", "Worm"},
{"Mode-7", "Balance"},
{"Mode-8", "Spy Bot"},
{"Mode-9", "Back"}
};
this.modelist = WidgetKits.makeToggleMenu(this.canvas, "ModeList",
null, 150, 40,
options, 1, CanvasGUI.HEXAGONAL | CanvasGUI.BORDER | CanvasGUI.SHOWTEXT |
CanvasGUI.TEXT_CENTER | CanvasGUI.TEXT_MIDDLE | CanvasGUI.FILL | CanvasGUI.IMAGE_STRETCH);
this.modelist.parent.setLocation(-this.modelist.parent.getSize().width, 50);
this.modelist.parent.setVisible(false);
this.modelist.parent.setSingleToggle(true);
this.modelistappear = CanvasAnimationData.Create(50.0f + this.modelist.parent.getSize().width, 0.0f, 0.05f, true);
}
protected void createFileMenu() {
CanvasGUI.DEFAULT_FOREGROUND = this.foreground;
String[][] options = {
{"FileAct-PgUp", "< Page"},
{"FileAct-PgDn", "Page >"},
{"FileAct-View", "View"},
{"FileAct-Delete", "Delete"},
{"FileAct-Upload", "Upload"},
{"FileAct-Back", "Back"}
};
this.filemenu = WidgetKits.makeMenu(this.canvas, "FileMenu",
null, 150, 40,
options, 1, CanvasGUI.HEXAGONAL | CanvasGUI.BORDER | CanvasGUI.SHOWTEXT |
CanvasGUI.TEXT_CENTER | CanvasGUI.TEXT_MIDDLE | CanvasGUI.FILL | CanvasGUI.IMAGE_STRETCH);
this.filemenu.parent.setLocation(-this.filemenu.parent.getSize().width, 50);
this.filemenu.parent.setVisible(false);
this.filemenuappear = CanvasAnimationData.Create(50.0f + this.filemenu.parent.getSize().width, 0.0f, 0.05f, true);
}
public void mainMenu(String comm) {
if(comm.equals("Game-Start")) {
this.changeGUI(CanvasGUISystem.MODE_STATUS);
} else if(comm.equals("Game-Load")) {
} else if(comm.equals("Game-Delete")) {
}
}
public void fileMenu(String comm) {
if(comm.equals("FileAct-View")) {
} else if(comm.equals("FileAct-PgUp")) {
} else if(comm.equals("FileAct-PgDn")) {
} else if(comm.equals("FileAct-Delete")) {
} else if(comm.equals("FileAct-Upload")) {
} else if(comm.equals("FileAct-Back")) {
this.changeGUI(CanvasGUISystem.MODE_STATUS);
this.filelist.parent.allOffExcept(null);
}
}
public void statusMenu(String comm) {
if(comm.equals("Status-Avatar")) {
} else if(comm.equals("Status-Programs")) {
this.changeGUI(CanvasGUISystem.MODE_MODES);
} else if(comm.equals("Status-System")) {
// this.changeGUI(CanvasGUISystem.MODE_SYSTEM);
} else if(comm.equals("Status-Files")) {
this.changeGUI(CanvasGUISystem.MODE_FILES);
} else if(comm.equals("Status-Main")) {
this.changeGUI(CanvasGUISystem.MODE_MAIN);
}
}
public void updateGUI() {
this.logo.setVisible(
(this.guimode != CanvasGUISystem.MODE_VIDEO)
);
this.video.setVisible(
(this.guimode == CanvasGUISystem.MODE_VIDEO)
);
if(this.guimode== CanvasGUISystem.MODE_CLEAR || this.guimode == CanvasGUISystem.MODE_VIDEO) {
if(this.modelist.parent.isVisible())
this.canvas.animate(this.modelist.parent, this.modelistappear, true);
if(this.programlist.parent.isVisible())
this.canvas.animate(this.programlist.parent, this.programlistappear, true);
if(this.mainmenu.parent.isVisible())
this.canvas.animate(this.mainmenu.parent, this.mainmenuappear, true);
if(this.statusmenu.parent.isVisible())
this.canvas.animate(this.statusmenu.parent, this.statusmenuappear, true);
if(this.statusparent.isVisible())
this.canvas.animate(this.statusparent, this.statusappear, true);
if(this.filelist.parent.isVisible())
this.canvas.animate(this.filelist.parent, this.filelistappear, true);
if(this.filemenu.parent.isVisible())
this.canvas.animate(this.filemenu.parent, this.filemenuappear, true);
} else if(this.guimode == CanvasGUISystem.MODE_FILES) {
if(this.modelist.parent.isVisible())
this.canvas.animate(this.modelist.parent, this.modelistappear, true);
if(this.programlist.parent.isVisible())
this.canvas.animate(this.programlist.parent, this.programlistappear, true);
if(this.mainmenu.parent.isVisible())
this.canvas.animate(this.mainmenu.parent, this.mainmenuappear, true);
if(this.statusmenu.parent.isVisible())
this.canvas.animate(this.statusmenu.parent, this.statusmenuappear, true);
if(this.statusparent.isVisible())
this.canvas.animate(this.statusparent, this.statusappear, true);
if(!this.filelist.parent.isVisible())
this.canvas.animate(this.filelist.parent, this.filelistappear, false);
if(!this.filemenu.parent.isVisible())
this.canvas.animate(this.filemenu.parent, this.filemenuappear, false);
} else if(this.guimode == CanvasGUISystem.MODE_SYSTEM) {
if(this.modelist.parent.isVisible())
this.canvas.animate(this.modelist.parent, this.modelistappear, true);
if(this.programlist.parent.isVisible())
this.canvas.animate(this.programlist.parent, this.programlistappear, true);
if(this.statusmenu.parent.isVisible())
this.canvas.animate(this.statusmenu.parent, this.statusmenuappear, true);
if(this.mainmenu.parent.isVisible())
this.canvas.animate(this.mainmenu.parent, this.mainmenuappear, true);
if(this.statusparent.isVisible())
this.canvas.animate(this.statusparent, this.statusappear, true);
if(this.filelist.parent.isVisible())
this.canvas.animate(this.filelist.parent, this.filelistappear, true);
if(this.filemenu.parent.isVisible())
this.canvas.animate(this.filemenu.parent, this.filemenuappear, true);
} else if(this.guimode == CanvasGUISystem.MODE_MAIN) {
if(this.modelist.parent.isVisible())
this.canvas.animate(this.modelist.parent, this.modelistappear, true);
if(this.programlist.parent.isVisible())
this.canvas.animate(this.programlist.parent, this.programlistappear, true);
if(this.statusmenu.parent.isVisible())
this.canvas.animate(this.statusmenu.parent, this.statusmenuappear, true);
if(this.statusparent.isVisible())
this.canvas.animate(this.statusparent, this.statusappear, true);
if(this.filelist.parent.isVisible())
this.canvas.animate(this.filelist.parent, this.filelistappear, true);
if(this.filemenu.parent.isVisible())
this.canvas.animate(this.filemenu.parent, this.filemenuappear, true);
if(!this.mainmenu.parent.isVisible())
this.canvas.animate(this.mainmenu.parent, this.mainmenuappear, false);
} else if(this.guimode == CanvasGUISystem.MODE_STATUS) {
if(this.modelist.parent.isVisible())
this.canvas.animate(this.modelist.parent, this.modelistappear, true);
if(this.programlist.parent.isVisible())
this.canvas.animate(this.programlist.parent, this.programlistappear, true);
if(this.mainmenu.parent.isVisible())
this.canvas.animate(this.mainmenu.parent, this.mainmenuappear, true);
if(this.filelist.parent.isVisible())
this.canvas.animate(this.filelist.parent, this.filelistappear, true);
if(this.filemenu.parent.isVisible())
this.canvas.animate(this.filemenu.parent, this.filemenuappear, true);
if(!this.statusmenu.parent.isVisible())
this.canvas.animate(this.statusmenu.parent, this.statusmenuappear, false);
if(!this.statusparent.isVisible())
this.canvas.animate(this.statusparent, this.statusappear, false);
} else if(this.guimode == CanvasGUISystem.MODE_AVATAR) {
if(this.modelist.parent.isVisible())
this.canvas.animate(this.modelist.parent, this.modelistappear, true);
if(this.programlist.parent.isVisible())
this.canvas.animate(this.programlist.parent, this.programlistappear, true);
if(this.mainmenu.parent.isVisible())
this.canvas.animate(this.mainmenu.parent, this.mainmenuappear, true);
if(this.statusmenu.parent.isVisible())
this.canvas.animate(this.statusmenu.parent, this.statusmenuappear, true);
if(this.statusparent.isVisible())
this.canvas.animate(this.statusparent, this.statusappear, true);
if(this.filelist.parent.isVisible())
this.canvas.animate(this.filelist.parent, this.filelistappear, true);
if(this.filemenu.parent.isVisible())
this.canvas.animate(this.filemenu.parent, this.filemenuappear, true);
} else if(this.guimode == CanvasGUISystem.MODE_MODES) {
if(!this.modelist.parent.isVisible())
this.canvas.animate(this.modelist.parent, this.modelistappear, false);
if(!this.programlist.parent.isVisible())
this.canvas.animate(this.programlist.parent, this.programlistappear, false);
if(this.filelist.parent.isVisible())
this.canvas.animate(this.filelist.parent, this.filelistappear, true);
if(this.filemenu.parent.isVisible())
this.canvas.animate(this.filemenu.parent, this.filemenuappear, true);
if(this.mainmenu.parent.isVisible())
this.canvas.animate(this.mainmenu.parent, this.mainmenuappear, true);
if(this.statusmenu.parent.isVisible())
this.canvas.animate(this.statusmenu.parent, this.statusmenuappear, true);
if(this.statusparent.isVisible())
this.canvas.animate(this.statusparent, this.statusappear, true);
}
}
public void changeGUI(int mode) {
this.guimode = mode;
this.updateGUI();
}
public void setLogo(String label) {
this.logo.setName(label);
}
public void synchModeList(HUDSystem hud) {
for(int i = 0; i < this.modelist.options.length; i++) {
hud.setModeLabel("ModeSet-" + i, this.modelist.options[i].getName());
}
}
public boolean[][] getModeStates() {
return this.modestates;
}
public void setMode() {
int modeindex = -1;
for(int i = 0; i < this.modelist.options.length && modeindex == -1; i++)
if(this.modelist.options[i].isToggled())
modeindex = i;
this.currentmode = modeindex;
if(modeindex != -1) {
if(modeindex == 9) {
this.modelist.options[9].setToggled(false);
this.changeGUI(CanvasGUISystem.MODE_STATUS);
} else
for(int i = 0; i < this.programlist.options.length; i++)
this.programlist.options[i].setToggled(this.modestates[modeindex][i]);
}
}
public void setProgram(String name) {
if(this.currentmode != -1) {
int progindex = -1;
for(int i = 0; i < this.programlist.options.length && progindex == -1; i++)
if(this.programlist.options[i].getID().equals(name))
progindex = i;
if(progindex != -1) {
this.modestates[this.currentmode][progindex] = this.programlist.options[progindex].isToggled();
}
}
}
public void playMovie(String movie) {
this.video.playMovie(movie);
this.changeGUI(CanvasGUISystem.MODE_VIDEO);
}
public boolean isMovieDone() {
return this.video.isDone();
}
public void endMovie() {
if(this.video.isPlaying()) {
this.video.endPlaying();
this.changeGUI(CanvasGUISystem.MODE_STATUS);
}
}
public void setMoviePause(boolean pause) {
this.video.setPause(pause);
}
}
Also, if you sign up for the wiki I have, I'll make you a contributor immediately since my game library depends a lot on jPCT.
I also figured out how to add texture "melting" to objects using the polygon manager. It's a pretty nifty effect, considering working on more such effects. It switches to a texture one polygon at a time based on the time passage, I'll post that class after I submit this.