public bool GlobalButtonClick(int buttonID) { buttonID = redirectGlobals[buttonID] ?? buttonID; if (buttonID == -1) { return(false); } bool actionTaken = false; if (pageHandlerS.buttonClick != null) { pageHandlerS.buttonClick(buttonID); actionTaken = true; } if (backgroundHandlerS.buttonClick != null && pageHandlerS.buttonClick != backgroundHandlerS.buttonClick) { backgroundHandlerS.buttonClick(buttonID); actionTaken = true; } else if (zoomSteps > 0) { actionTaken = true; if (buttonID == zoomUpButton) { currentZoom--; } if (buttonID == zoomDownButton) { currentZoom++; } if (currentZoom < 0) { currentZoom = 0; } if (currentZoom > zoomSteps) { currentZoom = zoomSteps; } cameraObject.FOV = ComputeFOV(); } return(actionTaken); }
public bool GlobalButtonClick(int buttonID) { buttonID = redirectGlobals[buttonID] ?? buttonID; if (buttonID == -1) { return(false); } bool actionTaken = false; if (pageHandlerS.buttonClick != null) { pageHandlerS.buttonClick(buttonID); actionTaken = true; } if (backgroundHandlerS.buttonClick != null && pageHandlerS.buttonClick != backgroundHandlerS.buttonClick) { backgroundHandlerS.buttonClick(buttonID); actionTaken = true; } return(actionTaken); }