Changed rotation control scheme, fixed "transparent" boxes
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="io.anuke.mindustry"
|
package="io.anuke.mindustry"
|
||||||
android:versionCode="18"
|
android:versionCode="19"
|
||||||
android:versionName="3.02b" >
|
android:versionName="3.03b" >
|
||||||
|
|
||||||
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="25" />
|
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="25" />
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 229 B |
|
Before Width: | Height: | Size: 237 B |
|
Before Width: | Height: | Size: 238 B |
|
Before Width: | Height: | Size: 244 B |
|
Before Width: | Height: | Size: 241 B |
|
Before Width: | Height: | Size: 225 B |
|
Before Width: | Height: | Size: 219 B |
|
Before Width: | Height: | Size: 214 B |
|
Before Width: | Height: | Size: 216 B |
|
Before Width: | Height: | Size: 215 B |
|
Before Width: | Height: | Size: 186 B |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 78 KiB |
@@ -100,8 +100,7 @@ public class Control extends Module{
|
|||||||
"left", Keys.A,
|
"left", Keys.A,
|
||||||
"down", Keys.S,
|
"down", Keys.S,
|
||||||
"right", Keys.D,
|
"right", Keys.D,
|
||||||
"rotate", Keys.R,
|
"zoom_hold", Keys.CONTROL_LEFT,
|
||||||
"rotate_back", Keys.E,
|
|
||||||
"menu", Gdx.app.getType() == ApplicationType.Android ? Keys.BACK : Keys.ESCAPE,
|
"menu", Gdx.app.getType() == ApplicationType.Android ? Keys.BACK : Keys.ESCAPE,
|
||||||
"pause", Keys.SPACE
|
"pause", Keys.SPACE
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ import io.anuke.ucore.util.*;
|
|||||||
public class Renderer extends RendererModule{
|
public class Renderer extends RendererModule{
|
||||||
String[] surfaces = { "shadow", "shield", "pixel", "indicators" };
|
String[] surfaces = { "shadow", "shield", "pixel", "indicators" };
|
||||||
int targetscale = baseCameraScale;
|
int targetscale = baseCameraScale;
|
||||||
int chunksize = 16;
|
int chunksize = 32;
|
||||||
int[][][] cache;
|
int[][][] cache;
|
||||||
FloatArray shieldHits = new FloatArray();
|
FloatArray shieldHits = new FloatArray();
|
||||||
float shieldHitDuration = 18f;
|
float shieldHitDuration = 18f;
|
||||||
|
|||||||
@@ -112,8 +112,9 @@ public class UI extends SceneModule{
|
|||||||
Draw.color();
|
Draw.color();
|
||||||
|
|
||||||
TextureRegion back = Draw.region("background");
|
TextureRegion back = Draw.region("background");
|
||||||
float backscl = 5.5f;
|
float backscl = 4f;
|
||||||
|
|
||||||
|
Draw.alpha(0.8f);
|
||||||
Core.batch.draw(back, w/2 - back.getRegionWidth()*backscl/2, h/2 - back.getRegionHeight()*backscl/2,
|
Core.batch.draw(back, w/2 - back.getRegionWidth()*backscl/2, h/2 - back.getRegionHeight()*backscl/2,
|
||||||
back.getRegionWidth()*backscl, back.getRegionHeight()*backscl);
|
back.getRegionWidth()*backscl, back.getRegionHeight()*backscl);
|
||||||
|
|
||||||
@@ -122,10 +123,9 @@ public class UI extends SceneModule{
|
|||||||
float logow = logo.getRegionWidth()*logoscl;
|
float logow = logo.getRegionWidth()*logoscl;
|
||||||
float logoh = logo.getRegionHeight()*logoscl;
|
float logoh = logo.getRegionHeight()*logoscl;
|
||||||
|
|
||||||
Draw.color();
|
|
||||||
Core.batch.draw(logo, w/2 - logow/2, h - logoh + 15, logow, logoh);
|
|
||||||
|
|
||||||
Draw.color();
|
Draw.color();
|
||||||
|
Core.batch.draw(logo, w/2 - logow/2, h - logoh + 15, logow, logoh);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,20 +25,15 @@ public class Input{
|
|||||||
//player is dead
|
//player is dead
|
||||||
if(player.health <= 0) return;
|
if(player.health <= 0) return;
|
||||||
|
|
||||||
if(Inputs.scrolled() && !GameState.is(State.menu) && !Vars.ui.onDialog()){
|
if(Inputs.scrolled() && Inputs.keyDown("zoom_hold") && !GameState.is(State.menu) && !Vars.ui.onDialog()){
|
||||||
Vars.renderer.scaleCamera(Inputs.scroll());
|
Vars.renderer.scaleCamera(Inputs.scroll());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Inputs.keyUp("rotate"))
|
if(Inputs.scrolled()){
|
||||||
player.rotation ++;
|
player.rotation += Inputs.scroll();
|
||||||
|
}
|
||||||
|
|
||||||
if(Inputs.keyUp("rotate_back"))
|
player.rotation = Mathf.mod(player.rotation, 4);
|
||||||
player.rotation --;
|
|
||||||
|
|
||||||
if(player.rotation < 0)
|
|
||||||
player.rotation += 4;
|
|
||||||
|
|
||||||
player.rotation %= 4;
|
|
||||||
|
|
||||||
for(int i = 0; i < 9; i ++){
|
for(int i = 0; i < 9; i ++){
|
||||||
if(Inputs.keyUp(Keys.valueOf(""+(i+1))) && i < control.getWeapons().size){
|
if(Inputs.keyUp(Keys.valueOf(""+(i+1))) && i < control.getWeapons().size){
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public class BlocksFragment implements Fragment{
|
|||||||
row();
|
row();
|
||||||
|
|
||||||
new table("pane"){{
|
new table("pane"){{
|
||||||
|
get().setTouchable(Touchable.enabled);
|
||||||
int rows = 4;
|
int rows = 4;
|
||||||
int maxcol = 0;
|
int maxcol = 0;
|
||||||
float size = 48;
|
float size = 48;
|
||||||
@@ -139,6 +139,7 @@ public class BlocksFragment implements Fragment{
|
|||||||
void updateRecipe(){
|
void updateRecipe(){
|
||||||
Recipe recipe = player.recipe;
|
Recipe recipe = player.recipe;
|
||||||
desctable.clear();
|
desctable.clear();
|
||||||
|
desctable.setTouchable(Touchable.enabled);
|
||||||
|
|
||||||
desctable.defaults().left();
|
desctable.defaults().left();
|
||||||
desctable.left();
|
desctable.left();
|
||||||
|
|||||||
@@ -66,12 +66,14 @@ public class HudFragment implements Fragment{
|
|||||||
row();
|
row();
|
||||||
|
|
||||||
new table(){{
|
new table(){{
|
||||||
|
get().setTouchable(Touchable.enabled);
|
||||||
addWaveTable();
|
addWaveTable();
|
||||||
}}.fillX().end();
|
}}.fillX().end();
|
||||||
|
|
||||||
row();
|
row();
|
||||||
|
|
||||||
itemtable = new table("button").end().top().left().fillX().size(-1).get();
|
itemtable = new table("button").end().top().left().fillX().size(-1).get();
|
||||||
|
itemtable.setTouchable(Touchable.enabled);
|
||||||
itemtable.setVisible(()-> control.getMode() != GameMode.sandbox);
|
itemtable.setVisible(()-> control.getMode() != GameMode.sandbox);
|
||||||
itemcell = get().getCell(itemtable);
|
itemcell = get().getCell(itemtable);
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import io.anuke.mindustry.input.PlaceMode;
|
|||||||
import io.anuke.ucore.scene.builders.imagebutton;
|
import io.anuke.ucore.scene.builders.imagebutton;
|
||||||
import io.anuke.ucore.scene.builders.label;
|
import io.anuke.ucore.scene.builders.label;
|
||||||
import io.anuke.ucore.scene.builders.table;
|
import io.anuke.ucore.scene.builders.table;
|
||||||
|
import io.anuke.ucore.scene.event.Touchable;
|
||||||
import io.anuke.ucore.scene.ui.ButtonGroup;
|
import io.anuke.ucore.scene.ui.ButtonGroup;
|
||||||
import io.anuke.ucore.scene.ui.ImageButton;
|
import io.anuke.ucore.scene.ui.ImageButton;
|
||||||
import io.anuke.ucore.scene.ui.layout.Unit;
|
import io.anuke.ucore.scene.ui.layout.Unit;
|
||||||
@@ -27,6 +28,7 @@ public class PlacementFragment implements Fragment{
|
|||||||
|
|
||||||
|
|
||||||
new table("pane"){{
|
new table("pane"){{
|
||||||
|
get().setTouchable(Touchable.enabled);
|
||||||
new label(()->"Placement Mode: [orange]" + AndroidInput.mode.name()).pad(4).units(Unit.dp);
|
new label(()->"Placement Mode: [orange]" + AndroidInput.mode.name()).pad(4).units(Unit.dp);
|
||||||
row();
|
row();
|
||||||
|
|
||||||
|
|||||||