I fogor
This commit is contained in:
parent
6f0de554ae
commit
1fd43ccee7
@ -5,7 +5,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = 'tech.nevets'
|
group = 'tech.nevets'
|
||||||
version = '1.2.0'
|
version = '1.2.1'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
@ -155,7 +155,7 @@ public class ChatWindow extends JPanel {
|
|||||||
add(connStatus, "cell 0 0 2 1,aligny center,growy 0");
|
add(connStatus, "cell 0 0 2 1,aligny center,growy 0");
|
||||||
|
|
||||||
//---- darkMode ----
|
//---- darkMode ----
|
||||||
darkMode.setText("Dark Mode");
|
darkMode.setText("Light Mode");
|
||||||
darkMode.addMouseListener(new MouseAdapter() {
|
darkMode.addMouseListener(new MouseAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void mouseClicked(MouseEvent e) {
|
public void mouseClicked(MouseEvent e) {
|
||||||
|
@ -18,7 +18,7 @@ new FormModel {
|
|||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JButton" ) {
|
add( new FormComponent( "javax.swing.JButton" ) {
|
||||||
name: "darkMode"
|
name: "darkMode"
|
||||||
"text": "Dark Mode"
|
"text": "Light Mode"
|
||||||
addEvent( new FormEvent( "java.awt.event.MouseListener", "mouseClicked", "darkModeMouseClicked", true ) )
|
addEvent( new FormEvent( "java.awt.event.MouseListener", "mouseClicked", "darkModeMouseClicked", true ) )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 0,growx"
|
"value": "cell 2 0,growx"
|
||||||
|
@ -112,7 +112,14 @@ public class Connection {
|
|||||||
}
|
}
|
||||||
case 0x4 -> {
|
case 0x4 -> {
|
||||||
onlineList.clear();
|
onlineList.clear();
|
||||||
onlineList.add(new String(Arrays.copyOfRange(buf, 0, i + 1)));
|
String bufBuf = "";
|
||||||
|
for (int j = 0; j <= i; j++) {
|
||||||
|
if ((char) buf[j] == '\n') {
|
||||||
|
onlineList.add(bufBuf);
|
||||||
|
bufBuf = "";
|
||||||
|
}
|
||||||
|
bufBuf += (char) buf[j];
|
||||||
|
}
|
||||||
online.setText(getFormattedOnline());
|
online.setText(getFormattedOnline());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -174,7 +181,6 @@ public class Connection {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void flush() {
|
public void flush() {
|
||||||
System.out.println(buf);
|
|
||||||
chat.append(buf);
|
chat.append(buf);
|
||||||
Notifier.messageReceived(Main.getFrame());
|
Notifier.messageReceived(Main.getFrame());
|
||||||
//Notifier.sendNotification(buf.substring(0, buf.indexOf(">") - 1), buf.substring(buf.indexOf(">")));
|
//Notifier.sendNotification(buf.substring(0, buf.indexOf(">") - 1), buf.substring(buf.indexOf(">")));
|
||||||
|
Loading…
Reference in New Issue
Block a user