#include "feedback.h"
#include "referencecache.h"
#include "texwindow.h"
+#include "filterbar.h"
struct layout_globals_t
GlobalFileSystem().initialise();
g_vfsInitialized = true;
}
+
void VFS_Shutdown(){
if ( !g_vfsInitialized ) return;
GlobalFileSystem().shutdown();
g_vfsInitialized = false;
}
+
void VFS_Refresh(){
if ( !g_vfsInitialized ) return;
GlobalFileSystem().clear();
QE_InitVFS();
GlobalFileSystem().refresh();
g_vfsInitialized = true;
- // also refresg models
+ // also refresh models
RefreshReferences();
// also refresh texture browser
TextureBrowser_RefreshShaders();
}
+
void VFS_Restart(){
VFS_Shutdown();
VFS_Init();
public:
void realise(){
VFS_Init();
-}
+ }
+
void unrealise(){
VFS_Shutdown();
}
void VFS_Construct(){
Radiant_attachHomePathsObserver( g_VFSModuleObserver );
}
+
void VFS_Destroy(){
Radiant_detachHomePathsObserver( g_VFSModuleObserver );
}
typedef HRESULT ( WINAPI qSHGetKnownFolderPath_t )( qREFKNOWNFOLDERID rfid, DWORD dwFlags, HANDLE hToken, PWSTR *ppszPath );
static qSHGetKnownFolderPath_t *qSHGetKnownFolderPath;
#endif
+
void HomePaths_Realise(){
do
{
public:
HomePathsModuleObserver() : m_unrealised( 1 ){
}
+
void realise(){
if ( --m_unrealised == 0 ) {
HomePaths_Realise();
g_homePathObservers.realise();
}
}
+
void unrealise(){
if ( ++m_unrealised == 1 ) {
g_homePathObservers.unrealise();
void HomePaths_Construct(){
Radiant_attachEnginePathObserver( g_HomePathsModuleObserver );
}
+
void HomePaths_Destroy(){
Radiant_detachEnginePathObserver( g_HomePathsModuleObserver );
}
}
}
+// Pak Path
+
+CopiedString g_strPakPath[g_pakPathCount] = { "", "", "", "", "" };
+ModuleObservers g_pakPathObservers[g_pakPathCount];
+std::size_t g_pakpath_unrealised[g_pakPathCount] = { 1, 1, 1, 1, 1 };
+
+void Radiant_attachPakPathObserver( int num, ModuleObserver& observer ){
+ g_pakPathObservers[num].attach( observer );
+}
+
+void Radiant_detachPakPathObserver( int num, ModuleObserver& observer ){
+ g_pakPathObservers[num].detach( observer );
+}
+
+
+void PakPath_Realise( int num ){
+ if ( --g_pakpath_unrealised[num] == 0 ) {
+ g_pakPathObservers[num].realise();
+ }
+}
+
+const char* PakPath_get( int num ){
+ std::string message = "PakPath_get: pak path " + std::to_string(num) + " not realised";
+ ASSERT_MESSAGE( g_pakpath_unrealised[num] == 0, message.c_str() );
+ return g_strPakPath[num].c_str();
+}
+
+void PakPath_Unrealise( int num ){
+ if ( ++g_pakpath_unrealised[num] == 1 ) {
+ g_pakPathObservers[num].unrealise();
+ }
+}
+
+void setPakPath( int num, const char* path ){
+ if (!g_strcmp0( path, "")) {
+ g_strPakPath[num] = "";
+ return;
+ }
+
+ StringOutputStream buffer( 256 );
+ buffer << DirectoryCleaned( path );
+ if ( !path_equal( buffer.c_str(), g_strPakPath[num].c_str() ) ) {
+ std::string message = "Changing Pak Path " + std::to_string(num);
+ ScopeDisableScreenUpdates disableScreenUpdates( "Processing...", message.c_str() );
+
+ PakPath_Unrealise(num);
+
+ g_strPakPath[num] = buffer.c_str();
+
+ PakPath_Realise(num);
+ }
+}
+
// App Path
/// directory for temp files
/// NOTE: on *nix this is were we check for .pid
CopiedString g_strSettingsPath;
+
const char* SettingsPath_get(){
return g_strSettingsPath.c_str();
}
}
static void Import(CopiedString &self, const char *value) {
- setEnginePath(value);
+ setEnginePath( value );
+}
+};
+
+struct PakPath0 {
+ static void Export( const CopiedString &self, const Callback<void(const char*)> &returnz ) {
+ returnz( self.c_str() );
+ }
+
+ static void Import( CopiedString &self, const char *value ) {
+ setPakPath( 0, value );
}
};
+struct PakPath1 {
+ static void Export( const CopiedString &self, const Callback<void(const char*)> &returnz ) {
+ returnz( self.c_str() );
+ }
+
+ static void Import( CopiedString &self, const char *value ) {
+ setPakPath( 1, value );
+ }
+};
+
+struct PakPath2 {
+ static void Export( const CopiedString &self, const Callback<void(const char*)> &returnz ) {
+ returnz( self.c_str() );
+ }
+
+ static void Import( CopiedString &self, const char *value ) {
+ setPakPath( 2, value );
+ }
+};
+
+struct PakPath3 {
+ static void Export( const CopiedString &self, const Callback<void(const char*)> &returnz ) {
+ returnz( self.c_str() );
+ }
+
+ static void Import( CopiedString &self, const char *value ) {
+ setPakPath( 3, value );
+ }
+};
+
+struct PakPath4 {
+ static void Export( const CopiedString &self, const Callback<void(const char*)> &returnz ) {
+ returnz( self.c_str() );
+ }
+
+ static void Import( CopiedString &self, const char *value ) {
+ setPakPath( 4, value );
+ }
+};
+
+bool g_disableEnginePath = false;
+bool g_disableHomePath = false;
+
void Paths_constructPreferences( PreferencesPage& page ){
page.appendPathEntry( "Engine Path", true, make_property<EnginePath>(g_strEnginePath) );
+
+ page.appendCheckBox(
+ "", "Do not use Engine Path",
+ g_disableEnginePath
+ );
+
+ page.appendCheckBox(
+ "", "Do not use Home Path",
+ g_disableHomePath
+ );
+
+ for ( int i = 0; i < g_pakPathCount; i++ ) {
+ std::string label = "Pak Path " + std::to_string(i);
+ switch (i) {
+ case 0:
+ page.appendPathEntry( label.c_str(), true, make_property<PakPath0>( g_strPakPath[i] ) );
+ break;
+ case 1:
+ page.appendPathEntry( label.c_str(), true, make_property<PakPath1>( g_strPakPath[i] ) );
+ break;
+ case 2:
+ page.appendPathEntry( label.c_str(), true, make_property<PakPath2>( g_strPakPath[i] ) );
+ break;
+ case 3:
+ page.appendPathEntry( label.c_str(), true, make_property<PakPath3>( g_strPakPath[i] ) );
+ break;
+ case 4:
+ page.appendPathEntry( label.c_str(), true, make_property<PakPath4>( g_strPakPath[i] ) );
+ break;
}
+ }
+}
+
void Paths_constructPage( PreferenceGroup& group ){
PreferencesPage page( group.createPage( "Paths", "Path Settings" ) );
Paths_constructPreferences( page );
}
+
void Paths_registerPreferencesPage(){
PreferencesDialog_addSettingsPage( makeCallbackF(Paths_constructPage) );
}
PathsDialog g_PathsDialog;
+bool g_strEnginePath_was_empty_1st_start = false;
+
void EnginePath_verify(){
- if ( !file_exists( g_strEnginePath.c_str() ) ) {
+ if ( !file_exists( g_strEnginePath.c_str() ) || g_strEnginePath_was_empty_1st_start ) {
g_PathsDialog.Create();
g_PathsDialog.DoModal();
g_PathsDialog.Destroy();
public:
WorldspawnColourEntityClassObserver() : m_unrealised( 1 ){
}
+
void realise(){
if ( --m_unrealised == 0 ) {
SetWorldspawnColour( g_xywindow_globals.color_brushes );
}
}
+
void unrealise(){
if ( ++m_unrealised == 1 ) {
}
ChooseColour( const GetColourCallback& get, const SetColourCallback& set )
: m_get( get ), m_set( set ){
}
+
void operator()(){
Vector3 colour;
m_get( colour );
};
-
void Colour_get( const Vector3& colour, Vector3& other ){
other = colour;
}
+
typedef ConstReferenceCaller<Vector3, void(Vector3&), Colour_get> ColourGetCaller;
void Colour_set( Vector3& colour, const Vector3& other ){
colour = other;
SceneChangeNotify();
}
+
typedef ReferenceCaller<Vector3, void(const Vector3&), Colour_set> ColourSetCaller;
void BrushColour_set( const Vector3& other ){
SetWorldspawnColour( g_xywindow_globals.color_brushes );
SceneChangeNotify();
}
+
typedef FreeCaller<void(const Vector3&), BrushColour_set> BrushColourSetCaller;
void ClipperColour_set( const Vector3& other ){
Brush_clipperColourChanged();
SceneChangeNotify();
}
+
typedef FreeCaller<void(const Vector3&), ClipperColour_set> ClipperColourSetCaller;
void TextureBrowserColour_get( Vector3& other ){
other = TextureBrowser_getBackgroundColour( GlobalTextureBrowser() );
}
+
typedef FreeCaller<void(Vector3&), TextureBrowserColour_get> TextureBrowserColourGetCaller;
void TextureBrowserColour_set( const Vector3& other ){
TextureBrowser_setBackgroundColour( GlobalTextureBrowser(), other );
}
+
typedef FreeCaller<void(const Vector3&), TextureBrowserColour_set> TextureBrowserColourSetCaller;
}
-
void SetClipMode( bool enable );
+
void ModeChangeNotify();
typedef void ( *ToolMode )();
+
ToolMode g_currentToolMode = 0;
bool g_currentToolModeSupportsComponentEditing = false;
ToolMode g_defaultToolMode = 0;
-
void SelectionSystem_DefaultMode(){
GlobalSelectionSystem().SetMode( SelectionSystem::ePrimitive );
GlobalSelectionSystem().SetComponentMode( SelectionSystem::eDefault );
public:
CloneSelected( bool d ) : doMakeUnique( d ), worldspawn( Map_FindOrInsertWorldspawn( g_map ) ){
}
+
bool pre( const scene::Path& path, scene::Instance& instance ) const {
if ( path.size() == 1 ) {
return true;
return true;
}
+
void post( const scene::Path& path, scene::Instance& instance ) const {
if ( path.size() == 1 ) {
return;
Vector3 x;
Vector3 y;
Vector3 z;
+
AxisBase( const Vector3& x_, const Vector3& y_, const Vector3& z_ )
: x( x_ ), y( y_ ), z( z_ ){
}
SnappableSnapToGridSelected( float snap )
: m_snap( snap ){
}
+
bool pre( const scene::Path& path, scene::Instance& instance ) const {
if ( path.top().get().visible() ) {
Snappable* snappable = Node_getSnappable( path.top() );
ComponentSnappableSnapToGridSelected( float snap )
: m_snap( snap ){
}
+
bool pre( const scene::Path& path, scene::Instance& instance ) const {
if ( path.top().get().visible() ) {
ComponentSnappable* componentSnappable = Instance_getComponentSnappable( instance );
}
-
void GlobalCamera_UpdateWindow(){
if ( g_pParentWnd != 0 ) {
CamWnd_Update( *g_pParentWnd->GetCamWnd() );
LatchedValue<bool> g_Layout_enableDetachableMenus( true, "Detachable Menus" );
LatchedValue<bool> g_Layout_enablePatchToolbar( true, "Patch Toolbar" );
LatchedValue<bool> g_Layout_enablePluginToolbar( true, "Plugin Toolbar" );
-
+LatchedValue<bool> g_Layout_enableFilterToolbar( true, "Filter Toolbar" );
ui::MenuItem create_file_menu(){
create_menu_item_with_mnemonic( menu, "_Export selected...", "ExportSelected" );
menu_separator( menu );
create_menu_item_with_mnemonic( menu, "Save re_gion...", "SaveRegion" );
- menu_separator( menu );
- create_menu_item_with_mnemonic( menu, "_Refresh models", "RefreshReferences" );
- menu_separator( menu );
+// menu_separator( menu );
+// create_menu_item_with_mnemonic( menu, "_Refresh models", "RefreshReferences" );
+// menu_separator( menu );
create_menu_item_with_mnemonic( menu, "Pro_ject settings...", "ProjectSettings" );
menu_separator( menu );
create_menu_item_with_mnemonic( menu, "_Pointfile...", "TogglePointfile" );
menu_separator( menu );
MRU_constructMenu( menu );
menu_separator( menu );
+// create_menu_item_with_mnemonic( menu, "Check for NetRadiant update (web)", "CheckForUpdate" ); // FIXME
create_menu_item_with_mnemonic( menu, "E_xit", "Exit" );
return file_menu_item;
create_menu_item_with_mnemonic( menu, "Duplicate, make uni_que", "CloneSelectionAndMakeUnique" );
create_menu_item_with_mnemonic( menu, "D_elete", "DeleteSelection" );
menu_separator( menu );
- create_menu_item_with_mnemonic( menu, "Pa_rent", "ParentSelection" );
+ create_menu_item_with_mnemonic( menu, "Snap To Grid", "SnapToGrid" );
+ //create_menu_item_with_mnemonic( menu, "Pa_rent", "ParentSelection" );
menu_separator( menu );
create_menu_item_with_mnemonic( menu, "C_lear Selection", "UnSelectSelection" );
create_menu_item_with_mnemonic( menu, "_Invert Selection", "InvertSelection" );
create_menu_item_with_mnemonic( menu, "Select i_nside", "SelectInside" );
create_menu_item_with_mnemonic( menu, "Select _touching", "SelectTouching" );
- auto convert_menu = create_sub_menu_with_mnemonic( menu, "E_xpand Selection" );
- if ( g_Layout_enableDetachableMenus.m_value ) {
- menu_tearoff( convert_menu );
- }
- create_menu_item_with_mnemonic( convert_menu, "To Whole _Entities", "ExpandSelectionToEntities" );
+ menu_separator( menu );
+
+// auto convert_menu = create_sub_menu_with_mnemonic( menu, "E_xpand Selection" );
+// if ( g_Layout_enableDetachableMenus.m_value ) {
+// menu_tearoff( convert_menu );
+// }
+ create_menu_item_with_mnemonic( menu, "Select All Of Type", "SelectAllOfType" );
+ create_menu_item_with_mnemonic( menu, "_Expand Selection To Entities", "ExpandSelectionToEntities" );
menu_separator( menu );
create_menu_item_with_mnemonic( menu, "Pre_ferences...", "Preferences" );
create_menu_item_with_mnemonic( menu, "Entity Inspector", "ViewEntityInfo" );
}
create_menu_item_with_mnemonic( menu, "_Surface Inspector", "SurfaceInspector" );
+ create_menu_item_with_mnemonic( menu, "_Patch Inspector", "PatchInspector" );
create_menu_item_with_mnemonic( menu, "Entity List", "EntityList" );
menu_separator( menu );
menu_separator( orthographic_menu );
}
+ create_menu_item_with_mnemonic( orthographic_menu, "Center on Selected", "CenterXYView" );
+ menu_separator( orthographic_menu );
create_menu_item_with_mnemonic( orthographic_menu, "_XY 100%", "Zoom100" );
create_menu_item_with_mnemonic( orthographic_menu, "XY Zoom _In", "ZoomIn" );
create_menu_item_with_mnemonic( orthographic_menu, "XY Zoom _Out", "ZoomOut" );
if ( g_Layout_enableDetachableMenus.m_value ) {
menu_tearoff( menu_in_menu );
}
+ create_menu_item_with_mnemonic( menu_in_menu, "Show Size Info", "ToggleSizePaint" );
+ create_menu_item_with_mnemonic( menu_in_menu, "Show Crosshair", "ToggleCrosshairs" );
+ create_menu_item_with_mnemonic( menu_in_menu, "Show Grid", "ToggleGrid" );
+
+ menu_separator( menu_in_menu );
+
create_check_menu_item_with_mnemonic( menu_in_menu, "Show _Angles", "ShowAngles" );
create_check_menu_item_with_mnemonic( menu_in_menu, "Show _Names", "ShowNames" );
create_check_menu_item_with_mnemonic( menu_in_menu, "Show Blocks", "ShowBlocks" );
}
menu_separator( menu );
{
- auto menu_in_menu = create_sub_menu_with_mnemonic( menu, "Hide/Show" );
- if ( g_Layout_enableDetachableMenus.m_value ) {
- menu_tearoff( menu_in_menu );
- }
- create_menu_item_with_mnemonic( menu_in_menu, "Hide Selected", "HideSelected" );
- create_menu_item_with_mnemonic( menu_in_menu, "Show Hidden", "ShowHidden" );
+// GtkMenu* menu_in_menu = create_sub_menu_with_mnemonic( menu, "Hide/Show" );
+// if ( g_Layout_enableDetachableMenus.m_value ) {
+// menu_tearoff( menu_in_menu );
+// }
+// create_menu_item_with_mnemonic( menu_in_menu, "Hide Selected", "HideSelected" );
+// create_menu_item_with_mnemonic( menu_in_menu, "Show Hidden", "ShowHidden" );
+ create_menu_item_with_mnemonic( menu, "Hide Selected", "HideSelected" );
+ create_menu_item_with_mnemonic( menu, "Show Hidden", "ShowHidden" );
}
menu_separator( menu );
{
menu_tearoff( menu );
}
- create_menu_item_with_mnemonic( menu, "Manual", "OpenManual" );
+// create_menu_item_with_mnemonic( menu, "Manual", "OpenManual" );
// this creates all the per-game drop downs for the game pack helps
// it will take care of hooking the Sys_OpenURL calls etc.
}
void Patch_registerShortcuts(){
- command_connect_accelerator( "InvertCurveTextureX" );
- command_connect_accelerator( "InvertCurveTextureY" );
+// command_connect_accelerator( "InvertCurveTextureX" );
+// command_connect_accelerator( "InvertCurveTextureY" );
command_connect_accelerator( "PatchInsertInsertColumn" );
command_connect_accelerator( "PatchInsertInsertRow" );
command_connect_accelerator( "PatchDeleteLastColumn" );
command_connect_accelerator( "PatchDeleteLastRow" );
- command_connect_accelerator( "NaturalizePatch" );
+// command_connect_accelerator( "NaturalizePatch" );
//command_connect_accelerator("CapCurrentCurve");
}
//command_connect_accelerator("SelectNudgeRight");
//command_connect_accelerator("SelectNudgeUp");
//command_connect_accelerator("SelectNudgeDown");
+ command_connect_accelerator( "UnSelectSelection2" );
+ command_connect_accelerator( "DeleteSelection2" );
}
void SnapToGrid_registerShortcuts(){
void register_shortcuts(){
- PatchInspector_registerShortcuts();
+// PatchInspector_registerShortcuts();
Patch_registerShortcuts();
Grid_registerShortcuts();
- XYWnd_registerShortcuts();
+// XYWnd_registerShortcuts();
CamWnd_registerShortcuts();
Manipulators_registerShortcuts();
SurfaceInspector_registerShortcuts();
TexdefNudge_registerShortcuts();
SelectNudge_registerShortcuts();
- SnapToGrid_registerShortcuts();
- SelectByType_registerShortcuts();
+// SnapToGrid_registerShortcuts();
+// SelectByType_registerShortcuts();
}
void File_constructToolbar( ui::Toolbar toolbar ){
void CSG_constructToolbar( ui::Toolbar toolbar ){
toolbar_append_button( toolbar, "CSG Subtract (SHIFT + U)", "selection_csgsubtract.png", "CSGSubtract" );
toolbar_append_button( toolbar, "CSG Merge (CTRL + U)", "selection_csgmerge.png", "CSGMerge" );
- toolbar_append_button( toolbar, "Hollow", "selection_makehollow.png", "CSGHollow" );
+ toolbar_append_button( toolbar, "Make Hollow", "selection_makehollow.png", "CSGHollow" );
+ toolbar_append_button( toolbar, "Make Room", "selection_makeroom.png", "CSGRoom" );
}
void ComponentModes_constructToolbar( ui::Toolbar toolbar ){
return FALSE;
}
+
public:
void connect( ui::Window toplevel_window ){
toplevel_window.connect( "notify::is-active", G_CALLBACK( notify ), this );
gtk_window_set_decorated(window, false);
gtk_window_set_resizable(window, false);
gtk_window_set_modal(window, true);
- gtk_window_set_default_size(window, -1, -1);
- gtk_window_set_position(window, GTK_WIN_POS_CENTER);
+ gtk_window_set_default_size( window, -1, -1 );
+ gtk_window_set_position( window, GTK_WIN_POS_CENTER );
gtk_container_set_border_width(window, 0);
- auto image = new_local_image("splash.png");
+ auto image = new_local_image( "splash.png" );
image.show();
window.add(image);
auto main_toolbar = create_main_toolbar( CurrentStyle() );
vbox.pack_start( main_toolbar, FALSE, FALSE, 0 );
- auto plugin_toolbar = create_plugin_toolbar();
- if ( !g_Layout_enablePluginToolbar.m_value ) {
- plugin_toolbar.hide();
+ if ( g_Layout_enablePluginToolbar.m_value || g_Layout_enableFilterToolbar.m_value ){
+ auto PFbox = ui::HBox( FALSE, 3 );
+ vbox.pack_start( PFbox, FALSE, FALSE, 0 );
+ PFbox.show();
+ if ( g_Layout_enablePluginToolbar.m_value ){
+ auto plugin_toolbar = create_plugin_toolbar();
+ if ( g_Layout_enableFilterToolbar.m_value ){
+ PFbox.pack_start( plugin_toolbar, FALSE, FALSE, 0 );
+ }
+ else{
+ PFbox.pack_start( plugin_toolbar, TRUE, TRUE, 0 );
+ }
+ }
+ if ( g_Layout_enableFilterToolbar.m_value ){
+ ui::Toolbar filter_toolbar = create_filter_toolbar();
+ PFbox.pack_start( filter_toolbar, TRUE, TRUE, 0 );
+ }
}
- vbox.pack_start( plugin_toolbar, FALSE, FALSE, 0 );
ui::Widget main_statusbar = create_main_statusbar(reinterpret_cast<ui::Widget *>(m_pStatusLabel));
vbox.pack_end(main_statusbar, FALSE, TRUE, 2);
if ( CurrentStyle() == eRegular || CurrentStyle() == eRegularLeft ) {
{
- ui::Widget vsplit = ui::VPaned(ui::New);
- m_vSplit = vsplit;
- vbox.pack_start( vsplit, TRUE, TRUE, 0 );
- vsplit.show();
-
- // console
- ui::Widget console_window = Console_constructWindow( window );
- gtk_paned_pack2( GTK_PANED( vsplit ), console_window, FALSE, TRUE );
-
+ ui::Widget hsplit = ui::HPaned(ui::New);
+ m_vSplit = hsplit;
+ vbox.pack_start( hsplit, TRUE, TRUE, 0 );
+ hsplit.show();
{
- ui::Widget hsplit = ui::HPaned(ui::New);
- hsplit.show();
- m_hSplit = hsplit;
- gtk_paned_add1( GTK_PANED( vsplit ), hsplit );
+ ui::Widget vsplit = ui::VPaned(ui::New);
+ vsplit.show();
+ m_vSplit = vsplit;
+ ui::Widget vsplit2 = ui::VPaned(ui::New);
+ vsplit2.show();
+ m_vSplit = vsplit2;
+ if ( CurrentStyle() == eRegular ){
+ gtk_paned_add1( GTK_PANED( hsplit ), vsplit );
+ gtk_paned_add2( GTK_PANED( hsplit ), vsplit2 );
+ }
+ else{
+ gtk_paned_add2( GTK_PANED( hsplit ), vsplit );
+ gtk_paned_add1( GTK_PANED( hsplit ), vsplit2 );
+ }
+ // console
+ ui::Widget console_window = Console_constructWindow( window );
+ gtk_paned_pack2( GTK_PANED( vsplit ), console_window, FALSE, TRUE );
+
// xy
m_pXYWnd = new XYWnd();
m_pXYWnd->SetViewType( XY );
ui::Widget xy_window = ui::Widget(create_framed_widget( m_pXYWnd->GetWidget( ) ));
+ gtk_paned_add1( GTK_PANED( vsplit ), xy_window );
{
- ui::Widget vsplit2 = ui::VPaned(ui::New);
- vsplit2.show();
- m_vSplit2 = vsplit2;
-
- if ( CurrentStyle() == eRegular ) {
- gtk_paned_add1( GTK_PANED( hsplit ), xy_window );
- gtk_paned_add2( GTK_PANED( hsplit ), vsplit2 );
- }
- else
- {
- gtk_paned_add1( GTK_PANED( hsplit ), vsplit2 );
- gtk_paned_add2( GTK_PANED( hsplit ), xy_window );
- }
-
-
// camera
m_pCamWnd = NewCamWnd();
GlobalCamera_setCamWnd( *m_pCamWnd );
}
float ( *GridStatus_getGridSize )() = GetGridSize;
+
int ( *GridStatus_getRotateIncrement )() = getRotateIncrement;
+
int ( *GridStatus_getFarClipDistance )() = getFarClipDistance;
+
bool ( *GridStatus_getTextureLockEnabled )();
void MainFrame::SetGridStatus(){
"", "Plugin Toolbar",
make_property( g_Layout_enablePluginToolbar )
);
+ page.appendCheckBox(
+ "", "Filter Toolbar",
+ make_property( g_Layout_enableFilterToolbar )
+ );
}
void Layout_constructPage( PreferenceGroup& group ){
GlobalCommands_insert( "PasteToCamera", makeCallbackF(PasteToCamera), Accelerator( 'V', (GdkModifierType)GDK_MOD1_MASK ) );
GlobalCommands_insert( "CloneSelection", makeCallbackF(Selection_Clone), Accelerator( GDK_KEY_space ) );
GlobalCommands_insert( "CloneSelectionAndMakeUnique", makeCallbackF(Selection_Clone_MakeUnique), Accelerator( GDK_KEY_space, (GdkModifierType)GDK_SHIFT_MASK ) );
- GlobalCommands_insert( "DeleteSelection", makeCallbackF(deleteSelection), Accelerator( GDK_KEY_BackSpace ) );
+// GlobalCommands_insert( "DeleteSelection", makeCallbackF(deleteSelection), Accelerator( GDK_KEY_BackSpace ) );
+ GlobalCommands_insert( "DeleteSelection2", makeCallbackF(deleteSelection), Accelerator( GDK_KEY_BackSpace ) );
+ GlobalCommands_insert( "DeleteSelection", makeCallbackF(deleteSelection), Accelerator( 'Z' ) );
GlobalCommands_insert( "ParentSelection", makeCallbackF(Scene_parentSelected) );
- GlobalCommands_insert( "UnSelectSelection", makeCallbackF(Selection_Deselect), Accelerator( GDK_KEY_Escape ) );
+// GlobalCommands_insert( "UnSelectSelection", makeCallbackF(Selection_Deselect), Accelerator( GDK_KEY_Escape ) );
+ GlobalCommands_insert( "UnSelectSelection2", makeCallbackF(Selection_Deselect), Accelerator( GDK_KEY_Escape ) );
+ GlobalCommands_insert( "UnSelectSelection", makeCallbackF(Selection_Deselect), Accelerator( 'C' ) );
GlobalCommands_insert( "InvertSelection", makeCallbackF(Select_Invert), Accelerator( 'I' ) );
GlobalCommands_insert( "SelectInside", makeCallbackF(Select_Inside) );
GlobalCommands_insert( "SelectTouching", makeCallbackF(Select_Touching) );
GlobalCommands_insert( "CSGSubtract", makeCallbackF(CSG_Subtract), Accelerator( 'U', (GdkModifierType)GDK_SHIFT_MASK ) );
- GlobalCommands_insert( "CSGMerge", makeCallbackF(CSG_Merge), Accelerator( 'U', (GdkModifierType)GDK_CONTROL_MASK ) );
+ GlobalCommands_insert( "CSGMerge", makeCallbackF(CSG_Merge), Accelerator( 'U', (GdkModifierType) GDK_CONTROL_MASK ) );
GlobalCommands_insert( "CSGHollow", makeCallbackF(CSG_MakeHollow) );
+ GlobalCommands_insert( "CSGRoom", makeCallbackF(CSG_MakeRoom) );
Grid_registerCommands();
GlobalPreferenceSystem().registerPreference( "DetachableMenus", make_property_string( g_Layout_enableDetachableMenus.m_latched ) );
GlobalPreferenceSystem().registerPreference( "PatchToolBar", make_property_string( g_Layout_enablePatchToolbar.m_latched ) );
GlobalPreferenceSystem().registerPreference( "PluginToolBar", make_property_string( g_Layout_enablePluginToolbar.m_latched ) );
+ GlobalPreferenceSystem().registerPreference( "FilterToolBar", make_property_string( g_Layout_enableFilterToolbar.m_latched ) );
GlobalPreferenceSystem().registerPreference( "QE4StyleWindows", make_property_string( g_Layout_viewStyle.m_latched ) );
GlobalPreferenceSystem().registerPreference( "XYHeight", make_property_string( g_layout_globals.nXYHeight ) );
GlobalPreferenceSystem().registerPreference( "XYWidth", make_property_string( g_layout_globals.nXYWidth ) );
GlobalPreferenceSystem().registerPreference( "YZWnd", make_property<WindowPositionTracker_String>(g_posYZWnd) );
GlobalPreferenceSystem().registerPreference( "XZWnd", make_property<WindowPositionTracker_String>(g_posXZWnd) );
+ GlobalPreferenceSystem().registerPreference( "EnginePath", make_property_string( g_strEnginePath ) );
+ if ( g_strEnginePath.empty() )
{
+ g_strEnginePath_was_empty_1st_start = true;
const char* ENGINEPATH_ATTRIBUTE =
#if GDEF_OS_WINDOWS
"enginepath_win32"
StringOutputStream path( 256 );
path << DirectoryCleaned( g_pGameDescription->getRequiredKeyValue( ENGINEPATH_ATTRIBUTE ) );
g_strEnginePath = path.c_str();
+ GlobalPreferenceSystem().registerPreference( "EnginePath", make_property_string( g_strEnginePath ) );
}
- GlobalPreferenceSystem().registerPreference( "EnginePath", make_property_string( g_strEnginePath ) );
+ GlobalPreferenceSystem().registerPreference( "DisableEnginePath", make_property_string( g_disableEnginePath ) );
+ GlobalPreferenceSystem().registerPreference( "DisableHomePath", make_property_string( g_disableHomePath ) );
+
+ for ( int i = 0; i < g_pakPathCount; i++ ) {
+ std::string label = "PakPath" + std::to_string( i );
+ GlobalPreferenceSystem().registerPreference( label.c_str(), make_property_string( g_strPakPath[i] ) );
+ }
g_Layout_viewStyle.useLatched();
g_Layout_enableDetachableMenus.useLatched();
g_Layout_enablePatchToolbar.useLatched();
g_Layout_enablePluginToolbar.useLatched();
+ g_Layout_enableFilterToolbar.useLatched();
Layout_registerPreferencesPage();
Paths_registerPreferencesPage();