mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-23 04:52:38 -08:00
Possible research deselect fix / Updated map submissions
This commit is contained in:
parent
af0d0be294
commit
23c45154a9
5 changed files with 12 additions and 9 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -377,6 +377,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||
public @Nullable Map save(){
|
||||
boolean isEditor = state.rules.editor;
|
||||
state.rules.editor = false;
|
||||
state.rules.allowEditRules = false;
|
||||
state.rules.objectiveFlags.clear();
|
||||
state.rules.objectives.each(MapObjective::reset);
|
||||
String name = editor.tags.get("name", "").trim();
|
||||
|
|
|
|||
|
|
@ -488,11 +488,17 @@ public class ResearchDialog extends BaseDialog{
|
|||
}
|
||||
|
||||
if(mobile){
|
||||
tapped(() -> {
|
||||
Element e = Core.scene.getHoverElement();
|
||||
if(e == this){
|
||||
hoverNode = null;
|
||||
rebuild();
|
||||
addListener(new InputListener(){
|
||||
@Override
|
||||
public boolean touchDown(InputEvent event, float x, float y, int pointer, KeyCode button){
|
||||
if(pointer == -1) return false;
|
||||
Element e = Core.scene.hit(Core.input.mouseX(pointer), Core.input.mouseY(pointer), true);
|
||||
if(e == View.this){
|
||||
hoverNode = null;
|
||||
rebuild();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -613,10 +619,6 @@ public class ResearchDialog extends BaseDialog{
|
|||
Element e = Core.scene.hit(Core.input.mouseX(pointer == -1 ? 0 : pointer), Core.input.mouseY(pointer == -1 ? 0 : pointer), true);
|
||||
|
||||
if(hoverNode == button && !(e != null && (e == infoTable || e.isDescendantOf(infoTable) || e == hoverNode || e.isDescendantOf(hoverNode))) && (Core.app.isDesktop() || pointer == 0)){
|
||||
if(Core.app.isMobile()){
|
||||
Log.info("hiding info table {x=@ y=@ mouseX=@ mouseY=@ pointer=@ overElement=@ isInfoTable=@ isDescendantOfInfo=@ isDescendantOfHover=@}", x, y,
|
||||
Core.input.mouseX(pointer == -1 ? 0 : pointer), Core.input.mouseY(pointer == -1 ? 0 : pointer), pointer, (e != null ? e.getClass() : null), e == infoTable, e != null && e.isDescendantOf(infoTable), e != null && e.isDescendantOf(hoverNode));
|
||||
}
|
||||
hoverNode = null;
|
||||
rebuild();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue