misc...
* filter toobar buttons also handle right mouse clicks:
caulk: apply caulk tex
clip: toggle apply clip/weapclip tex
hint: toggle apply hint/hintlocal/hintskip tex
triggers: apply trigger tex
liquids: toggle apply watercaulk/lavacaulk/slimecaulk tex
areaportals: toggle apply nodraw/nodrawnonsolid tex
shader names are configurable through respective shader_* keys in .game file
details: make detail
structural: make structural
* png icons with real alpha; partially antialiased
radiant/error.o \
radiant/feedback.o \
radiant/filetypes.o \
+ radiant/filterbar.o \
radiant/filters.o \
radiant/findtexturedialog.o \
radiant/glwidget.o \
struct toolbar_button_info_s toolbar_buttons[NUM_TOOLBAR_BUTTONS] =
{
{
- "bkgrnd2d_xy_toggle.bmp",
+ "bkgrnd2d_xy_toggle.png",
"xy background",
"Toggle xy background image",
DoBkgrndToggleXY,
IToolbarButton::eToggleButton
},
{
- "bkgrnd2d_xz_toggle.bmp",
+ "bkgrnd2d_xz_toggle.png",
"xz background",
"Toggle xz background image",
DoBkgrndToggleXZ,
IToolbarButton::eToggleButton
},
{
- "bkgrnd2d_yz_toggle.bmp",
+ "bkgrnd2d_yz_toggle.png",
"yz background",
"Toggle yz background image",
DoBkgrndToggleYZ,
IToolbarButton::eToggleButton
},
{
- "bkgrnd2d_conf.bmp",
+ "bkgrnd2d_conf.png",
"Configure",
"Configure background images",
ShowBackgroundDialog,
--- /dev/null
+bobtoolz bitmaps are in setup/data/tools/plugins/bitmaps
public:
virtual const char* getImage() const {
switch ( mIndex ) {
- case 0: return "bobtoolz_cleanup.bmp";
- case 1: return "bobtoolz_poly.bmp";
- case 2: return "bobtoolz_caulk.bmp";
+ case 0: return "bobtoolz_cleanup.png";
+ case 1: return "bobtoolz_poly.png";
+ case 2: return "bobtoolz_caulk.png";
case 3: return "";
- case 4: return "bobtoolz_treeplanter.bmp";
- case 5: return "bobtoolz_trainpathplot.bmp";
- case 6: return "bobtoolz_dropent.bmp";
+ case 4: return "bobtoolz_treeplanter.png";
+ case 5: return "bobtoolz_trainpathplot.png";
+ case 6: return "bobtoolz_dropent.png";
case 7: return "";
- case 8: return "bobtoolz_merge.bmp";
- case 9: return "bobtoolz_split.bmp";
- case 10: return "bobtoolz_splitrow.bmp";
- case 11: return "bobtoolz_splitcol.bmp";
+ case 8: return "bobtoolz_merge.png";
+ case 9: return "bobtoolz_split.png";
+ case 10: return "bobtoolz_splitrow.png";
+ case 11: return "bobtoolz_splitcol.png";
case 12: return "";
- case 13: return "bobtoolz_turnedge.bmp";
+ case 13: return "bobtoolz_turnedge.png";
}
return NULL;
}
{
public:
virtual const char* getImage() const {
- return "camera_insp.bmp";
+ return "camera_insp.png";
}
virtual const char* getText() const {
return "Inspector";
--- /dev/null
+ufoaiplug bitmaps are in setup/data/tools/plugins/bitmaps
virtual const char* getImage() const {
switch ( mIndex )
{
- case 0: return "ufoai_level1.bmp";
- case 1: return "ufoai_level2.bmp";
- case 2: return "ufoai_level3.bmp";
- case 3: return "ufoai_level4.bmp";
- case 4: return "ufoai_level5.bmp";
- case 5: return "ufoai_level6.bmp";
- case 6: return "ufoai_level7.bmp";
- case 7: return "ufoai_level8.bmp";
- case 8: return "ufoai_stepon.bmp";
- case 9: return "ufoai_actorclip.bmp";
- case 10: return "ufoai_weaponclip.bmp";
- case 11: return "ufoai_nodraw.bmp";
+ case 0: return "ufoai_level1.png";
+ case 1: return "ufoai_level2.png";
+ case 2: return "ufoai_level3.png";
+ case 3: return "ufoai_level4.png";
+ case 4: return "ufoai_level5.png";
+ case 5: return "ufoai_level6.png";
+ case 6: return "ufoai_level7.png";
+ case 7: return "ufoai_level8.png";
+ case 8: return "ufoai_stepon.png";
+ case 9: return "ufoai_actorclip.png";
+ case 10: return "ufoai_weaponclip.png";
+ case 11: return "ufoai_nodraw.png";
}
return NULL;
}
// browse button
GtkButton* button = GTK_BUTTON( gtk_button_new() );
- button_set_icon( button, "ellipsis.bmp" );
+ button_set_icon( button, "ellipsis.png" );
gtk_widget_show( GTK_WIDGET( button ) );
gtk_box_pack_end( GTK_BOX( hbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
}
else
{
- GdkPixbuf* rgba = gdk_pixbuf_add_alpha( rgb, TRUE, 255, 0, 255 );
+ //GdkPixbuf* rgba = gdk_pixbuf_add_alpha( rgb, TRUE, 255, 0, 255 ); //pink to alpha
+ GdkPixbuf* rgba = gdk_pixbuf_add_alpha( rgb, FALSE, 255, 0, 255 ); //alpha
gdk_pixbuf_unref( rgb );
return rgba;
}
ImageModuleRef m_bitmapModule;
public:
ShadersDependencies() :
- m_bitmapModule( "bmp" ){
+ //m_bitmapModule( "bmp" ){
+ m_bitmapModule( "png" ){
}
ImageModuleRef& getBitmapModule(){
return m_bitmapModule;
Image* loadSpecial( void* environment, const char* name ){
if ( *name == '_' ) { // special image
StringOutputStream bitmapName( 256 );
- bitmapName << GlobalRadiant().getAppPath() << "bitmaps/" << name + 1 << ".bmp";
+ bitmapName << GlobalRadiant().getAppPath() << "bitmaps/" << name + 1 << ".png";
Image* image = loadBitmap( environment, bitmapName.c_str() );
if ( image != 0 ) {
return image;
{
StringOutputStream name( 256 );
- name << GlobalRadiant().getAppPath() << "bitmaps/" << ( IsDefault() ? "notex.bmp" : "shadernotex.bmp" );
+ name << GlobalRadiant().getAppPath() << "bitmaps/" << ( IsDefault() ? "notex.png" : "shadernotex.png" );
m_pTexture = GlobalTexturesCache().capture( LoadImageCallback( 0, loadBitmap ), name.c_str() );
}
}
void CamWnd_constructToolbar( GtkToolbar* toolbar ){
- toolbar_append_toggle_button( toolbar, "Cubic clip the camera view (Ctrl + \\)", "view_cubicclipping.bmp", "ToggleCubicClip" );
+ toolbar_append_toggle_button( toolbar, "Cubic clip the camera view (Ctrl + \\)", "view_cubicclipping.png", "ToggleCubicClip" );
}
void CamWnd_registerShortcuts(){
}
if ( string_compare_nocase_n( name, "trigger_", 8 ) == 0 && brushesSelected ){
- const char* shader = g_pGameDescription->getKeyValue( "trigger_shader" );
+ const char* shader = g_pGameDescription->getKeyValue( "shader_trigger" );
if ( shader && *shader ){
Scene_PatchSetShader_Selected( GlobalSceneGraph(), shader );
Scene_BrushSetShader_Selected( GlobalSceneGraph(), shader );
#include <windows.h>
-char openCmdMap[260];
+char* openCmdMap;
void cmdMap(){
- openCmdMap[0] = '\0';
+ openCmdMap = NULL;
for ( int i = 1; i < g_argc; ++i )
{
if ( !stricmp( g_argv[i] + strlen(g_argv[i]) - 4, ".map" ) ){
- strcpy( openCmdMap, g_argv[i] );
+ openCmdMap = g_argv[i];
}
}
}
extern char** g_argv;
#if defined( WIN32 )
-extern char openCmdMap[260];
+extern char* openCmdMap;
#endif
--- /dev/null
+#include "filterbar.h"
+#include <gtk/gtktoolbar.h>
+#include "gtkmisc.h"
+#include "gtkutil/widget.h"
+#include "stream/stringstream.h"
+#include "select.h"
+#include "iundo.h"
+#include "preferences.h"
+
+#include "commands.h"
+#include "gtkutil/accelerator.h"
+#include "generic/callback.h"
+
+
+
+
+int ToggleActions = 0;
+int ButtonNum = 0;
+
+gboolean ToggleActions0( GtkWidget *widget, GdkEvent *event, gpointer user_data ){
+ ToggleActions = 0;
+ return FALSE;
+ //globalOutputStream() << "ToggleActions\n";
+}
+
+void SetCommonShader( const char* key, const char* shader ){
+ const char* gotShader = g_pGameDescription->getKeyValue( key );
+ UndoableCommand undo( "textureNameSetSelected" );
+ if ( gotShader && *gotShader ){
+ Select_SetShader( gotShader );
+ }
+ else{
+ Select_SetShader( shader );
+ }
+}
+
+
+gboolean Areaportals_button_press( GtkWidget *widget, GdkEventButton *event, gpointer data ){
+ if ( event->button == 3 && event->type == GDK_BUTTON_PRESS ) {
+ if ( ButtonNum == 1 ){
+ ToggleActions %= 2;
+ }
+ else{
+ ToggleActions = 0;
+ ButtonNum = 1;
+ }
+ if( ToggleActions == 0 ){
+ SetCommonShader( "shader_nodraw", "textures/common/nodraw" );
+ }
+ else if( ToggleActions == 1 ){
+ SetCommonShader( "shader_nodrawnonsolid", "textures/common/nodrawnonsolid" );
+ }
+ //SetCommonShader( "shader_caulk", "textures/common/caulk" );
+ //globalOutputStream() << "Found '" << "fullname" << "'\n";
+ ToggleActions++;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
+gboolean Caulk_button_press( GtkWidget *widget, GdkEventButton *event, gpointer data ){
+ if ( event->button == 3 && event->type == GDK_BUTTON_PRESS ) {
+ SetCommonShader( "shader_caulk", "textures/common/caulk" );
+ ToggleActions = 0;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+gboolean Clip_button_press( GtkWidget *widget, GdkEventButton *event, gpointer data ){
+ if ( event->button == 3 && event->type == GDK_BUTTON_PRESS ) {
+ if ( ButtonNum == 3 ){
+ ToggleActions %= 2;
+ }
+ else{
+ ToggleActions = 0;
+ ButtonNum = 3;
+ }
+ if( ToggleActions == 0 ){
+ SetCommonShader( "shader_clip", "textures/common/clip" );
+ }
+ else if( ToggleActions == 1 ){
+ SetCommonShader( "shader_weapclip", "textures/common/weapclip" );
+ }
+ ToggleActions++;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+gboolean Liquids_button_press( GtkWidget *widget, GdkEventButton *event, gpointer data ){
+ if ( event->button == 3 && event->type == GDK_BUTTON_PRESS ) {
+ if ( ButtonNum == 4 ){
+ ToggleActions %= 3;
+ }
+ else{
+ ToggleActions = 0;
+ ButtonNum = 4;
+ }
+ if( ToggleActions == 0 ){
+ SetCommonShader( "shader_watercaulk", "textures/common/watercaulk" );
+ }
+ else if( ToggleActions == 1 ){
+ SetCommonShader( "shader_lavacaulk", "textures/common/lavacaulk" );
+ }
+ else if( ToggleActions == 2 ){
+ SetCommonShader( "shader_slimecaulk", "textures/common/slimecaulk" );
+ }
+ ToggleActions++;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
+gboolean Hint_button_press( GtkWidget *widget, GdkEventButton *event, gpointer data ){
+ if ( event->button == 3 && event->type == GDK_BUTTON_PRESS ) {
+ if ( ButtonNum == 5 ){
+ ToggleActions %= 3;
+ }
+ else{
+ ToggleActions = 0;
+ ButtonNum = 5;
+ }
+ if( ToggleActions == 0 ){
+ SetCommonShader( "shader_hint", "textures/common/hint" );
+ }
+ else if( ToggleActions == 1 ){
+ SetCommonShader( "shader_hintlocal", "textures/common/hintlocal" );
+ }
+ else if( ToggleActions == 2 ){
+ SetCommonShader( "shader_hintskip", "textures/common/hintskip" );
+ }
+ ToggleActions++;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+gboolean Trigger_button_press( GtkWidget *widget, GdkEventButton *event, gpointer data ){
+ if ( event->button == 3 && event->type == GDK_BUTTON_PRESS ) {
+ SetCommonShader( "shader_trigger", "textures/common/trigger" );
+ ToggleActions = 0;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+gboolean Detail_button_press( GtkWidget *widget, GdkEventButton *event, gpointer data ){
+ if ( event->button == 3 && event->type == GDK_BUTTON_PRESS ) {
+ GlobalCommands_find( "MakeDetail" ).m_callback();
+ ToggleActions = 0;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+gboolean Structural_button_press( GtkWidget *widget, GdkEventButton *event, gpointer data ){
+ if ( event->button == 3 && event->type == GDK_BUTTON_PRESS ) {
+ GlobalCommands_find( "MakeStructural" ).m_callback();
+ ToggleActions = 0;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
+GtkToolbar* create_filter_toolbar(){
+ GtkToolbar* filter_toolbar = GTK_TOOLBAR( gtk_toolbar_new() );
+ gtk_widget_show( GTK_WIDGET( filter_toolbar ) );
+ g_signal_connect( G_OBJECT( filter_toolbar ), "enter_notify_event", G_CALLBACK( ToggleActions0 ), 0 );
+
+ GtkToggleButton* button;
+
+ toolbar_append_toggle_button( filter_toolbar, "World (ALT + 1)", "f-world.png", "FilterWorldBrushes" );
+
+ button = toolbar_append_toggle_button( filter_toolbar, "Details (CTRL + D)\nRightClick: MakeDetail", "f-details.png", "FilterDetails" );
+ g_signal_connect( G_OBJECT( button ), "button_press_event", G_CALLBACK( Detail_button_press ), 0 );
+
+ button = toolbar_append_toggle_button( filter_toolbar, "Structural (CTRL + SHIFT + D)\nRightClick: MakeStructural", "f-structural.png", "FilterStructural" );
+ g_signal_connect( G_OBJECT( button ), "button_press_event", G_CALLBACK( Structural_button_press ), 0 );
+
+
+ toolbar_append_toggle_button( filter_toolbar, "Patches (CTRL + P)", "patch_wireframe.png", "FilterPatches" );
+ gtk_toolbar_append_space( GTK_TOOLBAR( filter_toolbar ) );
+
+ button = toolbar_append_toggle_button( filter_toolbar, "Areaportals (ALT + 3)\nRightClick: toggle tex\n\tnoDraw\n\tnoDrawNonSolid", "f-areaportal.png", "FilterAreaportals" );
+ g_signal_connect( G_OBJECT( button ), "button_press_event", G_CALLBACK( Areaportals_button_press ), 0 );
+
+
+
+ toolbar_append_toggle_button( filter_toolbar, "Translucent (ALT + 4)", "f-translucent.png", "FilterTranslucent" );
+
+ button = toolbar_append_toggle_button( filter_toolbar, "Liquids (ALT + 5)\nRightClick: toggle tex\n\twaterCaulk\n\tlavaCaulk\n\tslimeCaulk", "f-liquids.png", "FilterLiquids" );
+ g_signal_connect( G_OBJECT( button ), "button_press_event", G_CALLBACK( Liquids_button_press ), 0 );
+
+ button = toolbar_append_toggle_button( filter_toolbar, "Caulk (ALT + 6)\nRightClick: tex Caulk", "f-caulk.png", "FilterCaulk" );
+ g_signal_connect( G_OBJECT( button ), "button_press_event", G_CALLBACK( Caulk_button_press ), 0 );
+
+ button = toolbar_append_toggle_button( filter_toolbar, "Clips (ALT + 7)\nRightClick: toggle tex\n\tplayerClip\n\tweapClip", "f-clip.png", "FilterClips" );
+ g_signal_connect( G_OBJECT( button ), "button_press_event", G_CALLBACK( Clip_button_press ), 0 );
+
+ button = toolbar_append_toggle_button( filter_toolbar, "HintsSkips (CTRL + H)\nRightClick: toggle tex\n\thint\n\thintLocal\n\thintSkip", "f-hint.png", "FilterHintsSkips" );
+ g_signal_connect( G_OBJECT( button ), "button_press_event", G_CALLBACK( Hint_button_press ), 0 );
+
+ //toolbar_append_toggle_button( filter_toolbar, "Paths (ALT + 8)", "texture_lock.png", "FilterPaths" );
+ gtk_toolbar_append_space( GTK_TOOLBAR( filter_toolbar ) );
+ toolbar_append_toggle_button( filter_toolbar, "Entities (ALT + 2)", "f-entities.png", "FilterEntities" );
+ toolbar_append_toggle_button( filter_toolbar, "Lights (ALT + 0)", "lightinspector.png", "FilterLights" );
+ toolbar_append_toggle_button( filter_toolbar, "Models (SHIFT + M)", "f-models.png", "FilterModels" );
+
+ button = toolbar_append_toggle_button( filter_toolbar, "Triggers (CTRL + SHIFT + T)\nRightClick: tex Trigger", "f-triggers.png", "FilterTriggers" );
+ g_signal_connect( G_OBJECT( button ), "button_press_event", G_CALLBACK( Trigger_button_press ), 0 );
+
+ //toolbar_append_toggle_button( filter_toolbar, "Decals (SHIFT + D)", "f-decals.png", "FilterDecals" );
+ gtk_toolbar_append_space( GTK_TOOLBAR( filter_toolbar ) );
+ toolbar_append_button( filter_toolbar, "InvertFilters", "f-invert.png", "InvertFilters" );
+ toolbar_append_button( filter_toolbar, "ResetFilters", "f-reset.png", "ResetFilters" );
+ return filter_toolbar;
+}
--- /dev/null
+#if !defined( INCLUDED_FILTERBAR_H )
+#define INCLUDED_FILTERBAR_H
+
+#include <gtk/gtktoolbar.h>
+
+
+
+
+
+
+
+GtkToolbar* create_filter_toolbar();
+
+
+
+#endif
GtkFrame* frame = create_dialog_frame( 0, GTK_SHADOW_IN );
gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( frame ), FALSE, FALSE, 0 );
{
- GtkImage* image = new_local_image( "logo.bmp" );
+ GtkImage* image = new_local_image( "logo.png" );
gtk_widget_show( GTK_WIDGET( image ) );
gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( image ) );
}
hide_splash();
#ifdef WIN32
- if( openCmdMap[0] != '\0' ){
+ if( openCmdMap && *openCmdMap ){
Map_LoadFile( openCmdMap );
}
else
#include "feedback.h"
#include "referencecache.h"
+#include "filterbar.h"
struct layout_globals_t
}
void File_constructToolbar( GtkToolbar* toolbar ){
- toolbar_append_button( toolbar, "Open an existing map (CTRL + O)", "file_open.bmp", "OpenMap" );
- toolbar_append_button( toolbar, "Save the active map (CTRL + S)", "file_save.bmp", "SaveMap" );
+ toolbar_append_button( toolbar, "Open an existing map (CTRL + O)", "file_open.png", "OpenMap" );
+ toolbar_append_button( toolbar, "Save the active map (CTRL + S)", "file_save.png", "SaveMap" );
}
void UndoRedo_constructToolbar( GtkToolbar* toolbar ){
- toolbar_append_button( toolbar, "Undo (CTRL + Z)", "undo.bmp", "Undo" );
- toolbar_append_button( toolbar, "Redo (CTRL + Y)", "redo.bmp", "Redo" );
+ toolbar_append_button( toolbar, "Undo (CTRL + Z)", "undo.png", "Undo" );
+ toolbar_append_button( toolbar, "Redo (CTRL + Y)", "redo.png", "Redo" );
}
void RotateFlip_constructToolbar( GtkToolbar* toolbar ){
- toolbar_append_button( toolbar, "x-axis Flip", "brush_flipx.bmp", "MirrorSelectionX" );
- toolbar_append_button( toolbar, "x-axis Rotate", "brush_rotatex.bmp", "RotateSelectionX" );
- toolbar_append_button( toolbar, "y-axis Flip", "brush_flipy.bmp", "MirrorSelectionY" );
- toolbar_append_button( toolbar, "y-axis Rotate", "brush_rotatey.bmp", "RotateSelectionY" );
- toolbar_append_button( toolbar, "z-axis Flip", "brush_flipz.bmp", "MirrorSelectionZ" );
- toolbar_append_button( toolbar, "z-axis Rotate", "brush_rotatez.bmp", "RotateSelectionZ" );
+ toolbar_append_button( toolbar, "x-axis Flip", "brush_flipx.png", "MirrorSelectionX" );
+ toolbar_append_button( toolbar, "x-axis Rotate", "brush_rotatex.png", "RotateSelectionX" );
+ toolbar_append_button( toolbar, "y-axis Flip", "brush_flipy.png", "MirrorSelectionY" );
+ toolbar_append_button( toolbar, "y-axis Rotate", "brush_rotatey.png", "RotateSelectionY" );
+ toolbar_append_button( toolbar, "z-axis Flip", "brush_flipz.png", "MirrorSelectionZ" );
+ toolbar_append_button( toolbar, "z-axis Rotate", "brush_rotatez.png", "RotateSelectionZ" );
}
void Select_constructToolbar( GtkToolbar* toolbar ){
- toolbar_append_button( toolbar, "Select touching", "selection_selecttouching.bmp", "SelectTouching" );
- toolbar_append_button( toolbar, "Select inside", "selection_selectinside.bmp", "SelectInside" );
+ toolbar_append_button( toolbar, "Select touching", "selection_selecttouching.png", "SelectTouching" );
+ toolbar_append_button( toolbar, "Select inside", "selection_selectinside.png", "SelectInside" );
}
void CSG_constructToolbar( GtkToolbar* toolbar ){
- toolbar_append_button( toolbar, "CSG Subtract (SHIFT + U)", "selection_csgsubtract.bmp", "CSGSubtract" );
- toolbar_append_button( toolbar, "CSG Merge (CTRL + U)", "selection_csgmerge.bmp", "CSGMerge" );
- toolbar_append_button( toolbar, "Hollow", "selection_makehollow.bmp", "CSGHollow" );
- toolbar_append_button( toolbar, "Room", "selection_makeroom.bmp", "CSGroom" );
+ 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, "Room", "selection_makeroom.png", "CSGroom" );
}
void ComponentModes_constructToolbar( GtkToolbar* toolbar ){
- toolbar_append_toggle_button( toolbar, "Select Vertices (V)", "modify_vertices.bmp", "DragVertices" );
- toolbar_append_toggle_button( toolbar, "Select Edges (E)", "modify_edges.bmp", "DragEdges" );
- toolbar_append_toggle_button( toolbar, "Select Faces (F)", "modify_faces.bmp", "DragFaces" );
+ toolbar_append_toggle_button( toolbar, "Select Vertices (V)", "modify_vertices.png", "DragVertices" );
+ toolbar_append_toggle_button( toolbar, "Select Edges (E)", "modify_edges.png", "DragEdges" );
+ toolbar_append_toggle_button( toolbar, "Select Faces (F)", "modify_faces.png", "DragFaces" );
}
void Clipper_constructToolbar( GtkToolbar* toolbar ){
- toolbar_append_toggle_button( toolbar, "Clipper (X)", "view_clipper.bmp", "ToggleClipper" );
+ toolbar_append_toggle_button( toolbar, "Clipper (X)", "view_clipper.png", "ToggleClipper" );
}
void XYWnd_constructToolbar( GtkToolbar* toolbar ){
- toolbar_append_button( toolbar, "Change views", "view_change.bmp", "NextView" );
+ toolbar_append_button( toolbar, "Change views", "view_change.png", "NextView" );
}
void Manipulators_constructToolbar( GtkToolbar* toolbar ){
- toolbar_append_toggle_button( toolbar, "Translate (W)", "select_mousetranslate.bmp", "MouseTranslate" );
- toolbar_append_toggle_button( toolbar, "Rotate (R)", "select_mouserotate.bmp", "MouseRotate" );
- toolbar_append_toggle_button( toolbar, "Scale", "select_mousescale.bmp", "MouseScale" );
- toolbar_append_toggle_button( toolbar, "Resize (Q)", "select_mouseresize.bmp", "MouseDrag" );
+ toolbar_append_toggle_button( toolbar, "Translate (W)", "select_mousetranslate.png", "MouseTranslate" );
+ toolbar_append_toggle_button( toolbar, "Rotate (R)", "select_mouserotate.png", "MouseRotate" );
+ toolbar_append_toggle_button( toolbar, "Scale", "select_mousescale.png", "MouseScale" );
+ toolbar_append_toggle_button( toolbar, "Resize (Q)", "select_mouseresize.png", "MouseDrag" );
Clipper_constructToolbar( toolbar );
}
gtk_toolbar_append_space( GTK_TOOLBAR( toolbar ) );
- toolbar_append_toggle_button( toolbar, "Texture Lock (SHIFT + T)", "texture_lock.bmp", "TogTexLock" );
+ toolbar_append_toggle_button( toolbar, "Texture Lock (SHIFT + T)", "texture_lock.png", "TogTexLock" );
gtk_toolbar_append_space( GTK_TOOLBAR( toolbar ) );
- GtkButton* g_view_entities_button = toolbar_append_button( toolbar, "Entities (N)", "entities.bmp", "ToggleEntityInspector" );
- GtkButton* g_view_console_button = toolbar_append_button( toolbar, "Console (O)", "console.bmp", "ToggleConsole" );
- GtkButton* g_view_textures_button = toolbar_append_button( toolbar, "Texture Browser (T)", "texture_browser.bmp", "ToggleTextures" );
+ GtkButton* g_view_entities_button = toolbar_append_button( toolbar, "Entities (N)", "entities.png", "ToggleEntityInspector" );
+ GtkButton* g_view_console_button = toolbar_append_button( toolbar, "Console (O)", "console.png", "ToggleConsole" );
+ GtkButton* g_view_textures_button = toolbar_append_button( toolbar, "Texture Browser (T)", "texture_browser.png", "ToggleTextures" );
// TODO: call light inspector
- //GtkButton* g_view_lightinspector_button = toolbar_append_button(toolbar, "Light Inspector", "lightinspector.bmp", "ToggleLightInspector");
+ //GtkButton* g_view_lightinspector_button = toolbar_append_button(toolbar, "Light Inspector", "lightinspector.png", "ToggleLightInspector");
gtk_toolbar_append_space( GTK_TOOLBAR( toolbar ) );
- GtkButton* g_refresh_models_button = toolbar_append_button( toolbar, "Refresh Models", "refresh_models.bmp", "RefreshReferences" );
+ GtkButton* g_refresh_models_button = toolbar_append_button( toolbar, "Refresh Models", "refresh_models.png", "RefreshReferences" );
// disable the console and texture button in the regular layouts
gtk_window_set_position( window, GTK_WIN_POS_CENTER );
gtk_container_set_border_width( GTK_CONTAINER( window ), 0 );
- GtkImage* image = new_local_image( "splash.bmp" );
+ GtkImage* image = new_local_image( "splash.png" );
gtk_widget_show( GTK_WIDGET( image ) );
gtk_container_add( GTK_CONTAINER( window ), GTK_WIDGET( image ) );
#if !defined( WIN32 )
{
- GdkPixbuf* pixbuf = pixbuf_new_from_file_with_mask( "bitmaps/icon.bmp" );
+ GdkPixbuf* pixbuf = pixbuf_new_from_file_with_mask( "bitmaps/icon.png" );
if ( pixbuf != 0 ) {
gtk_window_set_icon( window, pixbuf );
gdk_pixbuf_unref( pixbuf );
}
}
if ( g_Layout_enableFilterToolbar.m_value ){
- GtkToolbar* filter_toolbar = GTK_TOOLBAR( gtk_toolbar_new() );
- gtk_widget_show( GTK_WIDGET( filter_toolbar ) );
-
- toolbar_append_toggle_button( filter_toolbar, "World (ALT + 1)", "f-world.bmp", "FilterWorldBrushes" );
- toolbar_append_toggle_button( filter_toolbar, "Details (CTRL + D)", "f-details.bmp", "FilterDetails" );
- toolbar_append_toggle_button( filter_toolbar, "Structural (CTRL + SHIFT + D)", "f-structural.bmp", "FilterStructural" );
- toolbar_append_toggle_button( filter_toolbar, "Patches (CTRL + P)", "patch_wireframe.bmp", "FilterPatches" );
- gtk_toolbar_append_space( GTK_TOOLBAR( filter_toolbar ) );
- toolbar_append_toggle_button( filter_toolbar, "Areaportals (ALT + 3)", "f-areaportal.bmp", "FilterAreaportals" );
- toolbar_append_toggle_button( filter_toolbar, "Translucent (ALT + 4)", "f-translucent.bmp", "FilterTranslucent" );
- toolbar_append_toggle_button( filter_toolbar, "Liquids (ALT + 5)", "f-liquids.bmp", "FilterLiquids" );
- toolbar_append_toggle_button( filter_toolbar, "Caulk (ALT + 6)", "f-caulk.bmp", "FilterCaulk" );
- toolbar_append_toggle_button( filter_toolbar, "Clips (ALT + 7)", "f-clip.bmp", "FilterClips" );
- toolbar_append_toggle_button( filter_toolbar, "HintsSkips (CTRL + H)", "f-hint.bmp", "FilterHintsSkips" );
- //toolbar_append_toggle_button( filter_toolbar, "Paths (ALT + 8)", "texture_lock.bmp", "FilterPaths" );
- gtk_toolbar_append_space( GTK_TOOLBAR( filter_toolbar ) );
- toolbar_append_toggle_button( filter_toolbar, "Entities (ALT + 2)", "f-entities.bmp", "FilterEntities" );
- toolbar_append_toggle_button( filter_toolbar, "Lights (ALT + 0)", "lightinspector.bmp", "FilterLights" );
- toolbar_append_toggle_button( filter_toolbar, "Models (SHIFT + M)", "f-models.bmp", "FilterModels" );
- toolbar_append_toggle_button( filter_toolbar, "Triggers (CTRL + SHIFT + T)", "f-triggers.bmp", "FilterTriggers" );
- //toolbar_append_toggle_button( filter_toolbar, "Decals (SHIFT + D)", "f-decals.bmp", "FilterDecals" );
- gtk_toolbar_append_space( GTK_TOOLBAR( filter_toolbar ) );
- toolbar_append_button( filter_toolbar, "InvertFilters", "f-invert.bmp", "InvertFilters" );
- toolbar_append_button( filter_toolbar, "ResetFilters", "f-reset.bmp", "ResetFilters" );
-
+ GtkToolbar* filter_toolbar = create_filter_toolbar();
gtk_box_pack_start( GTK_BOX( PFbox ), GTK_WIDGET( filter_toolbar ), TRUE, TRUE, 0 );
}
}
void Layout_constructPreferences( PreferencesPage& page ){
{
- const char* layouts[] = { "window1.bmp", "window2.bmp", "window3.bmp", "window4.bmp" };
+ const char* layouts[] = { "window1.png", "window2.png", "window3.png", "window4.png" };
page.appendRadioIcons(
"Window Layout",
STRING_ARRAY_RANGE( layouts ),
}
void Patch_constructToolbar( GtkToolbar* toolbar ){
- toolbar_append_button( toolbar, "Put caps on the current patch (SHIFT + C)", "curve_cap.bmp", "CapCurrentCurve" );
+ toolbar_append_button( toolbar, "Put caps on the current patch (SHIFT + C)", "curve_cap.png", "CapCurrentCurve" );
}
void Patch_constructMenu( GtkMenu* menu ){
gtk_table_set_col_spacings( table, 5 );
{
- GtkImage* image = new_local_image( "cap_bevel.bmp" );
+ GtkImage* image = new_local_image( "cap_bevel.png" );
gtk_widget_show( GTK_WIDGET( image ) );
gtk_table_attach( table, GTK_WIDGET( image ), 0, 1, 0, 1,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
- GtkImage* image = new_local_image( "cap_endcap.bmp" );
+ GtkImage* image = new_local_image( "cap_endcap.png" );
gtk_widget_show( GTK_WIDGET( image ) );
gtk_table_attach( table, GTK_WIDGET( image ), 0, 1, 1, 2,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
- GtkImage* image = new_local_image( "cap_ibevel.bmp" );
+ GtkImage* image = new_local_image( "cap_ibevel.png" );
gtk_widget_show( GTK_WIDGET( image ) );
gtk_table_attach( table, GTK_WIDGET( image ), 0, 1, 2, 3,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
- GtkImage* image = new_local_image( "cap_iendcap.bmp" );
+ GtkImage* image = new_local_image( "cap_iendcap.png" );
gtk_widget_show( GTK_WIDGET( image ) );
gtk_table_attach( table, GTK_WIDGET( image ), 0, 1, 3, 4,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
- GtkImage* image = new_local_image( "cap_cylinder.bmp" );
+ GtkImage* image = new_local_image( "cap_cylinder.png" );
gtk_widget_show( GTK_WIDGET( image ) );
gtk_table_attach( table, GTK_WIDGET( image ), 0, 1, 4, 5,
(GtkAttachOptions) ( GTK_FILL ),
void TextureBrowser_SetNotex(){
StringOutputStream name( 256 );
- name << GlobalRadiant().getAppPath() << "bitmaps/notex.bmp";
+ name << GlobalRadiant().getAppPath() << "bitmaps/notex.png";
g_notex = name.c_str();
name = NULL;
- name << GlobalRadiant().getAppPath() << "bitmaps/shadernotex.bmp";
+ name << GlobalRadiant().getAppPath() << "bitmaps/shadernotex.png";
g_shadernotex = name.c_str();
}