mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 10:49:33 +02:00
Position default toolbar buttons bottom center of screen
Expand edit toolbar horizontally.
This commit is contained in:
parent
f1f9c6740d
commit
3aec67bb36
3 changed files with 12 additions and 9 deletions
|
@ -27,6 +27,7 @@ var directoryWindow = new OverlayWebWindow({
|
||||||
|
|
||||||
var toolHeight = 50;
|
var toolHeight = 50;
|
||||||
var toolWidth = 50;
|
var toolWidth = 50;
|
||||||
|
var TOOLBAR_MARGIN_Y = 25;
|
||||||
|
|
||||||
|
|
||||||
function showDirectory() {
|
function showDirectory() {
|
||||||
|
@ -53,10 +54,10 @@ var toolBar = (function() {
|
||||||
browseDirectoryButton;
|
browseDirectoryButton;
|
||||||
|
|
||||||
function initialize() {
|
function initialize() {
|
||||||
toolBar = new ToolBar(0, 0, ToolBar.VERTICAL, "highfidelity.directory.toolbar", function(windowDimensions, toolbar) {
|
toolBar = new ToolBar(0, 0, ToolBar.HORIZONTAL, "highfidelity.directory.toolbar", function(windowDimensions, toolbar) {
|
||||||
return {
|
return {
|
||||||
x: windowDimensions.x - 8 - toolbar.width,
|
x: windowDimensions.x / 2 - 3 * toolbar.height, // Use toolbar.height to match edit.js
|
||||||
y: 50
|
y: windowDimensions.y - TOOLBAR_MARGIN_Y - toolHeight
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
browseDirectoryButton = toolBar.addTool({
|
browseDirectoryButton = toolBar.addTool({
|
||||||
|
|
|
@ -53,6 +53,7 @@ selectionManager.addEventListener(function() {
|
||||||
var toolIconUrl = HIFI_PUBLIC_BUCKET + "images/tools/";
|
var toolIconUrl = HIFI_PUBLIC_BUCKET + "images/tools/";
|
||||||
var toolHeight = 50;
|
var toolHeight = 50;
|
||||||
var toolWidth = 50;
|
var toolWidth = 50;
|
||||||
|
var TOOLBAR_MARGIN_Y = 25;
|
||||||
|
|
||||||
var DEGREES_TO_RADIANS = Math.PI / 180.0;
|
var DEGREES_TO_RADIANS = Math.PI / 180.0;
|
||||||
var RADIANS_TO_DEGREES = 180.0 / Math.PI;
|
var RADIANS_TO_DEGREES = 180.0 / Math.PI;
|
||||||
|
@ -179,10 +180,10 @@ var toolBar = (function() {
|
||||||
newParticleButton
|
newParticleButton
|
||||||
|
|
||||||
function initialize() {
|
function initialize() {
|
||||||
toolBar = new ToolBar(0, 0, ToolBar.VERTICAL, "highfidelity.edit.toolbar", function(windowDimensions, toolbar) {
|
toolBar = new ToolBar(0, 0, ToolBar.HORIZONTAL, "highfidelity.edit.toolbar", function(windowDimensions, toolbar) {
|
||||||
return {
|
return {
|
||||||
x: windowDimensions.x - 8 - toolbar.width,
|
x: windowDimensions.x / 2 + 2 * toolbar.height, // Use toolbar.height as a proxy for width of a single button
|
||||||
y: (windowDimensions.y - toolbar.height) / 2
|
y: windowDimensions.y - TOOLBAR_MARGIN_Y - toolHeight
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@ var examplesWindow = new OverlayWebWindow({
|
||||||
|
|
||||||
var toolHeight = 50;
|
var toolHeight = 50;
|
||||||
var toolWidth = 50;
|
var toolWidth = 50;
|
||||||
|
var TOOLBAR_MARGIN_Y = 25;
|
||||||
|
|
||||||
|
|
||||||
function showExamples(marketplaceID) {
|
function showExamples(marketplaceID) {
|
||||||
|
@ -58,10 +59,10 @@ var toolBar = (function() {
|
||||||
browseExamplesButton;
|
browseExamplesButton;
|
||||||
|
|
||||||
function initialize() {
|
function initialize() {
|
||||||
toolBar = new ToolBar(0, 0, ToolBar.VERTICAL, "highfidelity.examples.toolbar", function(windowDimensions, toolbar) {
|
toolBar = new ToolBar(0, 0, ToolBar.HORIXONTAL, "highfidelity.examples.toolbar", function(windowDimensions, toolbar) {
|
||||||
return {
|
return {
|
||||||
x: windowDimensions.x - 8 - toolbar.width,
|
x: windowDimensions.x / 2 - toolbar.height / 2, // Use toolbar.height to match edit.js
|
||||||
y: 135
|
y: windowDimensions.y - TOOLBAR_MARGIN_Y - toolHeight
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
browseExamplesButton = toolBar.addTool({
|
browseExamplesButton = toolBar.addTool({
|
||||||
|
|
Loading…
Reference in a new issue