Removed random repaint() calls everywhere to reduce strain on GPU. Added

key unicode character back in of Rabi-Race module.
This commit is contained in:
sigonasr2 2017-11-18 01:34:22 -06:00
parent 5c6d6346a6
commit 340e46ac37
8 changed files with 13 additions and 12 deletions

Binary file not shown.

View File

@ -105,7 +105,7 @@ public class Module {
private void dragWindow() {
if (dragging) {
sigIRC.panel.repaint(getDrawBounds().getBounds());
//sigIRC.panel.repaint(getDrawBounds().getBounds());
int mouseX = sigIRC.panel.lastMouseX+(int)dragOffset.getX();
int mouseY = sigIRC.panel.lastMouseY+(int)dragOffset.getY();
int oldX = (int)position.getX();
@ -133,11 +133,11 @@ public class Module {
public void draw(Graphics g) {
drawModuleHeader(g);
SwingUtilities.invokeLater(new Runnable() {
/*SwingUtilities.invokeLater(new Runnable() {
public void run() {
sigIRC.panel.repaint(getDrawBounds().getBounds());
}
});
});*/
}
private void drawModuleHeader(Graphics g) {

View File

@ -200,8 +200,8 @@ public class MyPanel extends JPanel implements MouseListener, ActionListener, Mo
sigIRC.config.setInteger("windowHeight", sigIRC.windowHeight);
sigIRC.button.x = sigIRC.panel.getX()+sigIRC.panel.getWidth()-96;
sigIRC.button.y = 64+sigIRC.rowobj.size()*sigIRC.rowSpacing;
com.repaint();
sigIRC.panel.repaint();
//com.repaint();
//sigIRC.panel.repaint();
sigIRC.config.saveProperties();
}

View File

@ -146,7 +146,7 @@ public class ScrollingText {
public boolean run() {
x-=myRow.getScrollSpd();
//System.out.println("X: "+x);
SwingUtilities.invokeLater(new Runnable() {
/*SwingUtilities.invokeLater(new Runnable() {
public void run() {
sigIRC.panel.repaint(
FindLeftMostCornerInDisplay(),
@ -154,7 +154,7 @@ public class ScrollingText {
(int)Math.max(FindRightMostCornerInDisplay(),(int)TextUtils.calculateStringBoundsFont(username, MyPanel.userFont).getWidth())+4,
FindBottomMostCornerInDisplay()+(stringHeight*2)+4);
}
});
});*/
//sigIRC.panel.repaint();
if (x+stringWidth<0) {
isAlive=false;

View File

@ -19,7 +19,7 @@ public class TwitchEmote {
public boolean run() {
//this.x-=paint.TEXTSCROLLSPD;
SwingUtilities.invokeLater(new Runnable() {
/*SwingUtilities.invokeLater(new Runnable() {
public void run() {
sigIRC.panel.repaint(
Math.max(x,0),
@ -27,7 +27,7 @@ public class TwitchEmote {
Math.min(sigIRC.panel.getWidth()-x,emote.getImage().getWidth()),
Math.min(sigIRC.panel.getHeight()-y,emote.getImage().getHeight()));
}
});
});*/
if (x+emote.getImage().getWidth()<0 || text==null || !text.isActive()) {
active=false;
return false;

View File

@ -184,6 +184,7 @@ public class UpdateEvent implements ActionListener{
sigIRC.chatlogtwitchemoticons.remove(i--);
}
}
sigIRC.panel.repaint();
}
private void ProcessTextRows() {

View File

@ -195,7 +195,7 @@ public class ChatLogMessage {
}
public boolean run() {
SwingUtilities.invokeLater(new Runnable() {
/*SwingUtilities.invokeLater(new Runnable() {
public void run() {
sigIRC.panel.repaint(
(int)Math.max(refModule.getPosition().getX()+position.getX(),0),
@ -203,7 +203,7 @@ public class ChatLogMessage {
(int)Math.min(sigIRC.panel.getWidth()-(refModule.getPosition().getX()+position.getX()+messageDisplaySize.getX()),messageDisplaySize.getX()),
(int)Math.min(sigIRC.panel.getHeight()-(refModule.getPosition().getY()+position.getY()+messageDisplaySize.getY()),messageDisplaySize.getY()));
}
});
});*/
//System.out.println(refModule.getPosition()+","+position);
return true;
}

View File

@ -68,7 +68,7 @@ public class SessionCreateWindow extends JFrame{
playerpanel.add(playerLabel);
playerpanel.add(maxplayers);
JLabel passwordLabel = new JLabel("🔑 Password (Optional): ");
JLabel passwordLabel = new JLabel("🔑 Password (Optional): ");
playerpanel.add(passwordLabel);
playerpanel.add(pass);