mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Hide menu on zoom
This commit is contained in:
@@ -203,20 +203,22 @@ public abstract class FDropDown extends FScrollPane {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean pan(float x, float y, float deltaX, float deltaY, boolean moreVertical) {
|
public boolean pan(float x, float y, float deltaX, float deltaY, boolean moreVertical) {
|
||||||
if (!isVisible()) { return false; }
|
|
||||||
hide(); //always hide if backdrop panned
|
hide(); //always hide if backdrop panned
|
||||||
|
|
||||||
return false; //allow pan to pass through to object behind backdrop
|
return false; //allow pan to pass through to object behind backdrop
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean fling(float velocityX, float velocityY) {
|
public boolean fling(float velocityX, float velocityY) {
|
||||||
if (!isVisible()) { return false; }
|
|
||||||
hide(); //always hide if backdrop flung
|
hide(); //always hide if backdrop flung
|
||||||
|
|
||||||
return false; //allow fling to pass through to object behind backdrop
|
return false; //allow fling to pass through to object behind backdrop
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean zoom(float x, float y, float amount) {
|
||||||
|
hide(); //always hide if backdrop zoomed
|
||||||
|
return false; //allow zoom to pass through to object behind backdrop
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void draw(Graphics g) {
|
public void draw(Graphics g) {
|
||||||
//draw nothing for backdrop
|
//draw nothing for backdrop
|
||||||
|
|||||||
Reference in New Issue
Block a user