cosmetic - this code isn't used anyway, surface inspector logic has moved to a plugin?

This commit is contained in:
Timothee "TTimo" Besset 2013-07-07 08:08:38 -05:00
parent 6326d84195
commit c93f7a1ecc
2 changed files with 42 additions and 45 deletions

View file

@ -273,25 +273,23 @@ static void OnCancel( GtkWidget *widget, gpointer data ){
g_dlgSurface.HideDlg(); g_dlgSurface.HideDlg();
} }
static gint OnDialogKey( GtkWidget* widget, GdkEventKey* event, gpointer data ){ static gint OnDialogKey( GtkWidget* widget, GdkEventKey* event, gpointer data ) {
if ( g_surfwin ) { if ( g_surfwin ) {
if ( event->keyval == GDK_Return ) { if ( event->keyval == GDK_Return ) {
if ( g_dlgSurface.m_bEditingTextureWidget ) { if ( g_dlgSurface.m_bEditingTextureWidget ) {
OnApply( NULL, NULL ); OnApply( NULL, NULL );
g_dlgSurface.m_bEditingTextureWidget = false; g_dlgSurface.m_bEditingTextureWidget = false;
} } else {
else OnDone( NULL, NULL );
{ }
OnDone( NULL, NULL ); return TRUE;
} }
return TRUE; if ( event->keyval == GDK_Escape ) {
} OnCancel( NULL, NULL );
if ( event->keyval == GDK_Escape ) { return TRUE;
OnCancel( NULL, NULL ); }
return TRUE; }
} return FALSE;
}
return FALSE;
} }
// the widget can be one of hshift, vshift, hscale, vscale, rotate // the widget can be one of hshift, vshift, hscale, vscale, rotate
@ -499,7 +497,7 @@ void SurfaceDlg::InitDefaultIncrement( texdef_t *tex ){
tex->rotate = 10; tex->rotate = 10;
} }
void SurfaceDlg::BuildDialog(){ void SurfaceDlg::BuildDialog() {
GtkWidget *dlg, *vbox, *hbox2, *frame, *table, *label; GtkWidget *dlg, *vbox, *hbox2, *frame, *table, *label;
GtkWidget *button, *entry, *spin; GtkWidget *button, *entry, *spin;

View file

@ -28,42 +28,41 @@
//#define DBG_SI 1 //#define DBG_SI 1
#endif #endif
class SurfaceDlg : public Dialog class SurfaceDlg : public Dialog {
{ bool m_bPatchMode;
bool m_bPatchMode; // brush primitive fake shift scale rot coords
// brush primitive fake shift scale rot coords float m_shift[2];
float m_shift[2]; float m_rotate;
float m_rotate; float m_scale[2];
float m_scale[2];
public: public:
SurfaceDlg (); SurfaceDlg();
virtual void ShowDlg(); virtual void ShowDlg();
virtual void HideDlg(); virtual void HideDlg();
void SetTexMods(); void SetTexMods();
void GetTexMods(); void GetTexMods();
void InitDefaultIncrement( texdef_t * ); void InitDefaultIncrement( texdef_t * );
// Dialog Data // Dialog Data
int m_nHeight; int m_nHeight;
int m_nWidth; int m_nWidth;
// 0 is invalid, otherwise it's the Id of the last 'do' we are responsible for // 0 is invalid, otherwise it's the Id of the last 'do' we are responsible for
int m_nUndoId; int m_nUndoId;
// is the user editing the texture widget (that changes the behaviour of 'Enter' key from OnDone to OnApply // is the user editing the texture widget (that changes the behaviour of 'Enter' key from OnDone to OnApply
// reset to false at each SetTexMods or when dealing with Enter key // reset to false at each SetTexMods or when dealing with Enter key
bool m_bEditingTextureWidget; bool m_bEditingTextureWidget;
protected: protected:
void BuildDialog(); void BuildDialog();
public: public:
// called to perform a fitting from the outside (shortcut key) // called to perform a fitting from the outside (shortcut key)
void FitAll(); void FitAll();
GtkWidget *GetWidget(); // { return m_pWidget; } GtkWidget *GetWidget();
}; };
#endif // _SURFACEDIALOG_H_ #endif // _SURFACEDIALOG_H_