Removed/Added window controls based on if "showWindowControls" option
was on/off. Removed reliance on the overlay mode for this.
This commit is contained in:
parent
bd7a76a06f
commit
3ebdd94951
BIN
sigIRCv2.jar
BIN
sigIRCv2.jar
Binary file not shown.
@ -53,7 +53,7 @@ public class Module {
|
||||
}
|
||||
|
||||
private void enableWindowDrag(int mouseX, int mouseY) {
|
||||
if (!sigIRC.overlayMode && !dragging && inDragBounds(mouseX,mouseY) && !DRAGGING) {
|
||||
if (sigIRC.showWindowControls && !dragging && inDragBounds(mouseX,mouseY) && !DRAGGING) {
|
||||
//Enable dragging.
|
||||
dragOffset = new Point((int)position.getX() - mouseX,(int)position.getY()-mouseY);
|
||||
dragging=DRAGGING=true;
|
||||
@ -104,6 +104,7 @@ public class Module {
|
||||
}
|
||||
|
||||
private void dragWindow() {
|
||||
if (sigIRC.showWindowControls) {
|
||||
if (dragging) {
|
||||
//sigIRC.panel.repaint(getDrawBounds().getBounds());
|
||||
int mouseX = sigIRC.panel.lastMouseX+(int)dragOffset.getX();
|
||||
@ -118,7 +119,8 @@ public class Module {
|
||||
inDragZone=true;
|
||||
//System.out.println("In Drag Zone for Module "+name);
|
||||
//sigIRC.panel.setCursor(new Cursor(Cursor.MOVE_CURSOR));
|
||||
} /*else
|
||||
}
|
||||
}/*else
|
||||
if (sigIRC.panel.getCursor().getType()==Cursor.MOVE_CURSOR) {
|
||||
sigIRC.panel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
|
||||
}*/
|
||||
@ -141,7 +143,7 @@ public class Module {
|
||||
}
|
||||
|
||||
private void drawModuleHeader(Graphics g) {
|
||||
if (!sigIRC.overlayMode) {
|
||||
if (sigIRC.showWindowControls) {
|
||||
g.drawImage(Module.IMG_DRAGBAR,
|
||||
(int)position.getX()+2,
|
||||
(int)position.getY()-Module.IMG_DRAGBAR.getHeight(),
|
||||
|
@ -103,9 +103,12 @@ public class ControllerModule extends Module{
|
||||
}
|
||||
//buttons.add(new Button(0.1,0.05,0.1,0.05,controllers.get(0),Identifier.Button._3,Color.RED,this));
|
||||
LoadButtonAndAxisData();
|
||||
|
||||
if (sigIRC.showWindowControls) {
|
||||
click_buttons.add(new AddClickableButton(new Rectangle(
|
||||
0,(int)position.getHeight()-21,96,20),"Add Button",this));
|
||||
}
|
||||
}
|
||||
|
||||
public List<Controller> getControllers() {
|
||||
return controllers;
|
||||
@ -382,6 +385,7 @@ public class ControllerModule extends Module{
|
||||
|
||||
public void run() {
|
||||
Point mouse_position = new Point((int)(sigIRC.panel.lastMouseX-getPosition().getX()),(int)(sigIRC.panel.lastMouseY-getPosition().getY()));
|
||||
if (sigIRC.showWindowControls) {
|
||||
if (resizing) {
|
||||
PerformResize(mouse_position);
|
||||
setConstraints();
|
||||
@ -484,6 +488,7 @@ public class ControllerModule extends Module{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (Controller c : controllers) {
|
||||
//System.out.println("Data for "+c.getName()+" ("+c.getType()+"):");
|
||||
c.poll();
|
||||
|
@ -100,7 +100,7 @@ public class sigIRC{
|
||||
public static BackgroundColorButton button;
|
||||
public static JFrame window;
|
||||
static boolean overlayMode=false;
|
||||
static boolean showWindowControls=false;
|
||||
public static boolean showWindowControls=false;
|
||||
static int windowX=0;
|
||||
static int windowY=0;
|
||||
static int windowWidth=0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user