GUIButton resetButton;
gui.useAlphaMouseOver = false;
GUIButton button;
GUIToggle toggle;
String LANGUAGE = SETTINGS.LANGUAGE;
String TOOL_NAME = null;
//GUIPanel filePanel = new GUIPanel(5,3,37f,340f);
//filePanel.setLabel("file");
GUIPanel toolPanel = new GUIPanel(10, 15, 42f, 390f, gui);
GUIPanel cameraPanel = new GUIPanel(65f, 15, 115, 87, gui);
cameraPanel.setLabel("camera");
GUIPanel physicsPanel = new GUIPanel(65f, 110f, 115, 95, gui);
physicsPanel.setLabel("physics");
GLOBAL.environments.setupGUI(GLOBAL.gui, GLOBAL.applet);
GLOBAL.planesWidget.setupGUI(GLOBAL.applet, GLOBAL.gui);
GLOBAL.loadWidget.setupGUI(GLOBAL.applet, GLOBAL.gui);
GLOBAL.widgetMaterials.setupGUI(GLOBAL.applet, GLOBAL.gui);
GLOBAL.environments.panel.docTo(GLOBAL.slicesWidget.panel);
GLOBAL.loadWidget.panel.docTo(GLOBAL.environments.panel);
GLOBAL.widgetMaterials.panel.docTo(GLOBAL.loadWidget.panel);
//cameraPanel.autoHide = true;
//physicsPanel.autoHide = true;
//filePanel.autoHide = true;
gui.add(toolPanel);
gui.add(cameraPanel);
gui.add(physicsPanel);
button = new GUIButton(posX, posY, "proButtons/GUI_DRAW_TOOL_UP.png",
"proButtons/GUI_DRAW_TOOL_DOWN.png", gui);
button.addActionListener(GLOBAL.uiTools.SketchTools, "selectTool",
SketchTools.DRAW_TOOL);
button.addToolTip(GLOBAL.applet, "proButtons/GUI_DRAW_TOOLTIP",
LANGUAGE);
gui.add(button);
posY += 30;
toolPanel.placeComponent(button);
button = new GUIButton(posX, posY, "proButtons/GUI_LEG_TOOL_UP.png",
"proButtons/GUI_LEG_TOOL_DOWN.png", gui);
button.addActionListener(GLOBAL.uiTools.SketchTools, "selectTool",
SketchTools.LEG_TOOL);
//button.addToolTip(GLOBAL.applet,"proButtons/GUI_LEG_TOOLTIP", LANGUAGE);
gui.add(button);
posY += 30;
toolPanel.placeComponent(button);
button = new GUIButton(posX, posY, "proButtons/GUI_SELECT_TOOL_UP.png",
"proButtons/GUI_SELECT_TOOL_DOWN.png", gui);
button.addActionListener(GLOBAL.uiTools.SketchTools, "selectTool",
SketchTools.SELECT_TOOL);
button.addToolTip(GLOBAL.applet, "proButtons/GUI_SELECT_TOOLTIP",
LANGUAGE);
gui.add(button);
posY += 30;
toolPanel.placeComponent(button);
button = new GUIButton(posX, posY, "proButtons/GUI_DRAW_PATH_UP.png",
"proButtons/GUI_DRAW_PATH_DOWN.png", gui);
button.addActionListener(GLOBAL.uiTools.SketchTools, "selectTool",
SketchTools.DRAW_PATH_TOOL);
button.addToolTip(GLOBAL.applet, "proButtons/GUI_DRAW_PATH_TOOLTIP",
LANGUAGE);
gui.add(button);
posY += 30;
toolPanel.placeComponent(button);
button = new GUIButton(posX, posY,
"proButtons/GUI_SELECT_BEZIER_UP.png",
"proButtons/GUI_SELECT_BEZIER_DOWN.png", gui);
button.addActionListener(GLOBAL.uiTools.SketchTools, "selectTool",
SketchTools.SELECT_BEZIER_TOOL);
button.addToolTip(GLOBAL.applet,
"proButtons/GUI_SELECT_BEZIER_TOOLTIP", LANGUAGE);
gui.add(button);
posY += 30;
toolPanel.placeComponent(button);
button = new GUIButton(posX, posY,
"proButtons/GUI_MEASURE_TOOL_UP.png",
"proButtons/GUI_MEASURE_TOOL_DOWN.png", gui);
button.addActionListener(GLOBAL.uiTools, "selectTool",
UITools.MEASURE_TOOL);
button.addToolTip(GLOBAL.applet, "proButtons/GUI_MEASURE_TOOLTIP",
LANGUAGE);
gui.add(button);
posY += 30;
toolPanel.placeComponent(button);
button = new GUIButton(posX, posY, "proButtons/GUI_ZOOM_TOOL_UP.png",
"proButtons/GUI_ZOOM_TOOL_DOWN.png", gui);
button.addActionListener(GLOBAL.uiTools, "selectTool",
UITools.ZOOM_CAM_TOOL);
button.addToolTip(GLOBAL.applet, "proButtons/GUI_ZOOM_TOOLTIP",
LANGUAGE);
gui.add(button);
posY += 30;
cameraPanel.placeComponent(button);
button = new GUIButton(posX, posY, "proButtons/GUI_ROTATE_TOOL_UP.png",
"proButtons/GUI_ROTATE_TOOL_DOWN.png", gui);
button.addActionListener(GLOBAL.uiTools, "selectTool",
UITools.ROTATE_CAM_TOOL);
button.addToolTip(GLOBAL.applet, "proButtons/GUI_ZOOM_TOOLTIP",
LANGUAGE);
gui.add(button);
posY += 30;
cameraPanel.placeComponent(button);
button = new GUIButton(posX, posY, "proButtons/GUI_CAMERA_MOVE_UP.png",
"proButtons/GUI_CAMERA_MOVE_DOWN.png", gui);
button.addActionListener(GLOBAL.uiTools, "selectTool",
UITools.MOVE_CAM_TOOL);
button.addToolTip(GLOBAL.applet, "proButtons/GUI_MOVE_CAM_TOOLTIP",
LANGUAGE);
gui.add(button);
posY += 30;
cameraPanel.placeComponent(button);
button = new GUIButton(posX, posY,
"proButtons/GUI_CAM_JUMP_FRONT_UP.png",
"proButtons/GUI_CAM_JUMP_FRONT_DOWN.png", gui);
button.addActionListener(GLOBAL.uiTools, "camJumpFront",
UITools.MOVE_CAM_TOOL);
button.addToolTip(GLOBAL.applet, "proButtons/GUI_MOVE_OBJECT_TOOLTIP",
LANGUAGE);
gui.add(button);
posY += 30;
cameraPanel.placeComponent(button);
button = new GUIButton(posX, posY,
"proButtons/GUI_CAM_JUMP_SIDE_UP.png",
"proButtons/GUI_CAM_JUMP_SIDE_DOWN.png", gui);
button.addActionListener(GLOBAL.uiTools, "camJumpSide",
UITools.MOVE_CAM_TOOL);
button.addToolTip(GLOBAL.applet,
"proButtons/GUI_CAM_JUMP_SIDE_TOOLTIP", LANGUAGE);
gui.add(button);
posY += 30;
cameraPanel.placeComponent(button);
button = new GUIButton(posX, posY,
"proButtons/GUI_CAM_JUMP_TOP_UP.png",
"proButtons/GUI_CAM_JUMP_TOP_DOWN.png", gui);
button.addActionListener(GLOBAL.uiTools, "camJumpTop",
UITools.MOVE_CAM_TOOL);
button.addToolTip(GLOBAL.applet, "proButtons/GUI_CAM_JUMP_TOP_TOOLTIP",
LANGUAGE);
gui.add(button);
posY += 30;
cameraPanel.placeComponent(button);
//PHYSICS controls
physicsToggle = new GUIToggle(posX, posY,
"proButtons/GUI_PHYSICS_START_UP.png",
"proButtons/GUI_PHYSICS_START_DOWN.png", gui);
physicsToggle.addActionListener(GLOBAL.uiTools, "physicsPlay",
UITools.MOVE_CAM_TOOL);
physicsToggle.addToolTip(GLOBAL.applet,
"proButtons/GUI_PHYSICS_START_TOOLTIP", LANGUAGE);
physicsToggle.addLinkedVal(gui.physics_on);
gui.add(physicsToggle);
posY += 30;
physicsPanel.placeComponent(physicsToggle);
//PHYSICS controls
button = new GUIButton(posX, posY,
"proButtons/GUI_PHYSICS_PAUSE_UP.png",
"proButtons/GUI_PHYSICS_PAUSE_DOWN.png", gui);
button.addActionListener(GLOBAL.uiTools, "physicsPause",
UITools.MOVE_CAM_TOOL);
button.addToolTip(GLOBAL.applet,
"proButtons/GUI_PHYSICS_PAUSE_TOOLTIP", LANGUAGE);
gui.add(button);
posY += 30;
physicsPanel.placeComponent(button);
//PHYSICS controls
button = new GUIButton(posX, posY,
"proButtons/GUI_PHYSICS_RESTART_UP.png",
"proButtons/GUI_PHYSICS_RESTART_DOWN.png", gui);
button.addActionListener(GLOBAL.uiTools, "physicsRewind",
UITools.MOVE_CAM_TOOL);
button.addToolTip(GLOBAL.applet,
"proButtons/GUI_PHYSICS_RESTART_TOOLTIP", LANGUAGE);
gui.add(button);
posY += 30;
physicsPanel.placeComponent(button);
button = new GUIButton(posX, posY,
"proButtons/GUI_MOVE_CAM_TOOL_UP.png",
"proButtons/GUI_MOVE_CAM_TOOL_DOWN.png", gui);
button.addActionListener(GLOBAL.uiTools, "selectTool",
UITools.MOVE_OBJECT);
gui.add(button);
posY += 30;
physicsPanel.placeComponent(button);
toggle = new GUIToggle(posX, posY, "proButtons/GUI_BUILD_CHAIR_UP.png",
"proButtons/GUI_BUILD_CHAIR_DOWN.png", gui);
toggle.addActionListener(GLOBAL.uiTools, "toggleCentreConstraintChair",
UITools.MOVE_OBJECT);
gui.add(toggle);
posY += 30;
physicsPanel.placeComponent(toggle);
toggle.setState(true);
button = new GUIButton(posX, posY, "proButtons/GUI_CAMERA_MOVE_UP.png",
"proButtons/GUI_CAMERA_MOVE_DOWN.png", gui);
button.addActionListener(GLOBAL.uiTools, "selectTool",
UITools.MOVE_2D_TOOL);