Grid mode tweak

This commit is contained in:
Anuken
2018-12-11 17:48:55 -05:00
parent 65e65ba308
commit 97d54868e9
3 changed files with 8 additions and 5 deletions

View File

@@ -25,7 +25,7 @@ public class DefaultKeybinds{
"rotate", new Axis(Input.SCROLL),
"dash", Input.SHIFT_LEFT,
"drop_unit", Input.SHIFT_LEFT,
"gridMode", Input.ALT_LEFT,
"gridMode", Input.CONTROL_LEFT,
"gridModeShift", Input.SHIFT_LEFT,
new Category("view"),
"zoom_hold", Input.CONTROL_LEFT,

View File

@@ -41,6 +41,7 @@ public class PlacementFragment extends Fragment{
boolean shown = true;
boolean lastGround;
//TODO make this configurable
final Input[] inputGrid = {
Input.NUM_1, Input.NUM_2, Input.NUM_3, Input.NUM_4,
Input.Q, Input.W, Input.E, Input.R,
@@ -64,7 +65,7 @@ public class PlacementFragment extends Fragment{
boolean gridUpdate(InputHandler input){
if(!Inputs.keyDown("gridMode")) return false;
if(Inputs.keyDown("gridModeShift")){ // Select Category
if(Inputs.keyDown("gridModeShift")){ //select category
int i = 0;
for(Input key : inputCatGrid){
if(Inputs.keyDown(key)){
@@ -74,7 +75,7 @@ public class PlacementFragment extends Fragment{
i++;
}
return true;
}else if(Inputs.keyDown("select")){ // Mouse eyedropper select
}else if(Inputs.keyDown("select")){ //mouse eyedropper select
Tile tile = world.tileWorld(Graphics.mouseWorld().x, Graphics.mouseWorld().y);
if(tile != null){
@@ -86,7 +87,7 @@ public class PlacementFragment extends Fragment{
return true;
}
}
}else{ // Select block
}else{ //select block
int i = 0;
Array<Recipe> recipes = Recipe.getByCategory(currentCategory);
for(Input key : inputGrid){