mirror of
https://github.com/lubosz/overte.git
synced 2025-04-08 01:22:08 +02:00
Merge pull request #3706 from huffman/entity-tool-help
Add edit entities help window
This commit is contained in:
commit
7b5d2ef9f8
7 changed files with 2057 additions and 11 deletions
2036
interface/resources/html/edit-entities-commands.html
Normal file
2036
interface/resources/html/edit-entities-commands.html
Normal file
File diff suppressed because it is too large
Load diff
After Width: | Height: | Size: 193 KiB |
|
@ -585,7 +585,7 @@ void Application::initializeGL() {
|
|||
// update before the first render
|
||||
update(1.f / _fps);
|
||||
|
||||
InfoView::showFirstTime();
|
||||
InfoView::showFirstTime(INFO_HELP_PATH);
|
||||
}
|
||||
|
||||
void Application::paintGL() {
|
||||
|
|
|
@ -128,6 +128,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-allsvg.html";
|
||||
static const QString INFO_EDIT_ENTITIES_PATH = "html/edit-entities-commands.html";
|
||||
|
||||
class Application : public QApplication {
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -359,6 +359,7 @@ Menu::Menu() :
|
|||
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::Bandwidth, 0, true);
|
||||
addActionToQMenuAndActionHash(viewMenu, MenuOption::BandwidthDetails, 0, this, SLOT(bandwidthDetails()));
|
||||
addActionToQMenuAndActionHash(viewMenu, MenuOption::OctreeStats, 0, this, SLOT(octreeStatsDetails()));
|
||||
addActionToQMenuAndActionHash(viewMenu, MenuOption::EditEntitiesHelp, 0, this, SLOT(showEditEntitiesHelp()));
|
||||
|
||||
QMenu* developerMenu = addMenu("Developer");
|
||||
|
||||
|
@ -1117,7 +1118,11 @@ QAction* Menu::getActionForOption(const QString& menuOption) {
|
|||
}
|
||||
|
||||
void Menu::aboutApp() {
|
||||
InfoView::forcedShow();
|
||||
InfoView::forcedShow(INFO_HELP_PATH);
|
||||
}
|
||||
|
||||
void Menu::showEditEntitiesHelp() {
|
||||
InfoView::forcedShow(INFO_EDIT_ENTITIES_PATH);
|
||||
}
|
||||
|
||||
void Menu::bumpSettings() {
|
||||
|
|
|
@ -208,6 +208,7 @@ public slots:
|
|||
|
||||
private slots:
|
||||
void aboutApp();
|
||||
void showEditEntitiesHelp();
|
||||
void bumpSettings();
|
||||
void editPreferences();
|
||||
void editAttachments();
|
||||
|
@ -398,6 +399,7 @@ namespace MenuOption {
|
|||
const QString DontFadeOnVoxelServerChanges = "Don't Fade In/Out on Voxel Server Changes";
|
||||
const QString EchoLocalAudio = "Echo Local Audio";
|
||||
const QString EchoServerAudio = "Echo Server Audio";
|
||||
const QString EditEntitiesHelp = "Edit Entities Help...";
|
||||
const QString Enable3DTVMode = "Enable 3DTV Mode";
|
||||
const QString EnableGlowEffect = "Enable Glow Effect (Warning: Poor Oculus Performance)";
|
||||
const QString EnableVRMode = "Enable VR Mode";
|
||||
|
|
|
@ -20,24 +20,24 @@
|
|||
#define SETTINGS_VERSION_KEY "info-version"
|
||||
#define MAX_DIALOG_HEIGHT_RATIO 0.9
|
||||
|
||||
InfoView::InfoView(bool forced) :
|
||||
InfoView::InfoView(bool forced, QString path) :
|
||||
_forced(forced)
|
||||
{
|
||||
setWindowFlags(Qt::WindowStaysOnTopHint | Qt::CustomizeWindowHint | Qt::WindowCloseButtonHint);
|
||||
|
||||
QString absPath = QFileInfo(Application::resourcesPath() + "html/interface-welcome-allsvg.html").absoluteFilePath();
|
||||
QString absPath = QFileInfo(Application::resourcesPath() + path).absoluteFilePath();
|
||||
QUrl url = QUrl::fromLocalFile(absPath);
|
||||
|
||||
load(url);
|
||||
connect(this, SIGNAL(loadFinished(bool)), this, SLOT(loaded(bool)));
|
||||
}
|
||||
|
||||
void InfoView::showFirstTime() {
|
||||
new InfoView(false);
|
||||
void InfoView::showFirstTime(QString path) {
|
||||
new InfoView(false, path);
|
||||
}
|
||||
|
||||
void InfoView::forcedShow() {
|
||||
new InfoView(true);
|
||||
void InfoView::forcedShow(QString path) {
|
||||
new InfoView(true, path);
|
||||
}
|
||||
|
||||
bool InfoView::shouldShow() {
|
||||
|
|
|
@ -17,11 +17,11 @@
|
|||
class InfoView : public QWebView {
|
||||
Q_OBJECT
|
||||
public:
|
||||
static void showFirstTime();
|
||||
static void forcedShow();
|
||||
static void showFirstTime(QString path);
|
||||
static void forcedShow(QString path);
|
||||
|
||||
private:
|
||||
InfoView(bool forced);
|
||||
InfoView(bool forced, QString path);
|
||||
bool _forced;
|
||||
bool shouldShow();
|
||||
|
||||
|
|
Loading…
Reference in a new issue