[Frontierproject-cvs] frontierproject/src widget_painter.cpp,1.17,1.18
Status: Pre-Alpha
Brought to you by:
bdragon28
|
From: Brandon B. <bdr...@us...> - 2006-05-17 06:41:12
|
Update of /cvsroot/frontierproject/frontierproject/src In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv5024/src Modified Files: widget_painter.cpp Log Message: Make font sizes more sane in painter. Make setting packet destination behave in a better manner. (by flagging the screen dirty and returning, instead of changing the selection) Index: widget_painter.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/widget_painter.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** widget_painter.cpp 16 May 2006 20:47:08 -0000 1.17 --- widget_painter.cpp 17 May 2006 06:41:09 -0000 1.18 *************** *** 582,589 **** //Determine which font to use, depending on zoom. //@@@Sometime, do this more scientifically. ! if(zoom<1) dc.setFont(tinyFont); ! else if(zoom < 1.5) dc.setFont(smallFont); ! else if(zoom < 2) dc.setFont(normalFont); ! else if(zoom < 2.5) dc.setFont(largeFont); else dc.setFont(largestFont); } --- 582,590 ---- //Determine which font to use, depending on zoom. //@@@Sometime, do this more scientifically. ! const double mult = 2; ! if(zoom<1*mult) dc.setFont(tinyFont); ! else if(zoom < 1.5*mult) dc.setFont(smallFont); ! else if(zoom < 2*mult) dc.setFont(normalFont); ! else if(zoom < 2.5*mult) dc.setFont(largeFont); else dc.setFont(largestFont); } *************** *** 785,788 **** --- 786,791 ---- CLOG("Painter: Setting packet dest! %s's new destination is %s!\n", p->GetName().c_str(), d->at(0)->InOrbit()->GetName().c_str()); dynamic_cast<FreeStars::Planet*>(mLastSelected->at(mpLastSelected))->SetPacketDest(d->at(0)->InOrbit()); + update(); + return 1; } } |