Fix .classpath to reference relative locations. Begin framework for
modules.
This commit is contained in:
parent
9e6aa20a21
commit
629f118e7c
20
.classpath
20
.classpath
@ -5,15 +5,15 @@
|
|||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||||
<classpathentry kind="lib" path="lib/commons-io-2.5.jar"/>
|
<classpathentry kind="lib" path="lib/commons-io-2.5.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/twitch-api-wrapper-0.3-jar-with-dependencies.jar"/>
|
<classpathentry kind="lib" path="lib/twitch-api-wrapper-0.3-jar-with-dependencies.jar"/>
|
||||||
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/lwjgl-glfw.jar"/>
|
<classpathentry kind="lib" path="lib/lwjgl-glfw.jar"/>
|
||||||
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/lwjgl-glfw-natives-linux.jar"/>
|
<classpathentry kind="lib" path="lib/lwjgl-glfw-natives-linux.jar"/>
|
||||||
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/lwjgl-glfw-natives-macos.jar"/>
|
<classpathentry kind="lib" path="lib/lwjgl-glfw-natives-macos.jar"/>
|
||||||
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/lwjgl-glfw-natives-windows.jar"/>
|
<classpathentry kind="lib" path="lib/lwjgl-glfw-natives-windows.jar"/>
|
||||||
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/lwjgl.jar"/>
|
<classpathentry kind="lib" path="lib/lwjgl.jar"/>
|
||||||
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/lwjgl-natives-linux.jar"/>
|
<classpathentry kind="lib" path="lib/lwjgl-natives-linux.jar"/>
|
||||||
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/lwjgl-natives-macos.jar"/>
|
<classpathentry kind="lib" path="lib/lwjgl-natives-macos.jar"/>
|
||||||
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/lwjgl-natives-windows.jar"/>
|
<classpathentry kind="lib" path="lib/lwjgl-natives-windows.jar"/>
|
||||||
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/jna-4.5.0.jar"/>
|
<classpathentry kind="lib" path="lib/jna-4.5.0.jar"/>
|
||||||
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/jna-platform-4.5.0.jar"/>
|
<classpathentry kind="lib" path="lib/jna-platform-4.5.0.jar"/>
|
||||||
<classpathentry kind="output" path="bin"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
BIN
sigIRCv2.jar
BIN
sigIRCv2.jar
Binary file not shown.
@ -11,14 +11,20 @@ import java.awt.event.WindowEvent;
|
|||||||
import java.awt.geom.Rectangle2D;
|
import java.awt.geom.Rectangle2D;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
import java.util.concurrent.Executors;
|
||||||
|
import java.util.concurrent.ScheduledExecutorService;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
import javax.swing.JFrame;
|
||||||
|
import javax.swing.JPanel;
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
|
|
||||||
import sig.utils.DrawUtils;
|
import sig.utils.DrawUtils;
|
||||||
import sig.utils.TextUtils;
|
import sig.utils.TextUtils;
|
||||||
|
|
||||||
public class Module {
|
public class Module extends JFrame{
|
||||||
public Rectangle2D position;
|
public JPanel panel;
|
||||||
|
public Rectangle position;
|
||||||
protected boolean enabled;
|
protected boolean enabled;
|
||||||
protected String name;
|
protected String name;
|
||||||
public static BufferedImage IMG_DRAGBAR;
|
public static BufferedImage IMG_DRAGBAR;
|
||||||
@ -30,16 +36,34 @@ public class Module {
|
|||||||
Point dragOffset;
|
Point dragOffset;
|
||||||
boolean dragging=false;
|
boolean dragging=false;
|
||||||
public static boolean DRAGGING=false;
|
public static boolean DRAGGING=false;
|
||||||
|
public Graphics myGraphics;
|
||||||
|
|
||||||
public Module(Rectangle2D bounds, String moduleName) {
|
public Module(Rectangle bounds, String moduleName) {
|
||||||
this.position = bounds;
|
this.position = bounds;
|
||||||
this.name = moduleName;
|
this.name = moduleName;
|
||||||
this.enabled=true;
|
this.enabled=true;
|
||||||
|
this.setVisible(true);
|
||||||
|
panel = new JPanel(){
|
||||||
|
public void paintComponent(Graphics g) {
|
||||||
|
super.paintComponent(g);
|
||||||
|
draw(g);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
this.titleHeight = (int)TextUtils.calculateStringBoundsFont(this.name, sigIRC.userFont).getHeight();
|
this.titleHeight = (int)TextUtils.calculateStringBoundsFont(this.name, sigIRC.userFont).getHeight();
|
||||||
|
|
||||||
|
this.setSize((int)position.getWidth(), (int)position.getHeight());
|
||||||
|
panel.setSize(this.getSize());
|
||||||
|
|
||||||
|
this.add(panel);
|
||||||
|
|
||||||
|
ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
|
||||||
|
scheduler.scheduleWithFixedDelay(()->{
|
||||||
|
panel.repaint();
|
||||||
|
},(long)((1d/sigIRC.framerate)*1000),(long)((1d/sigIRC.framerate)*1000),TimeUnit.MILLISECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Module(Rectangle2D bounds, String moduleName, boolean enabled) {
|
public Module(Rectangle bounds, String moduleName, boolean enabled) {
|
||||||
this(bounds, moduleName);
|
this(bounds, moduleName);
|
||||||
this.enabled=enabled;
|
this.enabled=enabled;
|
||||||
}
|
}
|
||||||
@ -132,12 +156,9 @@ public class Module {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void draw(Graphics g) {
|
public void draw(Graphics g) {
|
||||||
drawModuleHeader(g);
|
g.fillRect(0, 0, (int)position.getWidth(), (int)position.getHeight());
|
||||||
/*SwingUtilities.invokeLater(new Runnable() {
|
DrawUtils.drawText(g, 0, 16, Color.WHITE, "Test");
|
||||||
public void run() {
|
System.out.println("Test");
|
||||||
sigIRC.panel.repaint(getDrawBounds().getBounds());
|
|
||||||
}
|
|
||||||
});*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void drawModuleHeader(Graphics g) {
|
private void drawModuleHeader(Graphics g) {
|
||||||
|
@ -46,9 +46,9 @@ public class MyPanel extends JPanel implements MouseListener, ActionListener, Mo
|
|||||||
setFocusable(true);
|
setFocusable(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Dimension getPreferredSize() {
|
/*public Dimension getPreferredSize() {
|
||||||
return new Dimension(1280,480);
|
return new Dimension(1280,480);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
public void paintComponent(Graphics g) {
|
public void paintComponent(Graphics g) {
|
||||||
super.paintComponent(g);
|
super.paintComponent(g);
|
||||||
@ -68,6 +68,7 @@ public class MyPanel extends JPanel implements MouseListener, ActionListener, Mo
|
|||||||
lastMouseY = -1;
|
lastMouseY = -1;
|
||||||
}*/
|
}*/
|
||||||
//
|
//
|
||||||
|
/*
|
||||||
for (Module m : sigIRC.modules) {
|
for (Module m : sigIRC.modules) {
|
||||||
m.draw(g);
|
m.draw(g);
|
||||||
}
|
}
|
||||||
@ -98,10 +99,7 @@ public class MyPanel extends JPanel implements MouseListener, ActionListener, Mo
|
|||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
if (!sigIRC.overlayMode && sigIRC.button!=null) {
|
|
||||||
sigIRC.button.draw(g);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addMessage(String message) {
|
public void addMessage(String message) {
|
||||||
@ -125,7 +123,6 @@ public class MyPanel extends JPanel implements MouseListener, ActionListener, Mo
|
|||||||
for (Module m : sigIRC.modules) {
|
for (Module m : sigIRC.modules) {
|
||||||
m.mouseModuleMousePress(ev);
|
m.mouseModuleMousePress(ev);
|
||||||
}
|
}
|
||||||
sigIRC.button.onClickEvent(ev);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -192,10 +189,6 @@ public class MyPanel extends JPanel implements MouseListener, ActionListener, Mo
|
|||||||
sigIRC.config.setInteger("windowY", sigIRC.windowY);
|
sigIRC.config.setInteger("windowY", sigIRC.windowY);
|
||||||
sigIRC.config.setInteger("windowWidth", sigIRC.windowWidth);
|
sigIRC.config.setInteger("windowWidth", sigIRC.windowWidth);
|
||||||
sigIRC.config.setInteger("windowHeight", sigIRC.windowHeight);
|
sigIRC.config.setInteger("windowHeight", sigIRC.windowHeight);
|
||||||
if (sigIRC.button!=null) {
|
|
||||||
sigIRC.button.x = sigIRC.panel.getX()+sigIRC.panel.getWidth()-96;
|
|
||||||
sigIRC.button.y = 64+sigIRC.rowobj.size()*sigIRC.rowSpacing;
|
|
||||||
}
|
|
||||||
//com.repaint();
|
//com.repaint();
|
||||||
//sigIRC.panel.repaint();
|
//sigIRC.panel.repaint();
|
||||||
sigIRC.config.saveProperties();
|
sigIRC.config.saveProperties();
|
||||||
|
@ -102,7 +102,7 @@ public class sigIRC{
|
|||||||
static boolean dingEnabled=true;
|
static boolean dingEnabled=true;
|
||||||
static int dingThreshold;
|
static int dingThreshold;
|
||||||
public static Color backgroundcol;
|
public static Color backgroundcol;
|
||||||
public static BackgroundColorButton button;
|
//public static BackgroundColorButton button;
|
||||||
public static ProgramWindow window;
|
public static ProgramWindow window;
|
||||||
public static boolean overlayMode=false;
|
public static boolean overlayMode=false;
|
||||||
public static boolean showWindowControls=false;
|
public static boolean showWindowControls=false;
|
||||||
@ -165,6 +165,7 @@ public class sigIRC{
|
|||||||
public final static String SUBEMOTELISTFILE = "sigIRC/subemotes.json";
|
public final static String SUBEMOTELISTFILE = "sigIRC/subemotes.json";
|
||||||
public static long channel_id = -1;
|
public static long channel_id = -1;
|
||||||
public static int lastSubEmoteUpdate = -1;
|
public static int lastSubEmoteUpdate = -1;
|
||||||
|
public static int framerate = 30;
|
||||||
public static int autoUpdateProgram = 0; //0 = Auto Update, 1 = Notify, 2 = Disabled
|
public static int autoUpdateProgram = 0; //0 = Auto Update, 1 = Notify, 2 = Disabled
|
||||||
public static Image programIcon;
|
public static Image programIcon;
|
||||||
final public static int MAX_CONNECTION_RETRIES = 100;
|
final public static int MAX_CONNECTION_RETRIES = 100;
|
||||||
@ -182,6 +183,17 @@ public class sigIRC{
|
|||||||
static int lastWindowX = 0;
|
static int lastWindowX = 0;
|
||||||
static int lastWindowY = 0;
|
static int lastWindowY = 0;
|
||||||
|
|
||||||
|
final public static Font rabiRibiTinyDisplayFont = new Font("CP Font",0,12);
|
||||||
|
|
||||||
|
final public static Font rabiRibiMoneyDisplayFont = new Font("CP Font",0,16);
|
||||||
|
|
||||||
|
final public static Font smallFont = new Font(touhoumotherConsoleFont,0,12);
|
||||||
|
|
||||||
|
final public static Font userFont = new Font(usernameFont,0,16);
|
||||||
|
|
||||||
|
//List<String> messages = new ArrayList<String>();
|
||||||
|
final public static Font programFont = new Font(messageFont,0,24);
|
||||||
|
|
||||||
public static Twitch manager = new Twitch();
|
public static Twitch manager = new Twitch();
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
@ -249,6 +261,7 @@ public class sigIRC{
|
|||||||
autoUpdateProgram = config.getInteger("Auto_Update_Program", 0);
|
autoUpdateProgram = config.getInteger("Auto_Update_Program", 0);
|
||||||
disableChatMessages = config.getBoolean("Disable_Chat_Messages", false);
|
disableChatMessages = config.getBoolean("Disable_Chat_Messages", false);
|
||||||
lastSubEmoteUpdate = config.getInteger("lastSubEmote_APIUpdate",Calendar.getInstance().get(Calendar.DAY_OF_YEAR));
|
lastSubEmoteUpdate = config.getInteger("lastSubEmote_APIUpdate",Calendar.getInstance().get(Calendar.DAY_OF_YEAR));
|
||||||
|
framerate = config.getInteger("Max_FPS",30);
|
||||||
manager.setClientId("o4c2x0l3e82scgar4hpxg6m5dfjbem");
|
manager.setClientId("o4c2x0l3e82scgar4hpxg6m5dfjbem");
|
||||||
//System.out.println(manager.auth().hasAccessToken());
|
//System.out.println(manager.auth().hasAccessToken());
|
||||||
|
|
||||||
@ -622,7 +635,7 @@ public class sigIRC{
|
|||||||
|
|
||||||
f.setIconImage(programIcon);
|
f.setIconImage(programIcon);
|
||||||
|
|
||||||
button = new BackgroundColorButton(new File(sigIRC.BASEDIR+"backcolor.png"),panel.getX()+panel.getWidth()-96,64+rowobj.size()*rowSpacing);
|
//button = new BackgroundColorButton(new File(sigIRC.BASEDIR+"backcolor.png"),panel.getX()+panel.getWidth()-96,64+rowobj.size()*rowSpacing);
|
||||||
if (sigIRC.overlayMode) {
|
if (sigIRC.overlayMode) {
|
||||||
f.setBackground(new Color(0,0,0,0));
|
f.setBackground(new Color(0,0,0,0));
|
||||||
f.setAlwaysOnTop(true);
|
f.setAlwaysOnTop(true);
|
||||||
@ -652,15 +665,4 @@ public class sigIRC{
|
|||||||
public static void createEmoticon(Emoticon emote, ChatLogMessage textref, int x, int y) {
|
public static void createEmoticon(Emoticon emote, ChatLogMessage textref, int x, int y) {
|
||||||
chatlogtwitchemoticons.add(new ChatLogTwitchEmote(emote,textref,x,y));
|
chatlogtwitchemoticons.add(new ChatLogTwitchEmote(emote,textref,x,y));
|
||||||
}
|
}
|
||||||
|
|
||||||
final public static Font rabiRibiTinyDisplayFont = new Font("CP Font",0,12);
|
|
||||||
|
|
||||||
final public static Font rabiRibiMoneyDisplayFont = new Font("CP Font",0,16);
|
|
||||||
|
|
||||||
final public static Font smallFont = new Font(touhoumotherConsoleFont,0,12);
|
|
||||||
|
|
||||||
final public static Font userFont = new Font(usernameFont,0,16);
|
|
||||||
|
|
||||||
//List<String> messages = new ArrayList<String>();
|
|
||||||
final public static Font programFont = new Font(messageFont,0,24);
|
|
||||||
}
|
}
|
||||||
|
@ -1,22 +1,30 @@
|
|||||||
package sig.windows;
|
package sig.windows;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
import java.awt.Dimension;
|
||||||
|
import java.awt.GridLayout;
|
||||||
|
import java.awt.Image;
|
||||||
|
import java.awt.Rectangle;
|
||||||
|
import java.awt.geom.Rectangle2D;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
|
import javax.swing.BoxLayout;
|
||||||
import javax.swing.Icon;
|
import javax.swing.Icon;
|
||||||
import javax.swing.ImageIcon;
|
import javax.swing.ImageIcon;
|
||||||
import javax.swing.JButton;
|
import javax.swing.JButton;
|
||||||
import javax.swing.JFrame;
|
import javax.swing.JFrame;
|
||||||
|
import javax.swing.JLabel;
|
||||||
import javax.swing.JToggleButton;
|
import javax.swing.JToggleButton;
|
||||||
import javax.swing.event.ChangeEvent;
|
import javax.swing.event.ChangeEvent;
|
||||||
import javax.swing.event.ChangeListener;
|
import javax.swing.event.ChangeListener;
|
||||||
|
|
||||||
import sig.BackgroundColorButton;
|
import sig.BackgroundColorButton;
|
||||||
import sig.ColorPanel;
|
import sig.ColorPanel;
|
||||||
|
import sig.Module;
|
||||||
import sig.MyPanel;
|
import sig.MyPanel;
|
||||||
import sig.sigIRC;
|
import sig.sigIRC;
|
||||||
|
|
||||||
@ -27,6 +35,13 @@ public class ProgramWindow extends JFrame{
|
|||||||
List<ModuleButton> buttons = new ArrayList<ModuleButton>();
|
List<ModuleButton> buttons = new ArrayList<ModuleButton>();
|
||||||
|
|
||||||
public ProgramWindow() {
|
public ProgramWindow() {
|
||||||
|
|
||||||
|
try {
|
||||||
|
sigIRC.programIcon = ImageIO.read(new File(sigIRC.BASEDIR+"/sigIRC/sigIRCicon.png"));
|
||||||
|
} catch (IOException e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
deselected_icon = new ImageIcon(ImageIO.read(sigIRC.class.getResource("/resource/deselected_button.png")));
|
deselected_icon = new ImageIcon(ImageIO.read(sigIRC.class.getResource("/resource/deselected_button.png")));
|
||||||
selected_icon = new ImageIcon(ImageIO.read(sigIRC.class.getResource("/resource/selected_button.png")));
|
selected_icon = new ImageIcon(ImageIO.read(sigIRC.class.getResource("/resource/selected_button.png")));
|
||||||
@ -45,23 +60,57 @@ public class ProgramWindow extends JFrame{
|
|||||||
if (sigIRC.overlayMode && !sigIRC.showWindowControls) {
|
if (sigIRC.overlayMode && !sigIRC.showWindowControls) {
|
||||||
this.setUndecorated(true);
|
this.setUndecorated(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sigIRC.panel = new MyPanel();
|
sigIRC.panel = new MyPanel();
|
||||||
|
|
||||||
|
JLabel myLabel = new JLabel("Module Control:");
|
||||||
if (sigIRC.overlayMode) {
|
if (sigIRC.overlayMode) {
|
||||||
sigIRC.panel.setOpaque(false);
|
sigIRC.panel.setOpaque(false);
|
||||||
}
|
}
|
||||||
sigIRC.panel.setBackground(sigIRC.backgroundcol);
|
sigIRC.panel.setBackground(Color.BLACK);
|
||||||
|
myLabel.setBackground(sigIRC.panel.getBackground());
|
||||||
|
myLabel.setForeground(Color.WHITE);
|
||||||
|
myLabel.setIcon(new ImageIcon(sigIRC.programIcon.getScaledInstance(48, 48, Image.SCALE_AREA_AVERAGING)));
|
||||||
|
|
||||||
|
sigIRC.panel.add(myLabel);
|
||||||
|
|
||||||
if (!sigIRC.disableChatMessages) {
|
if (!sigIRC.disableChatMessages) {
|
||||||
|
ModuleButton button = new ModuleButton("Scrolling Chat");
|
||||||
|
sigIRC.panel.add(button);
|
||||||
}
|
}
|
||||||
|
if (sigIRC.chatlogmodule_enabled) {
|
||||||
|
ModuleButton button = new ModuleButton("Chat Log");
|
||||||
|
sigIRC.panel.add(button);
|
||||||
|
}
|
||||||
|
if (sigIRC.controllermodule_enabled) {
|
||||||
|
ModuleButton button = new ModuleButton("Controller");
|
||||||
|
sigIRC.panel.add(button);
|
||||||
|
}
|
||||||
|
if (sigIRC.twitchmodule_enabled) {
|
||||||
|
ModuleButton button = new ModuleButton("Twitch");
|
||||||
|
sigIRC.panel.add(button);
|
||||||
|
}
|
||||||
|
if (sigIRC.rabiracemodule_enabled) {
|
||||||
|
ModuleButton button = new ModuleButton("Rabi-Race");
|
||||||
|
sigIRC.panel.add(button);
|
||||||
|
sigIRC.panel.add(new ModuleButton("Rabi-Race"));
|
||||||
|
}
|
||||||
|
if (sigIRC.touhoumothermodule_enabled) {
|
||||||
|
ModuleButton button = new ModuleButton("Touhou Mother");
|
||||||
|
sigIRC.panel.add(button);
|
||||||
|
}
|
||||||
|
GridLayout myLayout = new GridLayout(0,1);
|
||||||
|
sigIRC.panel.setLayout(myLayout);
|
||||||
|
|
||||||
//colorpanel = new ColorPanel();
|
//colorpanel = new ColorPanel();
|
||||||
//this.add(colorpanel);
|
//this.add(colorpanel);
|
||||||
|
this.setLocationByPlatform(true);
|
||||||
this.add(sigIRC.panel);
|
this.add(sigIRC.panel);
|
||||||
this.pack();
|
this.pack();
|
||||||
this.setVisible(true);
|
this.setVisible(true);
|
||||||
this.setLocation(sigIRC.windowX, sigIRC.windowY);
|
//this.setLocation(sigIRC.windowX, sigIRC.windowY);
|
||||||
this.setSize(sigIRC.windowWidth, sigIRC.windowHeight);
|
//this.setSize(sigIRC.windowWidth, sigIRC.windowHeight);
|
||||||
|
|
||||||
this.setIconImage(sigIRC.programIcon);
|
this.setIconImage(sigIRC.programIcon);
|
||||||
|
|
||||||
@ -72,6 +121,8 @@ public class ProgramWindow extends JFrame{
|
|||||||
}
|
}
|
||||||
//this.setOpacity(0.5f);
|
//this.setOpacity(0.5f);
|
||||||
this.addWindowListener(sigIRC.panel);
|
this.addWindowListener(sigIRC.panel);
|
||||||
|
|
||||||
|
Module testMod = new Module(new Rectangle(0,0,640,480),"Test");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,10 +133,15 @@ class ModuleButton extends JToggleButton {
|
|||||||
this.label=label;
|
this.label=label;
|
||||||
this.button=this;
|
this.button=this;
|
||||||
this.setBackground(Color.DARK_GRAY);
|
this.setBackground(Color.DARK_GRAY);
|
||||||
button.setForeground(Color.GRAY);
|
this.setText(label);
|
||||||
button.setIconTextGap(4);
|
this.setToolTipText("Click to enable and disable the \n"+label+" module.");
|
||||||
button.setIcon(IntroDialog.deselected_icon);
|
this.setPreferredSize(new Dimension(160,56));
|
||||||
button.setSelectedIcon(IntroDialog.selected_icon);
|
this.setForeground(Color.GRAY);
|
||||||
|
this.setIconTextGap(4);
|
||||||
|
this.setIcon(ProgramWindow.deselected_icon);
|
||||||
|
this.setSelectedIcon(ProgramWindow.selected_icon);
|
||||||
|
this.setSelected(true);
|
||||||
|
button.setForeground(Color.BLUE);
|
||||||
this.addChangeListener(new ChangeListener() {
|
this.addChangeListener(new ChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void stateChanged(ChangeEvent e) {
|
public void stateChanged(ChangeEvent e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user