mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
update windowlistener
- use Lwjgl3WindowAdapter, should fix some issue for LWJGL3
This commit is contained in:
@@ -118,32 +118,7 @@ public class Main {
|
|||||||
config.setWindowedMode(Config.instance().getSettingData().width, Config.instance().getSettingData().height);
|
config.setWindowedMode(Config.instance().getSettingData().width, Config.instance().getSettingData().height);
|
||||||
}
|
}
|
||||||
config.setTitle("Forge");
|
config.setTitle("Forge");
|
||||||
config.setWindowListener(new Lwjgl3WindowListener() {
|
config.setWindowListener(new Lwjgl3WindowAdapter(){
|
||||||
@Override
|
|
||||||
public void created(Lwjgl3Window lwjgl3Window) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void iconified(boolean b) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void maximized(boolean b) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void focusLost() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void focusGained() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean closeRequested() {
|
public boolean closeRequested() {
|
||||||
//use the device adpater to exit properly
|
//use the device adpater to exit properly
|
||||||
@@ -151,17 +126,8 @@ public class Main {
|
|||||||
Forge.exit(true);
|
Forge.exit(true);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void filesDropped(String[] strings) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void refreshRequested() {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (desktopMode)
|
if (desktopMode)
|
||||||
config.setHdpiMode(HdpiMode.Logical);
|
config.setHdpiMode(HdpiMode.Logical);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user