- Fix crosshair position
authorunc0rr
Wed, 15 Nov 2006 21:53:50 +0000
changeset 244 b37ca2295b73
parent 243 556b40fbd28c
child 245 4f6b53b7a567
- Fix crosshair position - Better looking teams select widget
QTfrontend/teamselect.cpp
hedgewars/uWorld.pas
--- a/QTfrontend/teamselect.cpp	Wed Nov 15 19:41:50 2006 +0000
+++ b/QTfrontend/teamselect.cpp	Wed Nov 15 21:53:50 2006 +0000
@@ -94,8 +94,11 @@
   setTitle(QGroupBox::tr("Playing teams"));
   framePlaying=new FrameTeams();
   frameDontPlaying=new FrameTeams();
-  addScrArea(framePlaying, QColor("DarkTurquoise"));
-  addScrArea(frameDontPlaying, QColor("LightGoldenrodYellow"));
+//  addScrArea(framePlaying, QColor("DarkTurquoise"));
+//  addScrArea(frameDontPlaying, QColor("LightGoldenrodYellow"));
+  QPalette p;
+  addScrArea(framePlaying, p.color(QPalette::Window).light(105));
+  addScrArea(frameDontPlaying, p.color(QPalette::Window).dark(105));
 }
 
 void TeamSelWidget::resetPlayingTeams(const QList<HWTeam>& teamslist)
--- a/hedgewars/uWorld.pas	Wed Nov 15 19:41:50 2006 +0000
+++ b/hedgewars/uWorld.pas	Wed Nov 15 21:53:50 2006 +0000
@@ -233,7 +233,7 @@
                            DrawGear(sQuestion, Round(Gear.X) - 10 + WorldDx, Round(Gear.Y) - cHHRadius - 34 + WorldDy, Surface)
                         else
                         if ShowCrosshair and ((Gear.State and gstAttacked) = 0) then
-                           DrawSurfSprite(Round(Gear.X + hwSign(Gear.dX) * Sin(Gear.Angle*pi/cMaxAngle)*60) + WorldDx - 8,
+                           DrawSurfSprite(Round(Gear.X + hwSign(Gear.dX) * Sin(Gear.Angle*pi/cMaxAngle)*60) + WorldDx - 11,
                                           Round(Gear.Y - Cos(Gear.Angle*pi/cMaxAngle)*60) + WorldDy - 12,
                                           24, (18 + hwSign(Gear.dX) * integer(((Gear.Angle * 72 div cMaxAngle) + 1) div 2) mod 18) mod 18,
                                           Team.CrosshairSurf, Surface);