mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 01:24:03 +02:00
Merge pull request #8745 from huffman/feat/new-help-window
Update the help window
This commit is contained in:
commit
3a294e77d4
6 changed files with 76 additions and 4 deletions
71
interface/resources/html/help.html
Normal file
71
interface/resources/html/help.html
Normal file
|
@ -0,0 +1,71 @@
|
|||
<!-- Copyright 2016 High Fidelity, Inc. -->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<input type="hidden" id="version" value="1"/>
|
||||
<title>Welcome to Interface</title>
|
||||
|
||||
<style>
|
||||
body {
|
||||
background: black;
|
||||
width: 100%;
|
||||
overflow-x: hidden;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#kbm_button {
|
||||
position: absolute;
|
||||
left: 70;
|
||||
top: 118;
|
||||
width: 297;
|
||||
height: 80;
|
||||
}
|
||||
|
||||
#hand_controllers_button {
|
||||
position: absolute;
|
||||
left: 367;
|
||||
top: 118;
|
||||
width: 267;
|
||||
height: 80;
|
||||
}
|
||||
|
||||
#game_controller_button {
|
||||
position: absolute;
|
||||
left: 634;
|
||||
top: 118;
|
||||
width: 297;
|
||||
height: 80;
|
||||
}
|
||||
|
||||
#image_area {
|
||||
width: 1024;
|
||||
height: 720;
|
||||
margin: auto;
|
||||
position: absolute;
|
||||
top: 0; left: 0; bottom: 0; right: 0;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function showKbm() {
|
||||
document.getElementById("main_image").setAttribute("src", "img/controls-help-keyboard.png");
|
||||
}
|
||||
function showHandControllers() {
|
||||
document.getElementById("main_image").setAttribute("src", "img/controls-help-vive.png");
|
||||
}
|
||||
function showGameController() {
|
||||
document.getElementById("main_image").setAttribute("src", "img/controls-help-gamepad.png");
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="image_area">
|
||||
<img id="main_image" src="img/controls-help-keyboard.png" width="1024px" 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="showGameController()"></a>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
BIN
interface/resources/html/img/controls-help-gamepad.png
Normal file
BIN
interface/resources/html/img/controls-help-gamepad.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 94 KiB |
BIN
interface/resources/html/img/controls-help-keyboard.png
Normal file
BIN
interface/resources/html/img/controls-help-keyboard.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 68 KiB |
BIN
interface/resources/html/img/controls-help-vive.png
Normal file
BIN
interface/resources/html/img/controls-help-vive.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 100 KiB |
|
@ -198,8 +198,9 @@ static const float MIRROR_FIELD_OF_VIEW = 30.0f;
|
|||
|
||||
static const quint64 TOO_LONG_SINCE_LAST_SEND_DOWNSTREAM_AUDIO_STATS = 1 * USECS_PER_SECOND;
|
||||
|
||||
static const QString INFO_HELP_PATH = "html/interface-welcome.html";
|
||||
static const QString INFO_WELCOME_PATH = "html/interface-welcome.html";
|
||||
static const QString INFO_EDIT_ENTITIES_PATH = "html/edit-commands.html";
|
||||
static const QString INFO_HELP_PATH = "html/help.html";
|
||||
|
||||
static const unsigned int THROTTLED_SIM_FRAMERATE = 15;
|
||||
static const int THROTTLED_SIM_FRAME_PERIOD_MS = MSECS_PER_SECOND / THROTTLED_SIM_FRAMERATE;
|
||||
|
@ -1999,11 +2000,11 @@ void Application::setFieldOfView(float fov) {
|
|||
}
|
||||
|
||||
void Application::aboutApp() {
|
||||
InfoView::show(INFO_HELP_PATH);
|
||||
InfoView::show(INFO_WELCOME_PATH);
|
||||
}
|
||||
|
||||
void Application::showHelp() {
|
||||
InfoView::show(INFO_EDIT_ENTITIES_PATH);
|
||||
InfoView::show(INFO_HELP_PATH);
|
||||
}
|
||||
|
||||
void Application::resizeEvent(QResizeEvent* event) {
|
||||
|
|
|
@ -66,7 +66,7 @@ void InfoView::show(const QString& path, bool firstOrChangedOnly) {
|
|||
QString infoViewName(NAME + "_" + path);
|
||||
offscreenUi->show(QML, NAME + "_" + path, [=](QQmlContext* context, QObject* newObject){
|
||||
QQuickItem* item = dynamic_cast<QQuickItem*>(newObject);
|
||||
item->setWidth(720);
|
||||
item->setWidth(1024);
|
||||
item->setHeight(720);
|
||||
InfoView* newInfoView = newObject->findChild<InfoView*>();
|
||||
Q_ASSERT(newInfoView);
|
||||
|
|
Loading…
Reference in a new issue