Skip to content

Commit

Permalink
Some cleanup. Main menu has some missing items now (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Jan 3, 2017
1 parent 65a89c5 commit 01a5d04
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 23 deletions.
10 changes: 1 addition & 9 deletions radiant/RadiantModule.cpp
Expand Up @@ -20,12 +20,8 @@

#include "ui/texturebrowser/TextureBrowser.h"
#include "ui/mainframe/ScreenUpdateBlocker.h"
#include "textool/TexTool.h"
#include "ui/splash/Splash.h"
#include "wxutil/FileChooser.h"
#include "ui/mru/MRU.h"
#include "map/Map.h"
#include "wxutil/MultiMonitor.h"
#include "brush/csg/CSG.h"

#include "modulesystem/StaticModule.h"
Expand Down Expand Up @@ -183,9 +179,7 @@ void RadiantModule::initialiseModule(const ApplicationContext& ctx)
// Reset the node id count
scene::Node::resetIds();

ui::TexTool::registerCommands();

selection::algorithm::registerCommands();
selection::algorithm::registerCommands();
brush::algorithm::registerCommands();

GlobalCommandSystem().addCommand("Exit", exitCmd);
Expand All @@ -209,8 +203,6 @@ void RadiantModule::postModuleInitialisation()
// Construct the MRU commands and menu structure, load the recently used files
GlobalMRU().initialise();

wxutil::MultiMonitor::printMonitorInfo();

// Initialise the mainframe
GlobalMainFrame().construct();

Expand Down
34 changes: 20 additions & 14 deletions radiant/ui/UserInterfaceModule.cpp
Expand Up @@ -5,6 +5,7 @@
#include "iorthocontextmenu.h"

#include "wxutil/menu/CommandMenuItem.h"
#include "wxutil/MultiMonitor.h"

#include "modulesystem/StaticModule.h"

Expand All @@ -24,6 +25,7 @@
#include "ui/filterdialog/FilterDialog.h"
#include "ui/mousetool/ToolMappingDialog.h"
#include "ui/about/AboutDialog.h"
#include "textool/TexTool.h"

namespace ui
{
Expand Down Expand Up @@ -62,6 +64,8 @@ void UserInterfaceModule::initialiseModule(const ApplicationContext& ctx)
{
rMessage() << getName() << "::initialiseModule called." << std::endl;

wxutil::MultiMonitor::printMonitorInfo();

registerUICommands();

// Register LayerControlDialog
Expand Down Expand Up @@ -103,25 +107,27 @@ void UserInterfaceModule::shutdownModule()

void UserInterfaceModule::registerUICommands()
{
GlobalCommandSystem().addCommand("ProjectSettings", ui::PrefDialog::ShowProjectSettings);
GlobalCommandSystem().addCommand("Preferences", ui::PrefDialog::ShowPrefDialog);
TexTool::registerCommands();

GlobalCommandSystem().addCommand("ProjectSettings", PrefDialog::ShowProjectSettings);
GlobalCommandSystem().addCommand("Preferences", PrefDialog::ShowPrefDialog);

GlobalCommandSystem().addCommand("ToggleConsole", ui::Console::toggle);
GlobalCommandSystem().addCommand("ToggleLightInspector", ui::LightInspector::toggleInspector);
GlobalCommandSystem().addCommand("SurfaceInspector", ui::SurfaceInspector::toggle);
GlobalCommandSystem().addCommand("PatchInspector", ui::PatchInspector::toggle);
GlobalCommandSystem().addCommand("OverlayDialog", ui::OverlayDialog::toggle);
GlobalCommandSystem().addCommand("TransformDialog", ui::TransformDialog::toggle);
GlobalCommandSystem().addCommand("ToggleConsole", Console::toggle);
GlobalCommandSystem().addCommand("ToggleLightInspector", LightInspector::toggleInspector);
GlobalCommandSystem().addCommand("SurfaceInspector", SurfaceInspector::toggle);
GlobalCommandSystem().addCommand("PatchInspector", PatchInspector::toggle);
GlobalCommandSystem().addCommand("OverlayDialog", OverlayDialog::toggle);
GlobalCommandSystem().addCommand("TransformDialog", TransformDialog::toggle);

GlobalCommandSystem().addCommand("FindBrush", DoFind);

GlobalCommandSystem().addCommand("MapInfo", ui::MapInfoDialog::ShowDialog);
GlobalCommandSystem().addCommand("EditFiltersDialog", ui::FilterDialog::ShowDialog);
GlobalCommandSystem().addCommand("MouseToolMappingDialog", ui::ToolMappingDialog::ShowDialog);
GlobalCommandSystem().addCommand("MapInfo", MapInfoDialog::ShowDialog);
GlobalCommandSystem().addCommand("EditFiltersDialog", FilterDialog::ShowDialog);
GlobalCommandSystem().addCommand("MouseToolMappingDialog", ToolMappingDialog::ShowDialog);

GlobalCommandSystem().addCommand("FindReplaceTextures", ui::FindAndReplaceShader::ShowDialog);
GlobalCommandSystem().addCommand("ShowCommandList", ui::CommandList::ShowDialog);
GlobalCommandSystem().addCommand("About", ui::AboutDialog::showDialog);
GlobalCommandSystem().addCommand("FindReplaceTextures", FindAndReplaceShader::ShowDialog);
GlobalCommandSystem().addCommand("ShowCommandList", CommandList::ShowDialog);
GlobalCommandSystem().addCommand("About", AboutDialog::showDialog);

// ----------------------- Bind Events ---------------------------------------

Expand Down

0 comments on commit 01a5d04

Please sign in to comment.