Skip to content

Commit

Permalink
Not the best way to do it, but better than nothing
Browse files Browse the repository at this point in the history
closes #4
  • Loading branch information
Acemany committed Oct 19, 2024
1 parent a460628 commit 0403ce7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ allprojects {
appName = 'Mindustry V4'
gdxVersion = '1.9.9'
roboVMVersion = '2.3.0'
uCoreVersion = '3dfb820142a0fc583ad19413a24fc5038aa29d89'
uCoreVersion = 'b29bd8c7855b797ce80aedc1af271e2c0aca1be8'

getVersionString = {
String buildVersion = getBuildVersion()
Expand Down
14 changes: 7 additions & 7 deletions core/src/io/acemany/mindustryV4/core/Control.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.utils.ObjectMap;
import com.badlogic.gdx.utils.TimeUtils;
import io.acemany.mindustryV4.*;
import io.acemany.mindustryV4.content.Mechs;
import io.acemany.mindustryV4.core.GameState.State;
import io.acemany.mindustryV4.entities.Player;
Expand All @@ -26,7 +27,10 @@
import io.anuke.ucore.core.*;
import io.anuke.ucore.entities.EntityQuery;
import io.anuke.ucore.modules.Module;
import io.anuke.ucore.scene.ui.*;
import io.anuke.ucore.scene.ui.SettingsDialog.SettingsTable.*;
import io.anuke.ucore.util.*;
import io.anuke.ucore.scene.*;

import java.io.IOException;

Expand All @@ -45,7 +49,7 @@ public class Control extends Module{
public final Saves saves;
public final Unlocks unlocks;

private Timer timerRPC= new Timer(), timerUnlock = new Timer();
private Timer timerRPC = new Timer(), timerUnlock = new Timer();
private boolean hiscore = false;
private boolean wasPaused = false;
private InputHandler[] inputs = {};
Expand Down Expand Up @@ -340,12 +344,8 @@ public void update(){
}

if(Inputs.keyTap("fullscreen")){
if(Settings.getBool("fullscreen")){
Gdx.graphics.setWindowedMode(600, 480);
}else{
Gdx.graphics.setFullscreenMode(Gdx.graphics.getDisplayMode());
}
Settings.putBool("fullscreen", !Settings.getBool("fullscreen"));
Element button = ui.settings.graphics.find("fullscreen");
button.fireClick();
}

if(!state.is(State.menu)){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public void add(SettingsTable table){
}else{
Gdx.graphics.setWindowedMode(600, 480);
}
});
}, true);

Gdx.graphics.setVSync(Settings.getBool("vsync"));
if(Settings.getBool("fullscreen")){
Expand Down

0 comments on commit 0403ce7

Please sign in to comment.