mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 14:58:03 +02:00
Merge pull request #9033 from huffman/fix/usersjs-hide-show-laser
Fix users.js maximize button unclickable with hand controllers
This commit is contained in:
commit
f55b660820
1 changed files with 12 additions and 6 deletions
|
@ -228,7 +228,7 @@ var usersWindow = (function () {
|
||||||
|
|
||||||
var WINDOW_WIDTH = 260,
|
var WINDOW_WIDTH = 260,
|
||||||
WINDOW_MARGIN = 12,
|
WINDOW_MARGIN = 12,
|
||||||
WINDOW_BASE_MARGIN = 6, // A little less is needed in order look correct
|
WINDOW_BASE_MARGIN = 24, // A little less is needed in order look correct
|
||||||
WINDOW_FONT = {
|
WINDOW_FONT = {
|
||||||
size: 12
|
size: 12
|
||||||
},
|
},
|
||||||
|
@ -253,11 +253,17 @@ var usersWindow = (function () {
|
||||||
windowPane,
|
windowPane,
|
||||||
windowHeading,
|
windowHeading,
|
||||||
|
|
||||||
|
// Margin on the left and right side of the window to keep
|
||||||
|
// it from getting too close to the edge of the screen which
|
||||||
|
// is unclickable.
|
||||||
|
WINDOW_MARGIN_X = 20,
|
||||||
|
|
||||||
// Window border is similar to that of edit.js.
|
// Window border is similar to that of edit.js.
|
||||||
WINDOW_BORDER_WIDTH = WINDOW_WIDTH + 2 * WINDOW_BASE_MARGIN,
|
WINDOW_MARGIN_HALF = WINDOW_MARGIN / 2,
|
||||||
WINDOW_BORDER_TOP_MARGIN = 2 * WINDOW_BASE_MARGIN,
|
WINDOW_BORDER_WIDTH = WINDOW_WIDTH + 2 * WINDOW_MARGIN_HALF,
|
||||||
WINDOW_BORDER_BOTTOM_MARGIN = WINDOW_BASE_MARGIN,
|
WINDOW_BORDER_TOP_MARGIN = 2 * WINDOW_MARGIN_HALF,
|
||||||
WINDOW_BORDER_LEFT_MARGIN = WINDOW_BASE_MARGIN,
|
WINDOW_BORDER_BOTTOM_MARGIN = WINDOW_MARGIN_HALF,
|
||||||
|
WINDOW_BORDER_LEFT_MARGIN = WINDOW_MARGIN_HALF,
|
||||||
WINDOW_BORDER_RADIUS = 4,
|
WINDOW_BORDER_RADIUS = 4,
|
||||||
WINDOW_BORDER_COLOR = { red: 255, green: 255, blue: 255 },
|
WINDOW_BORDER_COLOR = { red: 255, green: 255, blue: 255 },
|
||||||
WINDOW_BORDER_ALPHA = 0.5,
|
WINDOW_BORDER_ALPHA = 0.5,
|
||||||
|
@ -450,7 +456,7 @@ var usersWindow = (function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
function saturateWindowPosition() {
|
function saturateWindowPosition() {
|
||||||
windowPosition.x = Math.max(0, Math.min(viewport.x - WINDOW_WIDTH, windowPosition.x));
|
windowPosition.x = Math.max(WINDOW_MARGIN_X, Math.min(viewport.x - WINDOW_WIDTH - WINDOW_MARGIN_X, windowPosition.x));
|
||||||
windowPosition.y = Math.max(windowMinimumHeight, Math.min(viewport.y, windowPosition.y));
|
windowPosition.y = Math.max(windowMinimumHeight, Math.min(viewport.y, windowPosition.y));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue