mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 22:51:20 +02:00
saving work
This commit is contained in:
parent
7423bf6ca1
commit
3a89654111
3 changed files with 29 additions and 18 deletions
|
@ -10,6 +10,7 @@
|
||||||
background: black;
|
background: black;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
|
overflow-y: hidden;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
@ -18,7 +19,7 @@
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 70;
|
left: 70;
|
||||||
top: 118;
|
top: 118;
|
||||||
width: 297;
|
width: 160;
|
||||||
height: 80;
|
height: 80;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +27,7 @@
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 367;
|
left: 367;
|
||||||
top: 118;
|
top: 118;
|
||||||
width: 267;
|
width: 160;
|
||||||
height: 80;
|
height: 80;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,12 +35,12 @@
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 634;
|
left: 634;
|
||||||
top: 118;
|
top: 118;
|
||||||
width: 297;
|
width: 160;
|
||||||
height: 80;
|
height: 80;
|
||||||
}
|
}
|
||||||
|
|
||||||
#image_area {
|
#image_area {
|
||||||
width: 1024;
|
width: 480;
|
||||||
height: 720;
|
height: 720;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -117,7 +118,7 @@
|
||||||
|
|
||||||
<body onload="load()">
|
<body onload="load()">
|
||||||
<div id="image_area">
|
<div id="image_area">
|
||||||
<img id="main_image" src="img/controls-help-keyboard.png" width="1024px" height="720px"></img>
|
<img id="main_image" src="img/controls-help-keyboard.png" width="480px" height="720px"></img>
|
||||||
<a href="#" id="kbm_button" onmousedown="showKbm()"></a>
|
<a href="#" id="kbm_button" onmousedown="showKbm()"></a>
|
||||||
<a href="#" id="hand_controllers_button" onmousedown="showHandControllers()"></a>
|
<a href="#" id="hand_controllers_button" onmousedown="showHandControllers()"></a>
|
||||||
<a href="#" id="game_controller_button" onmousedown="showGamepad()"></a>
|
<a href="#" id="game_controller_button" onmousedown="showGamepad()"></a>
|
||||||
|
|
|
@ -222,7 +222,7 @@ static const float MIRROR_FULLSCREEN_DISTANCE = 0.389f;
|
||||||
static const quint64 TOO_LONG_SINCE_LAST_SEND_DOWNSTREAM_AUDIO_STATS = 1 * USECS_PER_SECOND;
|
static const quint64 TOO_LONG_SINCE_LAST_SEND_DOWNSTREAM_AUDIO_STATS = 1 * USECS_PER_SECOND;
|
||||||
|
|
||||||
static const QString INFO_EDIT_ENTITIES_PATH = "html/edit-commands.html";
|
static const QString INFO_EDIT_ENTITIES_PATH = "html/edit-commands.html";
|
||||||
static const QString INFO_HELP_PATH = "html/help.html";
|
static const QString INFO_HELP_PATH = "../../../html/tabletHelp.html";
|
||||||
|
|
||||||
static const unsigned int THROTTLED_SIM_FRAMERATE = 15;
|
static const unsigned int THROTTLED_SIM_FRAMERATE = 15;
|
||||||
static const int THROTTLED_SIM_FRAME_PERIOD_MS = MSECS_PER_SECOND / THROTTLED_SIM_FRAMERATE;
|
static const int THROTTLED_SIM_FRAME_PERIOD_MS = MSECS_PER_SECOND / THROTTLED_SIM_FRAMERATE;
|
||||||
|
@ -2397,8 +2397,10 @@ void Application::showHelp() {
|
||||||
QUrlQuery queryString;
|
QUrlQuery queryString;
|
||||||
queryString.addQueryItem("handControllerName", handControllerName);
|
queryString.addQueryItem("handControllerName", handControllerName);
|
||||||
queryString.addQueryItem("defaultTab", defaultTab);
|
queryString.addQueryItem("defaultTab", defaultTab);
|
||||||
|
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
||||||
InfoView::show(INFO_HELP_PATH, false, queryString.toString());
|
TabletProxy* tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));
|
||||||
|
tablet->gotoWebScreen(INFO_HELP_PATH + "?" + queryString.toString());
|
||||||
|
//InfoView::show(INFO_HELP_PATH, false, queryString.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::resizeEvent(QResizeEvent* event) {
|
void Application::resizeEvent(QResizeEvent* event) {
|
||||||
|
|
|
@ -14,7 +14,9 @@
|
||||||
|
|
||||||
(function() { // BEGIN LOCAL_SCOPE
|
(function() { // BEGIN LOCAL_SCOPE
|
||||||
|
|
||||||
|
var HOME_BUTTON_TEXTURE = Script.resourcesPath() + "meshes/tablet-with-home-button.fbx/tablet-with-home-button.fbm/button-root.png";
|
||||||
var buttonName = "HELP";
|
var buttonName = "HELP";
|
||||||
|
var onHelpScreen = false;
|
||||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||||
var button = tablet.addButton({
|
var button = tablet.addButton({
|
||||||
icon: "icons/tablet-icons/help-i.svg",
|
icon: "icons/tablet-icons/help-i.svg",
|
||||||
|
@ -25,18 +27,24 @@
|
||||||
|
|
||||||
var enabled = false;
|
var enabled = false;
|
||||||
function onClicked() {
|
function onClicked() {
|
||||||
if (enabled) {
|
if (onHelpScreen) {
|
||||||
Menu.closeInfoView('InfoView_html/help.html');
|
tablet.gotoHomeScreen();
|
||||||
enabled = !enabled;
|
|
||||||
button.editProperties({isActive: enabled});
|
|
||||||
} else {
|
} else {
|
||||||
|
var tabletEntity = HMD.tabletID;
|
||||||
|
if (tabletEntity) {
|
||||||
|
Entities.editEntity(tabletEntity, {textures: JSON.stringify({"tex.close" : HOME_BUTTON_TEXTURE})});
|
||||||
|
}
|
||||||
Menu.triggerOption('Help...');
|
Menu.triggerOption('Help...');
|
||||||
enabled = !enabled;
|
onHelpScreen = true;
|
||||||
button.editProperties({isActive: enabled});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onScreenChanged(type, url) {
|
||||||
|
onHelpScreen = false;
|
||||||
|
}
|
||||||
|
|
||||||
button.clicked.connect(onClicked);
|
button.clicked.connect(onClicked);
|
||||||
|
tablet.screenChanged.connect(onScreenChanged);
|
||||||
|
|
||||||
var POLL_RATE = 500;
|
var POLL_RATE = 500;
|
||||||
var interval = Script.setInterval(function () {
|
var interval = Script.setInterval(function () {
|
||||||
|
@ -48,8 +56,8 @@
|
||||||
}, POLL_RATE);
|
}, POLL_RATE);
|
||||||
|
|
||||||
Script.scriptEnding.connect(function () {
|
Script.scriptEnding.connect(function () {
|
||||||
if (enabled) {
|
if (onUserScreen) {
|
||||||
Menu.closeInfoView('InfoView_html/help.html');
|
tablet.gotoHomeScreen();
|
||||||
}
|
}
|
||||||
button.clicked.disconnect(onClicked);
|
button.clicked.disconnect(onClicked);
|
||||||
Script.clearInterval(interval);
|
Script.clearInterval(interval);
|
||||||
|
|
Loading…
Reference in a new issue