binds...
* ctrl + shift + m1 (in texbro): open shader in external editor
misc...
* fix: do not unmaximize external shader editor on win
* fix: blank cursor in radiant after calling external shader editor on win
* fix shader editors stuff for non uindowses
* 'Shader Editor Command' preference is available on win (is used, if set; otherwise try default os action for file)
* fix: 'Shader Editor Command' preference allows selecting executable via dialog
* GDK_HAND2 cursor in clipper tool mode
* fix: clipper points have numeric labels
* '2d zoom in to mouse pointer' option works for alt + m2 zoom
* '3d zoom in to mouse pointer' option (def = yes)
gboolean wheelmove_scroll( GtkWidget* widget, GdkEventScroll* event, CamWnd* camwnd ){
if ( event->direction == GDK_SCROLL_UP ) {
Camera_Freemove_updateAxes( camwnd->getCamera() );
- Camera_setOrigin( *camwnd, vector3_added( Camera_getOrigin( *camwnd ), vector3_scaled( camwnd->getCamera().forward, static_cast<float>( g_camwindow_globals_private.m_nMoveSpeed ) ) ) );
+ if( camwnd->m_bFreeMove || !g_camwindow_globals.m_bZoomInToPointer ){
+ Camera_setOrigin( *camwnd, vector3_added( Camera_getOrigin( *camwnd ), vector3_scaled( camwnd->getCamera().forward, static_cast<float>( g_camwindow_globals_private.m_nMoveSpeed ) ) ) );
+ }
+ else{
+ //Matrix4 maa = matrix4_multiplied_by_matrix4( camwnd->getCamera().projection, camwnd->getCamera().modelview );
+ Matrix4 maa = camwnd->getCamera().m_view->GetViewMatrix();
+ matrix4_affine_invert( maa );
+
+ float x = static_cast<float>( event->x );
+ float y = static_cast<float>( event->y );
+ Vector3 normalized;
+
+ normalized[0] = 2.0f * ( x ) / static_cast<float>( camwnd->getCamera().width ) - 1.0f;
+ normalized[1] = 2.0f * ( y )/ static_cast<float>( camwnd->getCamera().height ) - 1.0f;
+ normalized[1] *= -1.f;
+ normalized[2] = 0.f;
+
+ normalized *= 16.0f;
+ //globalOutputStream() << normalized << " normalized ";
+ matrix4_transform_point( maa, normalized );
+ //globalOutputStream() << normalized << "\n";
+ Vector3 norm = vector3_normalised( normalized - Camera_getOrigin( *camwnd ) );
+ //globalOutputStream() << normalized - Camera_getOrigin( *camwnd ) << " normalized - Camera_getOrigin( *camwnd )\n";
+ //globalOutputStream() << norm << " norm\n";
+ Camera_setOrigin( *camwnd, vector3_added( Camera_getOrigin( *camwnd ), vector3_scaled( norm, static_cast<float>( g_camwindow_globals_private.m_nMoveSpeed ) ) ) );
+ }
}
else if ( event->direction == GDK_SCROLL_DOWN ) {
Camera_Freemove_updateAxes( camwnd->getCamera() );
page.appendCheckBox( "", "Link strafe speed to movement speed", g_camwindow_globals_private.m_bCamLinkSpeed );
page.appendSlider( "Rotation Speed", g_camwindow_globals_private.m_nAngleSpeed, TRUE, 0, 0, 3, 1, 180, 1, 10 );
page.appendCheckBox( "", "Invert mouse vertical axis", g_camwindow_globals_private.m_bCamInverseMouse );
+ page.appendCheckBox( "", "Zoom In to Mouse pointer", g_camwindow_globals.m_bZoomInToPointer );
page.appendCheckBox(
"", "Discrete movement",
FreeCaller1<bool, CamWnd_Move_Discrete_Import>(),
GlobalPreferenceSystem().registerPreference( "SI_Colors12", Vector3ImportStringCaller( g_camwindow_globals.color_selbrushes3d ), Vector3ExportStringCaller( g_camwindow_globals.color_selbrushes3d ) );
GlobalPreferenceSystem().registerPreference( "CameraRenderMode", makeIntStringImportCallback( RenderModeImportCaller() ), makeIntStringExportCallback( RenderModeExportCaller() ) );
GlobalPreferenceSystem().registerPreference( "StrafeMode", IntImportStringCaller( g_camwindow_globals_private.m_nStrafeMode ), IntExportStringCaller( g_camwindow_globals_private.m_nStrafeMode ) );
+ GlobalPreferenceSystem().registerPreference( "3DZoomInToPointer", BoolImportStringCaller( g_camwindow_globals.m_bZoomInToPointer ), BoolExportStringCaller( g_camwindow_globals.m_bZoomInToPointer ) );
CamWnd_constructStatic();
int m_nCubicScale;
+ bool m_bZoomInToPointer;
+
camwindow_globals_t() :
color_cameraback( 0.25f, 0.25f, 0.25f ),
color_selbrushes3d( 1.0f, 0.f, 0.f ),
- m_nCubicScale( 14 ){
+ m_nCubicScale( 14 ),
+ m_bZoomInToPointer( true ){
}
};
gtk_widget_hide( GTK_WIDGET( GroupDialog_getWindow() ) );
return TRUE;
}
+ /* this doesn't work, if tab is bound (func is not called then) */
if ( event->keyval == GDK_Tab ) {
gtk_window_set_focus( GTK_WINDOW( gtk_widget_get_toplevel( GTK_WIDGET( widget ) ) ), GTK_WIDGET( g_entityKeyEntry ) );
return TRUE;
gtk_widget_show( text_editor );
gtk_window_present( GTK_WINDOW( text_editor ) );
-#ifdef WIN32
+//#ifdef WIN32
process_gui();
-#endif
+//#endif
// only move the cursor if it's not exceeding the size..
// NOTE: this is erroneous, cursorpos is the offset in bytes, not in characters
gtk_text_view_scroll_to_iter( GTK_TEXT_VIEW( text_widget ), &text_iter, 0, TRUE, 0, 0);
}
-#ifdef WIN32
+//#ifdef WIN32
gtk_widget_queue_draw( text_widget );
-#endif
+//#endif
text_buffer_ = text_buffer;
free( buf );
#include <gdk/gdkwin32.h>
#endif
-#ifdef WIN32
-// use the file associations to open files instead of builtin Gtk editor
-bool g_TextEditor_useWin32Editor = false;
-#else
-// custom shader editor
-bool g_TextEditor_useCustomEditor = false;
CopiedString g_TextEditor_editorCommand( "" );
-#endif
-void DoTextEditor( const char* filename, int cursorpos, int length ){
-#ifdef WIN32
- if ( g_TextEditor_useWin32Editor ) {
- StringOutputStream path( 256 );
- StringOutputStream modpath( 256 );
- const char* gamename = GlobalRadiant().getGameName();
- const char* basegame = GlobalRadiant().getRequiredGameDescriptionKeyValue( "basegame" );
- const char* enginePath = GlobalRadiant().getEnginePath();
- path << enginePath << basegame << '/' << filename;
- modpath << enginePath << gamename << '/' << filename;
- if ( file_exists( modpath.c_str() ) ){
- globalOutputStream() << "opening file '" << modpath.c_str() << "' (line " << cursorpos << " info ignored)\n";
- ShellExecute( (HWND)GDK_WINDOW_HWND( GTK_WIDGET( MainFrame_getWindow() )->window ), "open", modpath.c_str(), 0, 0, SW_SHOW );
+void DoTextEditor( const char* filename, int cursorpos, int length, bool external_editor ){
+ //StringOutputStream paths[4]( 256 );
+ StringOutputStream paths[4] = { StringOutputStream(256) };
+ StringOutputStream* goodpath = 0;
+
+ const char* gamename = GlobalRadiant().getGameName();
+ const char* basegame = GlobalRadiant().getRequiredGameDescriptionKeyValue( "basegame" );
+ const char* enginePath = GlobalRadiant().getEnginePath();
+ const char* homeEnginePath = g_qeglobals.m_userEnginePath.c_str();
+
+ paths[0] << homeEnginePath << gamename << '/' << filename;
+ paths[1] << enginePath << gamename << '/' << filename;
+ paths[2] << homeEnginePath << basegame << '/' << filename;
+ paths[3] << enginePath << basegame << '/' << filename;
+
+ for ( std::size_t i = 0; i < 4; ++i ){
+ if ( file_exists( paths[i].c_str() ) ){
+ goodpath = &paths[i];
+ break;
}
- else if ( file_exists( path.c_str() ) ){
- globalOutputStream() << "opening file '" << path.c_str() << "' (line " << cursorpos << " info ignored)\n";
- ShellExecute( (HWND)GDK_WINDOW_HWND( GTK_WIDGET( MainFrame_getWindow() )->window ), "open", path.c_str(), 0, 0, SW_SHOW );
- }
- else{
- globalOutputStream() << "Failed to open '" << filename << "'\nOne sits in .pk3 most likely!\n";
- }
- return;
}
- else{
- StringOutputStream path( 256 );
- StringOutputStream modpath( 256 );
- const char* gamename = GlobalRadiant().getGameName();
- const char* basegame = GlobalRadiant().getRequiredGameDescriptionKeyValue( "basegame" );
- const char* enginePath = GlobalRadiant().getEnginePath();
- path << enginePath << basegame << '/' << filename;
- modpath << enginePath << gamename << '/' << filename;
- if ( file_exists( modpath.c_str() ) ){
- globalOutputStream() << "opening file '" << modpath.c_str() << "' (line " << cursorpos << " info ignored)\n";
- DoGtkTextEditor( modpath.c_str(), cursorpos, length );
- }
- else if ( file_exists( path.c_str() ) ){
- globalOutputStream() << "opening file '" << path.c_str() << "' (line " << cursorpos << " info ignored)\n";
- DoGtkTextEditor( path.c_str(), cursorpos, length );
+
+ if( goodpath ){
+ globalOutputStream() << "opening file '" << goodpath->c_str() << "' (line " << cursorpos << " info ignored)\n";
+ if( external_editor ){
+ if( g_TextEditor_editorCommand.empty() ){
+#ifdef WIN32
+ ShellExecute( (HWND)GDK_WINDOW_HWND( GTK_WIDGET( MainFrame_getWindow() )->window ), 0, goodpath->c_str(), 0, 0, SW_SHOWNORMAL );
+// SHELLEXECUTEINFO ShExecInfo;
+// ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
+// ShExecInfo.fMask = 0;
+// ShExecInfo.hwnd = (HWND)GDK_WINDOW_HWND( GTK_WIDGET( MainFrame_getWindow() )->window );
+// ShExecInfo.lpVerb = NULL;
+// ShExecInfo.lpFile = goodpath->c_str();
+// ShExecInfo.lpParameters = NULL;
+// ShExecInfo.lpDirectory = NULL;
+// ShExecInfo.nShow = SW_SHOWNORMAL;
+// ShExecInfo.hInstApp = NULL;
+// ShellExecuteEx(&ShExecInfo);
+#else
+ globalOutputStream() << "Failed to open '" << goodpath->c_str() << "'\nSet Shader Editor Command in preferences\n";
+#endif
+ }
+ else{
+ StringOutputStream strEditCommand( 256 );
+ strEditCommand << g_TextEditor_editorCommand.c_str() << " \"" << goodpath->c_str() << "\"";
+
+ globalOutputStream() << "Launching: " << strEditCommand.c_str() << "\n";
+ // note: linux does not return false if the command failed so it will assume success
+ if ( Q_Exec( 0, const_cast<char*>( strEditCommand.c_str() ), 0, true, false ) == false ) {
+ globalOutputStream() << "Failed to execute " << strEditCommand.c_str() << "\n";
+ }
+ else
+ {
+ // the command (appeared) to run successfully, no need to do anything more
+ return;
+ }
+ }
}
else{
- globalOutputStream() << "Failed to open '" << filename << "'\nOne sits in .pk3 most likely!\n";
+ DoGtkTextEditor( goodpath->c_str(), cursorpos, length );
}
- return;
}
-#else
- // check if a custom editor is set
- if ( g_TextEditor_useCustomEditor && !g_TextEditor_editorCommand.empty() ) {
- StringOutputStream strEditCommand( 256 );
- strEditCommand << g_TextEditor_editorCommand.c_str() << " \"" << filename << "\"";
-
- globalOutputStream() << "Launching: " << strEditCommand.c_str() << "\n";
- // note: linux does not return false if the command failed so it will assume success
- if ( Q_Exec( 0, const_cast<char*>( strEditCommand.c_str() ), 0, true, false ) == false ) {
- globalOutputStream() << "Failed to execute " << strEditCommand.c_str() << ", using default\n";
- }
- else
- {
- // the command (appeared) to run successfully, no need to do anything more
- return;
- }
+ else{
+ globalOutputStream() << "Failed to open '" << filename << "'\nOne sits in .pk3 most likely!\n";
}
-
- DoGtkTextEditor( filename, cursorpos, length );
-#endif
}
EMessageBoxReturn DoShaderTagDlg( CopiedString *tag, char* title );
EMessageBoxReturn DoShaderInfoDlg( const char* name, const char* filename, char* title );
EMessageBoxReturn DoTextureLayout( float *fx, float *fy );
-void DoTextEditor( const char* filename, int cursorpos, int length );
+void DoTextEditor( const char* filename, int cursorpos, int length, bool external_editor );
void DoProjectSettings();
void DoAbout();
-#ifdef WIN32
-extern bool g_TextEditor_useWin32Editor;
-#else
#include "string/stringfwd.h"
-extern bool g_TextEditor_useCustomEditor;
extern CopiedString g_TextEditor_editorCommand;
-#endif
#endif
}
void Interface_constructPreferences( PreferencesPage& page ){
-#ifdef WIN32
- page.appendCheckBox( "", "External Shader Editor", g_TextEditor_useWin32Editor );
-#else
- {
- GtkWidget* use_custom = page.appendCheckBox( "Text Editor", "Custom", g_TextEditor_useCustomEditor );
- GtkWidget* custom_editor = page.appendPathEntry( "Text Editor Command", g_TextEditor_editorCommand, true );
- Widget_connectToggleDependency( custom_editor, use_custom );
- }
-#endif
+ page.appendPathEntry( "Shader Editor Command", g_TextEditor_editorCommand, false );
}
void Mouse_constructPreferences( PreferencesPage& page ){
// page.appendRadio( "Mouse Type", g_glwindow_globals.m_nMouseType, STRING_ARRAY_RANGE( buttons ) );
// }
// page.appendCheckBox( "Right Button", "Activates Context Menu", g_xywindow_globals.m_bRightClick );
- page.appendCheckBox( "", "Improved mousewheel zoom", g_xywindow_globals.m_bImprovedWheelZoom );
+ page.appendCheckBox( "", "Zoom to mouse pointer", g_xywindow_globals.m_bZoomInToPointer );
}
void Mouse_constructPage( PreferenceGroup& group ){
PreferencesPage page( group.createPage( "Mouse", "Mouse Preferences" ) );
GtkWindow* PrefsDlg::BuildDialog(){
PreferencesDialog_addInterfacePreferences( FreeCaller1<PreferencesPage&, Interface_constructPreferences>() );
- Mouse_registerPreferencesPage();
+ //Mouse_registerPreferencesPage();
GtkWindow* dialog = create_floating_window( "NetRadiant Preferences", m_parent );
void RegisterPreferences( PreferenceSystem& preferences ){
-#ifdef WIN32
- preferences.registerPreference( "UseCustomShaderEditor", BoolImportStringCaller( g_TextEditor_useWin32Editor ), BoolExportStringCaller( g_TextEditor_useWin32Editor ) );
-#else
- preferences.registerPreference( "UseCustomShaderEditor", BoolImportStringCaller( g_TextEditor_useCustomEditor ), BoolExportStringCaller( g_TextEditor_useCustomEditor ) );
preferences.registerPreference( "CustomShaderEditorCommand", CopiedStringImportStringCaller( g_TextEditor_editorCommand ), CopiedStringExportStringCaller( g_TextEditor_editorCommand ) );
-#endif
preferences.registerPreference( "GameName", GameNameImportStringCaller(), GameNameExportStringCaller() );
preferences.registerPreference( "GameMode", GameModeImportStringCaller(), GameModeExportStringCaller() );
#include "gtkdlgs.h"
-void ViewShader( const char *pFile, const char *pName ){
+void ViewShader( const char *pFile, const char *pName, bool external_editor ){
char* pBuff = 0;
//int nSize =
vfsLoadFile( pFile, reinterpret_cast<void**>( &pBuff ) );
// now close the file
vfsFreeFile( pBuff );
- DoTextEditor( pFile, static_cast<int>( nOffset ), length );
+ DoTextEditor( pFile, static_cast<int>( nOffset ), length, external_editor );
}
#if !defined( INCLUDED_SHADERS_H )
#define INCLUDED_SHADERS_H
-void ViewShader( const char* file, const char* shader );
+void ViewShader( const char* file, const char* shader, bool external_editor );
#endif
By mouse click
==============
*/
-void SelectTexture( TextureBrowser& textureBrowser, int mx, int my, bool bShift ){
- IShader* shader = Texture_At( textureBrowser, mx, my );
- if ( shader != 0 ) {
- if ( bShift ) {
- if ( shader->IsDefault() ) {
- globalOutputStream() << "ERROR: " << shader->getName() << " is not a shader, it's a texture.\n";
- }
- else{
- ViewShader( shader->getShaderFileName(), shader->getName() );
- }
- }
- else
- {
+void SelectTexture( TextureBrowser& textureBrowser, int mx, int my, guint32 flags ){
+ if ( ( flags & GDK_SHIFT_MASK ) == 0 ) {
+ IShader* shader = Texture_At( textureBrowser, mx, my );
+ if ( shader != 0 ) {
TextureBrowser_SetSelectedShader( textureBrowser, shader->getName() );
TextureBrowser_textureSelected( shader->getName() );
}
void TextureBrowser_Selection_MouseDown( TextureBrowser& textureBrowser, guint32 flags, int pointx, int pointy ){
- SelectTexture( textureBrowser, pointx, textureBrowser.height - 1 - pointy, ( flags & GDK_SHIFT_MASK ) != 0 );
+ SelectTexture( textureBrowser, pointx, textureBrowser.height - 1 - pointy, flags );
+}
+
+void TextureBrowser_Selection_MouseUp( TextureBrowser& textureBrowser, guint32 flags, int pointx, int pointy ){
+ if ( ( flags & GDK_SHIFT_MASK ) != 0 ) {
+ IShader* shader = Texture_At( textureBrowser, pointx, textureBrowser.height - 1 - pointy );
+ if ( shader != 0 ) {
+ if ( shader->IsDefault() ) {
+ globalOutputStream() << "ERROR: " << shader->getName() << " is not a shader, it's a texture.\n";
+ }
+ else{
+ ViewShader( shader->getShaderFileName(), shader->getName(), ( flags & GDK_CONTROL_MASK ) != 0 );
+ }
+ }
+ }
}
/*
TextureBrowser_Tracking_MouseUp( *textureBrowser );
}
}
+ if ( event->button == 1 ) {
+ TextureBrowser_Selection_MouseUp( *textureBrowser, event->state, static_cast<int>( event->x ), static_cast<int>( event->y ) );
+ }
}
return FALSE;
}
// draw label
glRasterPos3f( m_ptClip[0] + offset, m_ptClip[1] + offset, m_ptClip[2] + offset );
- glCallLists( GLsizei( strlen( label ) ), GL_UNSIGNED_BYTE, label );
+ //glCallLists( GLsizei( strlen( label ) ), GL_UNSIGNED_BYTE, label ); //fails with GCC
+ //glCallLists( GLsizei( strlen( label ) ), GL_UNSIGNED_BYTE, reinterpret_cast<const GLubyte*>( label ) ); //worx
+ GlobalOpenGL().drawString( label );
}
float fDiff( float f1, float f2 ){
void XYWnd::ZoomInWithMouse( int pointx, int pointy ){
float old_scale = Scale();
ZoomIn();
- if ( g_xywindow_globals.m_bImprovedWheelZoom ) {
+ if ( g_xywindow_globals.m_bZoomInToPointer ) {
float scale_diff = 1.0 / old_scale - 1.0 / Scale();
int nDim1 = ( m_viewType == YZ ) ? 1 : 0;
int nDim2 = ( m_viewType == XY ) ? 1 : 2;
}
}
+//#include "gtkutil/image.h"
+
+/* is called on every mouse move fraction; ain't good! */
void XYWnd::Clipper_Crosshair_OnMouseMoved( int x, int y ){
Vector3 mousePosition;
XY_ToPoint( x, y, mousePosition );
- if ( ClipMode() && GlobalClipPoints_Find( mousePosition, (VIEWTYPE)m_viewType, m_fScale ) != 0 ) {
- GdkCursor *cursor;
- cursor = gdk_cursor_new( GDK_CROSSHAIR );
- gdk_window_set_cursor( m_gl_widget->window, cursor );
- gdk_cursor_unref( cursor );
+ if ( ClipMode() ) {
+ if( GlobalClipPoints_Find( mousePosition, (VIEWTYPE)m_viewType, m_fScale ) != 0 ){
+ GdkCursor *cursor;
+ cursor = gdk_cursor_new( GDK_CROSSHAIR );
+ //cursor = gdk_cursor_new( GDK_FLEUR );
+ gdk_window_set_cursor( m_gl_widget->window, cursor );
+ gdk_cursor_unref( cursor );
+ }
+ else{
+ GdkCursor *cursor;
+ cursor = gdk_cursor_new( GDK_HAND2 );
+// GdkPixbuf* pixbuf = pixbuf_new_from_file_with_mask( "bitmaps/icon.png" );
+// cursor = gdk_cursor_new_from_pixbuf( gdk_display_get_default(), pixbuf, 0, 0 );
+// g_object_unref( pixbuf );
+ gdk_window_set_cursor( m_gl_widget->window, cursor );
+ gdk_cursor_unref( cursor );
+
+ }
}
else
{
}
int g_dragZoom = 0;
+int g_zoom2x = 0;
+int g_zoom2y = 0;
void XYWnd_zoomDelta( int x, int y, unsigned int state, void* data ){
if ( y != 0 ) {
}
else
{
- reinterpret_cast<XYWnd*>( data )->ZoomIn();
+ if ( g_xywindow_globals.m_bZoomInToPointer ) {
+ reinterpret_cast<XYWnd*>( data )->ZoomInWithMouse( g_zoom2x, g_zoom2y );
+ }
+ else{
+ reinterpret_cast<XYWnd*>( data )->ZoomIn();
+ }
g_dragZoom += 8;
}
}
return FALSE;
}
-void XYWnd::Zoom_Begin(){
+void XYWnd::Zoom_Begin( int x, int y ){
if ( m_zoom_started ) {
Zoom_End();
}
m_zoom_started = true;
g_dragZoom = 0;
+ g_zoom2x = x;
+ g_zoom2y = y;
g_xywnd_freezePointer.freeze_pointer( m_parent != 0 ? m_parent : MainFrame_getWindow(), m_gl_widget, XYWnd_zoomDelta, this );
m_zoom_focusOut = g_signal_connect( G_OBJECT( m_gl_widget ), "focus_out_event", G_CALLBACK( XYWnd_Zoom_focusOut ), this );
}
EntityCreate_MouseDown( x, y );
}
else if ( buttons == Zoom_buttons() ) {
- Zoom_Begin();
+ Zoom_Begin( x, y );
}
else if ( ClipMode() && ( buttons == Clipper_buttons() || buttons == Clipper_quick_buttons() ) ) {
Clipper_OnLButtonDown( x, y );
//page.appendCheckBox( "", "Display size info", g_xywindow_globals_private.m_bSizePaint );
page.appendCheckBox( "", "Chase mouse during drags", g_xywindow_globals_private.m_bChaseMouse );
// page.appendCheckBox( "", "Update views on camera move", g_xywindow_globals_private.m_bCamXYUpdate );
+ page.appendCheckBox( "", "Zoom In to Mouse pointer", g_xywindow_globals.m_bZoomInToPointer );
}
void Orthographic_constructPage( PreferenceGroup& group ){
PreferencesPage page( group.createPage( "Orthographic", "Orthographic View Preferences" ) );
GlobalPreferenceSystem().registerPreference( "ClipCaulk", BoolImportStringCaller( g_clip_useCaulk ), BoolExportStringCaller( g_clip_useCaulk ) );
// GlobalPreferenceSystem().registerPreference( "NewRightClick", BoolImportStringCaller( g_xywindow_globals.m_bRightClick ), BoolExportStringCaller( g_xywindow_globals.m_bRightClick ) );
- GlobalPreferenceSystem().registerPreference( "ImprovedWheelZoom", BoolImportStringCaller( g_xywindow_globals.m_bImprovedWheelZoom ), BoolExportStringCaller( g_xywindow_globals.m_bImprovedWheelZoom ) );
+ GlobalPreferenceSystem().registerPreference( "2DZoomInToPointer", BoolImportStringCaller( g_xywindow_globals.m_bZoomInToPointer ), BoolExportStringCaller( g_xywindow_globals.m_bZoomInToPointer ) );
GlobalPreferenceSystem().registerPreference( "ChaseMouse", BoolImportStringCaller( g_xywindow_globals_private.m_bChaseMouse ), BoolExportStringCaller( g_xywindow_globals_private.m_bChaseMouse ) );
GlobalPreferenceSystem().registerPreference( "SizePainting", BoolImportStringCaller( g_xywindow_globals_private.m_bSizePaint ), BoolExportStringCaller( g_xywindow_globals_private.m_bSizePaint ) );
GlobalPreferenceSystem().registerPreference( "ShowCrosshair", BoolImportStringCaller( g_bCrossHairs ), BoolExportStringCaller( g_bCrossHairs ) );
bool m_move_started;
guint m_move_focusOut;
-void Zoom_Begin();
+void Zoom_Begin( int x, int y );
void Zoom_End();
bool m_zoom_started;
guint m_zoom_focusOut;
// bool m_bRightClick;
bool m_bNoStipple;
- bool m_bImprovedWheelZoom;
+ bool m_bZoomInToPointer;
xywindow_globals_t() :
color_gridback( 0.77f, 0.77f, 0.77f ),
AxisColorZ( 0.f, 0.f, 1.f ),
// m_bRightClick( true ),
m_bNoStipple( true ),
- m_bImprovedWheelZoom( true ){
+ m_bZoomInToPointer( true ){
}
};
{
//find point on plane
for ( j=0; j<3; j++ ){
+ //point[j] = bspPlanes[ i ].dist * bspPlanes[ i ].normal[j];
if ( fabs( bspPlanes[ i ].normal[j] ) > 0.5 ){
point[j] = bspPlanes[ i ].dist / bspPlanes[ i ].normal[j];
point[(j+1)%3] = point[(j+2)%3] = 0;