Add block info keybind (#4284)
* Add block info keybind * Change block info keybind to backtick * Change block info keybind to F1
This commit is contained in:
@@ -941,6 +941,7 @@ keybind.pause_building.name = Pause/Resume Building
|
|||||||
keybind.minimap.name = Minimap
|
keybind.minimap.name = Minimap
|
||||||
keybind.planet_map.name = Planet Map
|
keybind.planet_map.name = Planet Map
|
||||||
keybind.research.name = Research
|
keybind.research.name = Research
|
||||||
|
keybind.block_info.name = Block Info
|
||||||
keybind.chat.name = Chat
|
keybind.chat.name = Chat
|
||||||
keybind.player_list.name = Player List
|
keybind.player_list.name = Player List
|
||||||
keybind.console.name = Console
|
keybind.console.name = Console
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ public enum Binding implements KeyBind{
|
|||||||
minimap(KeyCode.m),
|
minimap(KeyCode.m),
|
||||||
research(KeyCode.b),
|
research(KeyCode.b),
|
||||||
planet_map(KeyCode.n),
|
planet_map(KeyCode.n),
|
||||||
|
block_info(KeyCode.f1),
|
||||||
toggle_menus(KeyCode.c),
|
toggle_menus(KeyCode.c),
|
||||||
screenshot(KeyCode.p),
|
screenshot(KeyCode.p),
|
||||||
toggle_power_lines(KeyCode.f5),
|
toggle_power_lines(KeyCode.f5),
|
||||||
|
|||||||
@@ -189,6 +189,14 @@ public class PlacementFragment extends Fragment{
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(Core.input.keyTap(Binding.block_info)){
|
||||||
|
Block displayBlock = menuHoverBlock != null ? menuHoverBlock : input.block;
|
||||||
|
if(displayBlock != null){
|
||||||
|
ui.content.show(displayBlock);
|
||||||
|
Events.fire(new BlockInfoEvent());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user