mirror of
https://github.com/overte-org/overte.git
synced 2025-04-09 10:45:24 +02:00
saving work
This commit is contained in:
parent
7423bf6ca1
commit
3a89654111
3 changed files with 29 additions and 18 deletions
|
@ -6,10 +6,11 @@
|
|||
<title>Welcome to Interface</title>
|
||||
|
||||
<style>
|
||||
body {
|
||||
body {
|
||||
background: black;
|
||||
width: 100%;
|
||||
overflow-x: hidden;
|
||||
overflow-y: hidden;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
@ -18,7 +19,7 @@
|
|||
position: absolute;
|
||||
left: 70;
|
||||
top: 118;
|
||||
width: 297;
|
||||
width: 160;
|
||||
height: 80;
|
||||
}
|
||||
|
||||
|
@ -26,7 +27,7 @@
|
|||
position: absolute;
|
||||
left: 367;
|
||||
top: 118;
|
||||
width: 267;
|
||||
width: 160;
|
||||
height: 80;
|
||||
}
|
||||
|
||||
|
@ -34,12 +35,12 @@
|
|||
position: absolute;
|
||||
left: 634;
|
||||
top: 118;
|
||||
width: 297;
|
||||
width: 160;
|
||||
height: 80;
|
||||
}
|
||||
|
||||
#image_area {
|
||||
width: 1024;
|
||||
width: 480;
|
||||
height: 720;
|
||||
margin: auto;
|
||||
position: absolute;
|
||||
|
@ -117,7 +118,7 @@
|
|||
|
||||
<body onload="load()">
|
||||
<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="hand_controllers_button" onmousedown="showHandControllers()"></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 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 int THROTTLED_SIM_FRAME_PERIOD_MS = MSECS_PER_SECOND / THROTTLED_SIM_FRAMERATE;
|
||||
|
@ -2397,8 +2397,10 @@ void Application::showHelp() {
|
|||
QUrlQuery queryString;
|
||||
queryString.addQueryItem("handControllerName", handControllerName);
|
||||
queryString.addQueryItem("defaultTab", defaultTab);
|
||||
|
||||
InfoView::show(INFO_HELP_PATH, false, queryString.toString());
|
||||
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
||||
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) {
|
||||
|
|
|
@ -13,8 +13,10 @@
|
|||
/* globals Tablet, Script, HMD, Controller, Menu */
|
||||
|
||||
(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 onHelpScreen = false;
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var button = tablet.addButton({
|
||||
icon: "icons/tablet-icons/help-i.svg",
|
||||
|
@ -25,18 +27,24 @@
|
|||
|
||||
var enabled = false;
|
||||
function onClicked() {
|
||||
if (enabled) {
|
||||
Menu.closeInfoView('InfoView_html/help.html');
|
||||
enabled = !enabled;
|
||||
button.editProperties({isActive: enabled});
|
||||
if (onHelpScreen) {
|
||||
tablet.gotoHomeScreen();
|
||||
} else {
|
||||
var tabletEntity = HMD.tabletID;
|
||||
if (tabletEntity) {
|
||||
Entities.editEntity(tabletEntity, {textures: JSON.stringify({"tex.close" : HOME_BUTTON_TEXTURE})});
|
||||
}
|
||||
Menu.triggerOption('Help...');
|
||||
enabled = !enabled;
|
||||
button.editProperties({isActive: enabled});
|
||||
onHelpScreen = true;
|
||||
}
|
||||
}
|
||||
|
||||
function onScreenChanged(type, url) {
|
||||
onHelpScreen = false;
|
||||
}
|
||||
|
||||
button.clicked.connect(onClicked);
|
||||
tablet.screenChanged.connect(onScreenChanged);
|
||||
|
||||
var POLL_RATE = 500;
|
||||
var interval = Script.setInterval(function () {
|
||||
|
@ -48,8 +56,8 @@
|
|||
}, POLL_RATE);
|
||||
|
||||
Script.scriptEnding.connect(function () {
|
||||
if (enabled) {
|
||||
Menu.closeInfoView('InfoView_html/help.html');
|
||||
if (onUserScreen) {
|
||||
tablet.gotoHomeScreen();
|
||||
}
|
||||
button.clicked.disconnect(onClicked);
|
||||
Script.clearInterval(interval);
|
||||
|
|
Loading…
Reference in a new issue