Revision: 7201 http://playerstage.svn.sourceforge.net/playerstage/?rev=7201&view=rev Author: rtv Date: 2008-12-11 01:10:35 +0000 (Thu, 11 Dec 2008)
Log Message: ----------- tweaked view dialog behaviour and text Modified Paths: -------------- code/stage/trunk/libstage/canvas.cc code/stage/trunk/libstage/options_dlg.cc code/stage/trunk/libstage/options_dlg.hh code/stage/trunk/worlds/asr.world Modified: code/stage/trunk/libstage/canvas.cc =================================================================== --- code/stage/trunk/libstage/canvas.cc 2008-12-10 23:14:55 UTC (rev 7200) +++ code/stage/trunk/libstage/canvas.cc 2008-12-11 01:10:35 UTC (rev 7201) @@ -74,7 +74,7 @@ showBBoxes( "Debug/Bounding boxes", "show_boundingboxes", "^b", false ), showBlur( "Trails/Blur", "show_trailblur", "^d", false ), pCamOn( "Perspective camera", "pcam_on", "r", false ), - visualizeAll( "Visualize All", "vis_all", "^v", true ), + visualizeAll( "Selected only", "vis_all", "^v", false ), // and the rest graphics( true ), world( world ) @@ -795,7 +795,7 @@ //LISTMETHOD( models_sorted, StgModel*, DrawWaypoints ); // MOTION BLUR - if( showBlur ) + if( 0 )//showBlur ) { DrawBlocks(); @@ -819,7 +819,7 @@ } // GRAY TRAILS -// if( showBlocks ) +// if( showBlur ) // { // static float count = 0; @@ -846,7 +846,7 @@ // } // PRETTY BLACK -// if( showBlocks ) +// if( showBlur && showBlocks ) // { // static float count = 0; @@ -900,7 +900,7 @@ // draw the model-specific visualizations if( showData ) { - if ( visualizeAll ) { + if ( ! visualizeAll ) { for( GList* it = world->StgWorld::children; it; it=it->next ) ((StgModel*)it->data)->DataVisualizeTree( current_camera ); } @@ -1051,7 +1051,6 @@ png_set_rows( pp, info, rowpointers ); - //png_set_compression_level(pp, Z_DEFAULT_COMPRESSION); png_set_IHDR( pp, info, width, height, 8, PNG_COLOR_TYPE_RGBA, @@ -1061,7 +1060,7 @@ png_write_png( pp, info, PNG_TRANSFORM_IDENTITY, NULL ); - // free the PNG data - we reuse the pixel data next time. + // free the PNG data - we reuse the pixel array next call. png_destroy_write_struct(&pp, &info); fclose(fp); Modified: code/stage/trunk/libstage/options_dlg.cc =================================================================== --- code/stage/trunk/libstage/options_dlg.cc 2008-12-10 23:14:55 UTC (rev 7200) +++ code/stage/trunk/libstage/options_dlg.cc 2008-12-11 01:10:35 UTC (rev 7201) @@ -4,12 +4,14 @@ namespace Stg { OptionsDlg::OptionsDlg( int x, int y, int w, int h ) : - Fl_Window( x,y, w,h, "Filter" ), + Fl_Window( x,y, w,h, "Visualize" ), changedItem( NULL ), showAll( NULL ), status( NO_EVENT ), hm( w/6 ) { + set_non_modal(); // keep on top but do not grab all events + showAllCheck = new Fl_Check_Button( 0,0, w,boxH ); showAllCheck->callback( checkChanged, this ); @@ -34,21 +36,23 @@ Fl_Check_Button* check = static_cast<Fl_Check_Button*>( w ); OptionsDlg* oDlg = static_cast<OptionsDlg*>( p ); - if ( check == oDlg->showAllCheck && oDlg->showAll ) { - oDlg->status = CHANGE_ALL; - oDlg->showAll->set( check->value() ); - oDlg->do_callback(); - oDlg->status = NO_EVENT; - } - else { - int item = oDlg->scroll->find( check ); - oDlg->options[ item ]->set( check->value() ); - oDlg->changedItem = oDlg->options[ item ]; - oDlg->status = CHANGE; - oDlg->do_callback(); - oDlg->changedItem = NULL; - oDlg->status = NO_EVENT; - } + if ( check == oDlg->showAllCheck && oDlg->showAll ) + { + oDlg->status = CHANGE_ALL; + oDlg->showAll->set( check->value() ); + oDlg->do_callback(); + oDlg->status = NO_EVENT; + } + else + { + int item = oDlg->scroll->find( check ); + oDlg->options[ item ]->set( check->value() ); + oDlg->changedItem = oDlg->options[ item ]; + oDlg->status = CHANGE; + oDlg->do_callback(); + oDlg->changedItem = NULL; + oDlg->status = NO_EVENT; + } } void OptionsDlg::closePress( Fl_Widget* w, void* p ) { @@ -59,13 +63,9 @@ oDlg->status = NO_EVENT; } - int OptionsDlg::handle( int event ) { - // switch ( event ) { - // - // } - - return Fl_Window::handle( event ); - } +// int OptionsDlg::handle( int event ) { +// return Fl_Window::handle( event ); +// } void OptionsDlg::updateChecks() { Modified: code/stage/trunk/libstage/options_dlg.hh =================================================================== --- code/stage/trunk/libstage/options_dlg.hh 2008-12-10 23:14:55 UTC (rev 7200) +++ code/stage/trunk/libstage/options_dlg.hh 2008-12-11 01:10:35 UTC (rev 7201) @@ -30,7 +30,7 @@ Fl_Check_Button* showAllCheck; void updateChecks(); - virtual int handle( int event ); + //virtual int handle( int event ); static void checkChanged( Fl_Widget* w, void* p ); static void closePress( Fl_Widget* w, void* p ); Modified: code/stage/trunk/worlds/asr.world =================================================================== --- code/stage/trunk/worlds/asr.world 2008-12-10 23:14:55 UTC (rev 7200) +++ code/stage/trunk/worlds/asr.world 2008-12-11 01:10:35 UTC (rev 7201) @@ -20,10 +20,10 @@ # configure the GUI window window ( - size [ 1916.000 1156.000 ] + size [ 967.000 744.000 ] - center [ 1.814 5.214 ] - rotate [ 0 0 ] + center [ 3.759 6.706 ] + rotate [ 70.000 5.000 ] scale 71.081 pcam_loc [ 0 -4.000 2.000 ] @@ -41,7 +41,7 @@ ( name "cave" size [100.000 100.000 0.600] - pose [0 0 0 50] + pose [0 0 0 50.000] bitmap "bitmaps/frieburg.png" boundary 0 ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ Playerstage-commit mailing list Playerstage-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/playerstage-commit