mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2024-11-10 07:11:54 +00:00
cosmetic
This commit is contained in:
parent
5df79a9c62
commit
1c1fa7173a
4 changed files with 44 additions and 90 deletions
|
@ -172,21 +172,6 @@ static gint timer( gpointer data ){
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
//! GtkGLExt port.
|
||||
/*
|
||||
static void create_context (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
if (g_qeglobals_gui.d_glBase == NULL)
|
||||
g_qeglobals_gui.d_glBase = widget;
|
||||
}
|
||||
|
||||
static void destroy_context (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
if (g_qeglobals_gui.d_glBase == widget)
|
||||
g_qeglobals_gui.d_glBase = NULL;
|
||||
}
|
||||
*/
|
||||
|
||||
#if GTK_CHECK_VERSION( 1,3,0 )
|
||||
static gint scroll_event( GtkWidget *widget,
|
||||
GdkEventScroll *event,
|
||||
|
@ -216,12 +201,9 @@ GLWindow::GLWindow ( bool zbuffer ){
|
|||
Sys_Printf( "GLWindow::GLWindow m_pWidget = %p\n", m_pWidget );
|
||||
#endif
|
||||
|
||||
//! GtkGLExt port.
|
||||
//#if defined (__linux__) || defined (__APPLE__)
|
||||
if ( g_qeglobals_gui.d_glBase == NULL ) {
|
||||
g_qeglobals_gui.d_glBase = m_pWidget;
|
||||
}
|
||||
//#endif
|
||||
|
||||
#if GTK_CHECK_VERSION( 1,3,0 )
|
||||
gtk_widget_set_events( m_pWidget, GDK_DESTROY | GDK_EXPOSURE_MASK |
|
||||
|
@ -238,9 +220,6 @@ GLWindow::GLWindow ( bool zbuffer ){
|
|||
gtk_signal_connect( GTK_OBJECT( m_pWidget ), "button_press_event", GTK_SIGNAL_FUNC( button_press ), this );
|
||||
gtk_signal_connect( GTK_OBJECT( m_pWidget ), "button_release_event",GTK_SIGNAL_FUNC( button_release ), this );
|
||||
gtk_signal_connect( GTK_OBJECT( m_pWidget ), "size_allocate", GTK_SIGNAL_FUNC( resize ), this );
|
||||
//! GtkGLExt port.
|
||||
// gtk_signal_connect (GTK_OBJECT (m_pWidget), "create_context", GTK_SIGNAL_FUNC (create_context), this);
|
||||
// gtk_signal_connect (GTK_OBJECT (m_pWidget), "destroy_context", GTK_SIGNAL_FUNC (destroy_context), this);
|
||||
#if GTK_CHECK_VERSION( 1,3,0 )
|
||||
gtk_signal_connect( GTK_OBJECT( m_pWidget ), "scroll_event", GTK_SIGNAL_FUNC( scroll_event ), this );
|
||||
#endif
|
||||
|
|
|
@ -31,8 +31,7 @@
|
|||
#ifndef _GLWINDOW_H_
|
||||
#define _GLWINDOW_H_
|
||||
|
||||
class GLWindow
|
||||
{
|
||||
class GLWindow {
|
||||
public:
|
||||
GLWindow( bool zbuffer );
|
||||
virtual ~GLWindow ();
|
||||
|
@ -41,8 +40,7 @@ bool MakeCurrent();
|
|||
void SwapBuffers();
|
||||
void SetTimer( guint millisec );
|
||||
void KillTimer();
|
||||
bool HasTimer()
|
||||
{ return m_nTimer != 0; }
|
||||
bool HasTimer() { return m_nTimer != 0; }
|
||||
void DestroyContext();
|
||||
void CreateContext();
|
||||
|
||||
|
@ -57,35 +55,21 @@ virtual void OnRButtonUp( guint32 flags, int pointx, int pointy ) { }
|
|||
virtual void OnMButtonUp( guint32 flags, int pointx, int pointy ) { }
|
||||
virtual void OnMouseMove( guint32 flags, int pointx, int pointy ) { }
|
||||
|
||||
|
||||
virtual void OnSize( int cx, int cy ) { }
|
||||
virtual void OnTimer() { }
|
||||
|
||||
virtual void OnMouseWheel( bool bUp ) { }
|
||||
|
||||
void RedrawWindow(){
|
||||
gtk_widget_queue_draw( m_pWidget );
|
||||
}
|
||||
void RedrawWindow() { gtk_widget_queue_draw( m_pWidget ); }
|
||||
|
||||
void SetFocus(){
|
||||
/* gdk_window_raise (m_pWidget->window); */
|
||||
}
|
||||
void SetFocus() { /* gdk_window_raise (m_pWidget->window); */ }
|
||||
|
||||
void SetCapture(){
|
||||
m_bMouseCapture = TRUE;
|
||||
}
|
||||
void SetCapture() { m_bMouseCapture = TRUE; }
|
||||
void ReleaseCapture() { m_bMouseCapture = FALSE; }
|
||||
|
||||
void ReleaseCapture(){
|
||||
m_bMouseCapture = FALSE;
|
||||
}
|
||||
bool HasCapture() { return m_bMouseCapture; }
|
||||
|
||||
bool HasCapture(){
|
||||
return m_bMouseCapture;
|
||||
}
|
||||
|
||||
GtkWidget* GetWidget(){
|
||||
return m_pWidget;
|
||||
}
|
||||
GtkWidget * GetWidget() { return m_pWidget; }
|
||||
|
||||
// member variables
|
||||
public:
|
||||
|
|
|
@ -89,10 +89,8 @@ public:
|
|||
GroupDlg();
|
||||
void Create();
|
||||
|
||||
void Show()
|
||||
{ gtk_widget_show( m_pWidget ); };
|
||||
void Hide()
|
||||
{ gtk_widget_hide( m_pWidget ); };
|
||||
void Show() { gtk_widget_show( m_pWidget ); }
|
||||
void Hide() { gtk_widget_hide( m_pWidget ); }
|
||||
|
||||
public:
|
||||
GtkWidget* m_pNotebook;
|
||||
|
|
|
@ -54,11 +54,6 @@ static unsigned tex_palette[256];
|
|||
|
||||
#define FONT_HEIGHT 10
|
||||
|
||||
//int texture_mode = GL_NEAREST;
|
||||
//int texture_mode = GL_NEAREST_MIPMAP_NEAREST;
|
||||
//int texture_mode = GL_NEAREST_MIPMAP_LINEAR;
|
||||
//int texture_mode = GL_LINEAR;
|
||||
//int texture_mode = GL_LINEAR_MIPMAP_NEAREST;
|
||||
int texture_mode = GL_LINEAR_MIPMAP_LINEAR;
|
||||
|
||||
int g_nTextureOffset = 0;
|
||||
|
@ -124,8 +119,7 @@ int GetTextureExtensionCount(){
|
|||
// hardcoded hack for png support
|
||||
if ( g_pGameDescription->mGameFile == "sof2.game" ) {
|
||||
return 3;
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
@ -1667,8 +1661,7 @@ void TexWnd::OnCreate(){
|
|||
|
||||
if ( g_PrefsDlg.m_bTextureScrollbar ) {
|
||||
gtk_widget_show( g_qeglobals_gui.d_texture_scroll );
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
gtk_widget_hide( g_qeglobals_gui.d_texture_scroll );
|
||||
}
|
||||
m_bNeedRange = true;
|
||||
|
|
Loading…
Reference in a new issue