mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 12:38:27 +02:00
Add console to menu
This commit is contained in:
parent
c362731226
commit
3d28cff9df
2 changed files with 19 additions and 0 deletions
|
@ -78,6 +78,7 @@ Menu::Menu() :
|
||||||
_faceshiftEyeDeflection(DEFAULT_FACESHIFT_EYE_DEFLECTION),
|
_faceshiftEyeDeflection(DEFAULT_FACESHIFT_EYE_DEFLECTION),
|
||||||
_frustumDrawMode(FRUSTUM_DRAW_MODE_ALL),
|
_frustumDrawMode(FRUSTUM_DRAW_MODE_ALL),
|
||||||
_viewFrustumOffset(DEFAULT_FRUSTUM_OFFSET),
|
_viewFrustumOffset(DEFAULT_FRUSTUM_OFFSET),
|
||||||
|
_jsConsole(NULL),
|
||||||
_octreeStatsDialog(NULL),
|
_octreeStatsDialog(NULL),
|
||||||
_lodToolsDialog(NULL),
|
_lodToolsDialog(NULL),
|
||||||
_maxVoxels(DEFAULT_MAX_VOXELS_PER_SYSTEM),
|
_maxVoxels(DEFAULT_MAX_VOXELS_PER_SYSTEM),
|
||||||
|
@ -222,6 +223,12 @@ Menu::Menu() :
|
||||||
_chatWindow = new ChatWindow(Application::getInstance()->getWindow());
|
_chatWindow = new ChatWindow(Application::getInstance()->getWindow());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
addActionToQMenuAndActionHash(toolsMenu,
|
||||||
|
MenuOption::Console,
|
||||||
|
Qt::CTRL | Qt::Key_QuoteLeft,
|
||||||
|
this,
|
||||||
|
SLOT(showConsole()));
|
||||||
|
|
||||||
QMenu* viewMenu = addMenu("View");
|
QMenu* viewMenu = addMenu("View");
|
||||||
|
|
||||||
addCheckableActionToQMenuAndActionHash(viewMenu,
|
addCheckableActionToQMenuAndActionHash(viewMenu,
|
||||||
|
@ -1195,6 +1202,14 @@ void Menu::toggleChat() {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Menu::showConsole() {
|
||||||
|
QMainWindow* mainWindow = Application::getInstance()->getWindow();
|
||||||
|
if (!_jsConsole) {
|
||||||
|
_jsConsole = new JSConsole(mainWindow);
|
||||||
|
}
|
||||||
|
_jsConsole->setVisible(!_jsConsole->isVisible());
|
||||||
|
}
|
||||||
|
|
||||||
void Menu::audioMuteToggled() {
|
void Menu::audioMuteToggled() {
|
||||||
QAction *muteAction = _actionHash.value(MenuOption::MuteAudio);
|
QAction *muteAction = _actionHash.value(MenuOption::MuteAudio);
|
||||||
muteAction->setChecked(Application::getInstance()->getAudio()->getMuted());
|
muteAction->setChecked(Application::getInstance()->getAudio()->getMuted());
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
#include "location/LocationManager.h"
|
#include "location/LocationManager.h"
|
||||||
#include "ui/PreferencesDialog.h"
|
#include "ui/PreferencesDialog.h"
|
||||||
#include "ui/ChatWindow.h"
|
#include "ui/ChatWindow.h"
|
||||||
|
#include "ui/JSConsole.h"
|
||||||
#include "ui/ScriptEditorWindow.h"
|
#include "ui/ScriptEditorWindow.h"
|
||||||
|
|
||||||
const float ADJUST_LOD_DOWN_FPS = 40.0;
|
const float ADJUST_LOD_DOWN_FPS = 40.0;
|
||||||
|
@ -187,6 +188,7 @@ private slots:
|
||||||
void showMetavoxelEditor();
|
void showMetavoxelEditor();
|
||||||
void showScriptEditor();
|
void showScriptEditor();
|
||||||
void showChat();
|
void showChat();
|
||||||
|
void showConsole();
|
||||||
void toggleChat();
|
void toggleChat();
|
||||||
void audioMuteToggled();
|
void audioMuteToggled();
|
||||||
void namedLocationCreated(LocationManager::NamedLocationCreateResponse response);
|
void namedLocationCreated(LocationManager::NamedLocationCreateResponse response);
|
||||||
|
@ -241,6 +243,7 @@ private:
|
||||||
QPointer<MetavoxelEditor> _MetavoxelEditor;
|
QPointer<MetavoxelEditor> _MetavoxelEditor;
|
||||||
QPointer<ScriptEditorWindow> _ScriptEditor;
|
QPointer<ScriptEditorWindow> _ScriptEditor;
|
||||||
QPointer<ChatWindow> _chatWindow;
|
QPointer<ChatWindow> _chatWindow;
|
||||||
|
JSConsole* _jsConsole;
|
||||||
OctreeStatsDialog* _octreeStatsDialog;
|
OctreeStatsDialog* _octreeStatsDialog;
|
||||||
LodToolsDialog* _lodToolsDialog;
|
LodToolsDialog* _lodToolsDialog;
|
||||||
int _maxVoxels;
|
int _maxVoxels;
|
||||||
|
@ -297,6 +300,7 @@ namespace MenuOption {
|
||||||
const QString CollideWithParticles = "Collide With Particles";
|
const QString CollideWithParticles = "Collide With Particles";
|
||||||
const QString CollideWithVoxels = "Collide With Voxels";
|
const QString CollideWithVoxels = "Collide With Voxels";
|
||||||
const QString Collisions = "Collisions";
|
const QString Collisions = "Collisions";
|
||||||
|
const QString Console = "Console...";
|
||||||
const QString DecreaseAvatarSize = "Decrease Avatar Size";
|
const QString DecreaseAvatarSize = "Decrease Avatar Size";
|
||||||
const QString DecreaseVoxelSize = "Decrease Voxel Size";
|
const QString DecreaseVoxelSize = "Decrease Voxel Size";
|
||||||
const QString DisableAutoAdjustLOD = "Disable Automatically Adjusting LOD";
|
const QString DisableAutoAdjustLOD = "Disable Automatically Adjusting LOD";
|
||||||
|
|
Loading…
Reference in a new issue