Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -26,6 +26,7 @@ This means:
|
|||||||
- 4 spaces indentation
|
- 4 spaces indentation
|
||||||
- `camelCase`, **even for constants or enums**. Why? Because `SCREAMING_CASE` is ugly, annoying to type and does not achieve anything useful. Constants are *less* dangerous than variables, not more.
|
- `camelCase`, **even for constants or enums**. Why? Because `SCREAMING_CASE` is ugly, annoying to type and does not achieve anything useful. Constants are *less* dangerous than variables, not more.
|
||||||
- No underscores for anything. (Yes, I know `Bindings` violates this principle, but that's for legacy reasons and really should be cleaned up some day)
|
- No underscores for anything. (Yes, I know `Bindings` violates this principle, but that's for legacy reasons and really should be cleaned up some day)
|
||||||
|
- Do not use braceless `if/else` statements. `if(x) statement else statement2` should **never** be done. In very specific situations, having braceless if-statements on one line is allowed: `if(cond) return;` would be valid.
|
||||||
|
|
||||||
Import [this style file](.github/Mindustry-CodeStyle-IJ.xml) into IntelliJ to get correct formatting when developing Mindustry.
|
Import [this style file](.github/Mindustry-CodeStyle-IJ.xml) into IntelliJ to get correct formatting when developing Mindustry.
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public class ChatFragment extends Table{
|
|||||||
|
|
||||||
update(() -> {
|
update(() -> {
|
||||||
|
|
||||||
if(net.active() && input.keyTap(Binding.chat) && (scene.getKeyboardFocus() == chatfield || scene.getKeyboardFocus() == null)){
|
if(net.active() && input.keyTap(Binding.chat) && (scene.getKeyboardFocus() == chatfield || scene.getKeyboardFocus() == null || ui.minimapfrag.shown())){
|
||||||
toggle();
|
toggle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,8 +43,10 @@ public class MinimapFragment extends Fragment{
|
|||||||
|
|
||||||
elem.visible(() -> shown);
|
elem.visible(() -> shown);
|
||||||
elem.update(() -> {
|
elem.update(() -> {
|
||||||
|
if(!ui.chatfrag.shown()){
|
||||||
elem.requestKeyboard();
|
elem.requestKeyboard();
|
||||||
elem.requestScroll();
|
elem.requestScroll();
|
||||||
|
}
|
||||||
elem.setFillParent(true);
|
elem.setFillParent(true);
|
||||||
elem.setBounds(0, 0, Core.graphics.getWidth(), Core.graphics.getHeight());
|
elem.setBounds(0, 0, Core.graphics.getWidth(), Core.graphics.getHeight());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user