endif ()
set(BUILTIN_GTKGLEXT_BUILT OFF CACHE INTERNAL "...")
-if (EXISTS "${BUILTINS_PKGCONFIG_DIR}gtkglext-1.0.pc")
+if (EXISTS "${BUILTINS_PKGCONFIG_DIR}/gtkglext-1.0.pc")
set(BUILTIN_GTKGLEXT_BUILT ON)
endif ()
set(GTKGLEXT_CFLAGS "$ENV{CFLAGS} ${GTKGLEXT_CFLAGS}")
+
+ set(CONFIGURE_OPTIONS --disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf
+ --disable-dependency-tracking --without-x)
+
if (NOT CMAKE_BUILD_TYPE MATCHES Release)
- set(GTKGLEXT_CFLAGS "${GTKGLEXT_CFLAGS} -g")
+ set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --disable-debug")
endif ()
- set(CONFIGURE_OPTIONS --disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf)
-
if (APPLE)
set(GTKGLEXT_GIT_TAG macos)
else ()
GIT_REPOSITORY https://gitlab.gnome.org/illwieckz/gtkglext.git
GIT_TAG ${GTKGLEXT_GIT_TAG}
BUILD_IN_SOURCE ON
- CONFIGURE_COMMAND export CFLAGS=${GTKGLEXT_LDFLAGS}
- CONFIGURE_COMMAND && export LDFLAGS=${GTKGLEXT_CFLAGS}
+ CONFIGURE_COMMAND export CFLAGS=${GTKGLEXT_CFLAGS}
+ CONFIGURE_COMMAND && export LDFLAGS=${GTKGLEXT_LDFLAGS}
CONFIGURE_COMMAND && export NOCONFIGURE=1
CONFIGURE_COMMAND && ./autogen.sh
CONFIGURE_COMMAND && ./configure --prefix "${BUILTINS_INSTALL_DIR}" ${CONFIGURE_OPTIONS}
ET yes proprietary svn svn://svn.icculus.org/gtkradiant-gamepacks/ETPack/branches/1.5/
Heretic2 yes proprietary svn svn://svn.icculus.org/gtkradiant-gamepacks/Her2Pack/branches/1.5/
JediAcademy no proprietary svn svn://svn.icculus.org/gtkradiant-gamepacks/JAPack/branches/1.5/
-Kingpin yes unknown zip http://download.kingpin.info/kingpin/editing/maps/map_editors/NetRadiant/addon/Kingpinpack.zip
+Kingpin yes unknown zip https://www.kingpin.info/download/kingpin/editing/maps/map_editors/NetRadiant/addon/Kingpinpack.zip
Neverball yes proprietary zip http://ingar.intranifty.net/files/netradiant/gamepacks/NeverballPack.zip
Nexuiz yes GPL gitdir git://git.icculus.org/divverent/nexuiz.git misc/netradiant-NexuizPack master
OpenArena yes GPL git https://github.com/NeonKnightOA/oagamepack.git
*/
#include "paned.h"
-
-#include <gtk/gtk.h>
-#include <uilib/uilib.h>
-
#include "frame.h"
-
-class PanedState
-{
-public:
-float position;
-int size;
-};
-
gboolean hpaned_allocate(ui::Widget widget, GtkAllocation* allocation, PanedState* paned ){
if ( paned->size != allocation->width ) {
paned->size = allocation->width;
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <gtk/gtk.h>
#include <uilib/uilib.h>
#if !defined( INCLUDED_GTKUTIL_PANED_H )
#define INCLUDED_GTKUTIL_PANED_H
+class PanedState
+{
+public:
+float position;
+int size;
+};
+
+gboolean hpaned_allocate( ui::Widget widget, GtkAllocation* allocation, PanedState* paned );
+gboolean vpaned_allocate( ui::Widget widget, GtkAllocation* allocation, PanedState* paned );
+gboolean paned_position( ui::Widget widget, gpointer dummy, PanedState* paned );
+
ui::HPaned create_split_views( ui::Widget topleft, ui::Widget topright, ui::Widget botleft, ui::Widget botright );
#endif
return TRUE;
}
+PanedState g_single_hpaned = { 0.75f, -1, };
+PanedState g_single_vpaned = { 0.75f, -1, };
+
void MainFrame::Create(){
ui::Window window = ui::Window( ui::window_type::TOP );
window.show();
- if ( CurrentStyle() == eRegular || CurrentStyle() == eRegularLeft ) {
+ if ( CurrentStyle() == eRegular || CurrentStyle() == eRegularLeft )
+ {
{
ui::Widget vsplit = ui::VPaned(ui::New);
m_vSplit = vsplit;
gtk_paned_add2( GTK_PANED( hsplit ), xy_window );
}
-
// camera
m_pCamWnd = NewCamWnd();
GlobalCamera_setCamWnd( *m_pCamWnd );
gtk_paned_set_position( GTK_PANED( m_vSplit2 ), g_layout_globals.nCamHeight );
}
- else if ( CurrentStyle() == eFloating ) {
+ else if ( CurrentStyle() == eFloating )
+ {
{
ui::Window window = ui::Window(create_persistent_floating_window( "Camera", m_window ));
global_accel_connect_window( window );
GroupDialog_show();
}
- else // 4 way
+ else if ( CurrentStyle() == eSplit )
{
m_pCamWnd = NewCamWnd();
GlobalCamera_setCamWnd( *m_pCamWnd );
ui::Widget xz = m_pXZWnd->GetWidget();
- auto split = create_split_views( camera, yz, xy, xz );
+ auto split = create_split_views( camera, yz, xy, xz );
vbox.pack_start( split, TRUE, TRUE, 0 );
{
- auto frame = create_framed_widget( TextureBrowser_constructWindow( window ) );
+ auto frame = create_framed_widget( TextureBrowser_constructWindow( window ) );
g_page_textures = GroupDialog_addPage( "Textures", frame, TextureBrowserExportTitleCaller() );
WORKAROUND_GOBJECT_SET_GLWIDGET( window, TextureBrowser_getGLWidget() );
}
}
+ else // single window
+ {
+ m_pCamWnd = NewCamWnd();
+ GlobalCamera_setCamWnd( *m_pCamWnd );
+ CamWnd_setParent( *m_pCamWnd, window );
+
+ ui::Widget camera = CamWnd_getWidget( *m_pCamWnd );
+
+ m_pYZWnd = new XYWnd();
+ m_pYZWnd->SetViewType( YZ );
+
+ ui::Widget yz = m_pYZWnd->GetWidget();
+
+ m_pXYWnd = new XYWnd();
+ m_pXYWnd->SetViewType( XY );
+
+ ui::Widget xy = m_pXYWnd->GetWidget();
+
+ m_pXZWnd = new XYWnd();
+ m_pXZWnd->SetViewType( XZ );
+
+ ui::Widget xz = m_pXZWnd->GetWidget();
+
+ ui::Widget hsplit = ui::HPaned(ui::New);
+ vbox.pack_start( hsplit, TRUE, TRUE, 0 );
+ hsplit.show();
+
+ ui::Widget split = create_split_views( camera, yz, xy, xz );
+
+ ui::Widget vsplit = ui::VPaned(ui::New);
+ vsplit.show();
+
+ // textures
+ ui::Widget texture_window = create_framed_widget( TextureBrowser_constructWindow( window ) );
+
+ // console
+ ui::Widget console_window = create_framed_widget( Console_constructWindow( window ) );
+
+ gtk_paned_add1( GTK_PANED( hsplit ), split );
+ gtk_paned_add2( GTK_PANED( hsplit ), vsplit );
+
+ gtk_paned_add1( GTK_PANED( vsplit ), texture_window );
+ gtk_paned_add2( GTK_PANED( vsplit ), console_window );
+
+ hsplit.connect( "size_allocate", G_CALLBACK( hpaned_allocate ), &g_single_hpaned );
+ hsplit.connect( "notify::position", G_CALLBACK( paned_position ), &g_single_hpaned );
+
+ vsplit.connect( "size_allocate", G_CALLBACK( vpaned_allocate ), &g_single_vpaned );
+ vsplit.connect( "notify::position", G_CALLBACK( paned_position ), &g_single_vpaned );
+ }
EntityList_constructWindow( window );
PreferencesDialog_constructWindow( window );
void Layout_constructPreferences( PreferencesPage& page ){
{
- const char* layouts[] = { "window1.png", "window2.png", "window3.png", "window4.png" };
+ const char* layouts[] = { "window1.png", "window2.png", "window3.png", "window4.png", "window5.png" };
page.appendRadioIcons(
"Window Layout",
STRING_ARRAY_RANGE( layouts ),
eFloating = 1,
eSplit = 2,
eRegularLeft = 3,
+ eSingle = 4,
};
MainFrame();
};
void TextureDirectory_loadTexture( const char* directory, const char* texture ){
+ // Doom3-like dds/ prefix (used by DarkPlaces).
+ // When we list dds/textures/ folder,
+ // store the texture names without dds/ prefix.
+ if ( !strncmp( "dds/", directory, 4 ) )
+ {
+ directory = &directory[ 4 ];
+ }
+
StringOutputStream name( 256 );
name << directory << StringRange( texture, path_get_filename_base_end( texture ) );
{
LoadShaderVisitor visitor;
archive->forEachFile( Archive::VisitorFunc( visitor, Archive::eFiles, 0 ), "textures/" );
+
+ // Doom3-like dds/ prefix (used by DarkPlaces).
+ archive->forEachFile( Archive::VisitorFunc( visitor, Archive::eFiles, 0 ), "dds/textures/" );
}
else if ( extension_equal_i( path_get_extension( directory ), "wad" ) )
{
StringOutputStream dirstring( 64 );
dirstring << "textures/" << directory;
- Radiant_getImageModules().foreachModule( LoadTexturesByTypeVisitor( dirstring.c_str() ) );
+ {
+ LoadTexturesByTypeVisitor visitor( dirstring.c_str() );
+ Radiant_getImageModules().foreachModule( visitor );
+ }
+
+ // Doom3-like dds/ prefix (used by DarkPlaces).
+ dirstring.clear();
+ dirstring << "dds/textures/" << directory;
+
+ {
+ LoadTexturesByTypeVisitor visitor( dirstring.c_str() );
+ Radiant_getImageModules().foreachModule( visitor );
+ }
}
}
LoadTexturesByTypeVisitor visitor( dirstring.c_str() );
Radiant_getImageModules().foreachModule( visitor );
}
+
+ // Doom3-like dds/ prefix (used by DarkPlaces).
+ dirstring.clear();
+ dirstring << "dds/textures/" << directory;
+
+ {
+ LoadTexturesByTypeVisitor visitor( dirstring.c_str() );
+ Radiant_getImageModules().foreachModule( visitor );
+ }
}
// we'll display the newly loaded textures + all the ones already in use