Add functionality to drag target

This commit is contained in:
Ylva Selling
2021-03-11 14:00:12 +01:00
parent c16ee0698f
commit ebcbce56f5
7 changed files with 107 additions and 28 deletions

View File

@@ -119,7 +119,7 @@ namespace openspace {
return getScreenSpacePosition() - (getScreenSpaceDimensions()/2.0f);
}
bool ScreenSpaceSkyBrowser::coordIsInsideBrowserScreenSpace(glm::vec2 coord) {
bool ScreenSpaceSkyBrowser::coordIsInsideCornersScreenSpace(glm::vec2 coord) {
bool lessThanUpperRight = coord.x < getUpperRightCornerScreenSpace().x && coord.y < getUpperRightCornerScreenSpace().y;
bool moreThanLowerLeft = coord.x > getLowerLeftCornerScreenSpace().x && coord.y > getLowerLeftCornerScreenSpace().y;
return lessThanUpperRight && moreThanLowerLeft;