From: <Ven...@us...> - 2009-07-12 03:40:54
|
Revision: 3983 http://planeshift.svn.sourceforge.net/planeshift/?rev=3983&view=rev Author: Vengeance2001 Date: 2009-07-12 03:40:51 +0000 (Sun, 12 Jul 2009) Log Message: ----------- - Fixed the voice sequencing. I think it should work now. - Also committed improvements to the combobox control from several weeks ago. - Commented out a call to SetIcon in csSetup that doesn't exist in CS anymore. Modified Paths: -------------- trunk/src/common/net/clientmsghandler.cpp trunk/src/common/net/msghandler.h trunk/src/common/paws/pawscombo.cpp trunk/src/common/paws/pawscombo.h trunk/src/common/util/log.cpp trunk/src/common/util/pscssetup.cpp Modified: trunk/src/common/net/clientmsghandler.cpp =================================================================== --- trunk/src/common/net/clientmsghandler.cpp 2009-07-11 23:20:58 UTC (rev 3982) +++ trunk/src/common/net/clientmsghandler.cpp 2009-07-12 03:40:51 UTC (rev 3983) @@ -104,6 +104,7 @@ { printf("Adding new sequence channel for msgtype %d.\n", msg->GetType()); channel = new OrderedMessageChannel; + channel->IncrementSequenceNumber(); // prime the pump orderedMessages.Put(msg->GetType(), channel); } int nextSequenceExpected = channel->GetCurrentSequenceNumber(); Modified: trunk/src/common/net/msghandler.h =================================================================== --- trunk/src/common/net/msghandler.h 2009-07-11 23:20:58 UTC (rev 3982) +++ trunk/src/common/net/msghandler.h 2009-07-12 03:40:51 UTC (rev 3983) @@ -104,7 +104,7 @@ int nextSequenceNumber; csRefArray<MsgEntry> pendingMessages; - OrderedMessageChannel() : nextSequenceNumber(1) { } + OrderedMessageChannel() : nextSequenceNumber(0) { } int GetCurrentSequenceNumber() { return nextSequenceNumber; } int IncrementSequenceNumber() Modified: trunk/src/common/paws/pawscombo.cpp =================================================================== --- trunk/src/common/paws/pawscombo.cpp 2009-07-11 23:20:58 UTC (rev 3982) +++ trunk/src/common/paws/pawscombo.cpp 2009-07-12 03:40:51 UTC (rev 3983) @@ -59,6 +59,21 @@ fliptotop = listNode->GetAttributeValueAsBool("fliptotop"); useScrollBar = listNode->GetAttributeValueAsBool("useScrollBar", true); + listNode = node->GetNode("button"); + if (!listNode) + { + upButton = "New Up Arrow"; + downButton = "New Down Arrow"; + upButtonPressed = "New Up Arrow Pressed"; + downButtonPressed = "New Down Arrow Pressed"; + } + else + { + upButton = listNode->GetAttributeValue("upButton"); + downButton = listNode->GetAttributeValue("downButton"); + upButtonPressed = listNode->GetAttributeValue("upButtonPressed"); + downButtonPressed = listNode->GetAttributeValue("downButtonPressed"); + } return true; } @@ -73,9 +88,9 @@ AddChild( arrow ); // Puts the button at the edge of the text box widget - arrow->SetRelativeFrame( defaultFrame.Width()-16, 4, 16, 16 ); - arrow->SetUpImage( "Down Arrow" ); - arrow->SetDownImage( "Down Arrow" ); + arrow->SetRelativeFrame( defaultFrame.Width()-18, 4, 18, 16 ); + arrow->SetUpImage(downButton); + arrow->SetDownImage(downButtonPressed); arrow->SetID( SHOW_LIST ); ok = arrow->PostSetup(); @@ -85,10 +100,11 @@ // Create the textbox that has the current selected choice /////////////////////////////////////////////////////////////////////// itemChoice = new pawsTextBox; + itemChoice->SetBackground("Scaling Widget Background"); AddChild( itemChoice ); // Puts the button at the edge of the text box widget - itemChoice->SetRelativeFrame( 0 , 4, defaultFrame.Width()-16, defaultFrame.Height() ); + itemChoice->SetRelativeFrame( 0 , 4, defaultFrame.Width()-23, defaultFrame.Height() ); ok = ok && itemChoice->PostSetup(); itemChoice->SetText(text); @@ -99,7 +115,7 @@ // Create the drop down list box /////////////////////////////////////////////////////////////////////// listChoice = new pawsListBox; - AddChild( listChoice ); + AddChild( listChoice ); if (fliptotop) { @@ -112,8 +128,8 @@ listChoice->Hide(); listChoice->UseTitleRow( false ); - listChoice->SetID( id ); - listChoice->SetBackground("Standard Background"); + listChoice->SetBackground("Scaling Widget Background"); + listChoice->SetID( id ); listChoice->SetBackgroundAlpha(listalpha); listChoice->UseBorder("line"); listChoice->SetAlwaysOnTop(true); @@ -158,8 +174,8 @@ { if ( closed ) { - arrow->SetUpImage( "Up Arrow" ); - arrow->SetDownImage( "Up Arrow" ); + arrow->SetUpImage(upButton); + arrow->SetDownImage(upButtonPressed); oldHeight = ScreenFrame().Height(); oldWidth = ScreenFrame().Width(); SetSize( ScreenFrame().Width(), defaultFrame.Height()+rows*GetActualHeight(rowHeight)+15 ); @@ -175,8 +191,8 @@ } else { - arrow->SetUpImage( "Down Arrow" ); - arrow->SetDownImage( "Down Arrow" ); + arrow->SetUpImage(downButton); + arrow->SetDownImage(downButtonPressed); SetSize( oldWidth, oldHeight ); if (fliptotop) { @@ -211,8 +227,8 @@ if (!closed) { - arrow->SetUpImage( "Down Arrow" ); - arrow->SetDownImage( "Down Arrow" ); + arrow->SetUpImage(downButton); + arrow->SetDownImage(downButtonPressed); SetSize( oldWidth, oldHeight ); if (fliptotop) { @@ -245,8 +261,8 @@ if (!closed) { - arrow->SetUpImage( "Down Arrow" ); - arrow->SetDownImage( "Down Arrow" ); + arrow->SetUpImage("New Down Arrow"); + arrow->SetDownImage("New Down Arrow"); SetSize( oldWidth, oldHeight ); if (fliptotop) { Modified: trunk/src/common/paws/pawscombo.h =================================================================== --- trunk/src/common/paws/pawscombo.h 2009-07-11 23:20:58 UTC (rev 3982) +++ trunk/src/common/paws/pawscombo.h 2009-07-12 03:40:51 UTC (rev 3983) @@ -90,7 +90,7 @@ int rowHeight; int listalpha; - csString text; + csString text, upButton, upButtonPressed, downButton, downButtonPressed; }; CREATE_PAWS_FACTORY ( pawsComboBox ); Modified: trunk/src/common/util/log.cpp =================================================================== --- trunk/src/common/util/log.cpp 2009-07-11 23:20:58 UTC (rev 3982) +++ trunk/src/common/util/log.cpp 2009-07-12 03:40:51 UTC (rev 3983) @@ -148,12 +148,11 @@ csString msgid; if(con < CON_WARNING && con > CON_CMDOUTPUT) { - msgid.Format("<%s:%d %s SEVERE>\n", - file, line, function); + msgid.Format("<%s:%d %s SEVERE>\n",file, line, function); } else - msgid.Format("<%s:%d %s>\n", - file, line, function); + msgid = ""; // File, Line, Function is too much spam on the console for debug output + //msgid.Format("<%s:%d %s>\n", file, line, function); csString description; va_start(arg, msg); Modified: trunk/src/common/util/pscssetup.cpp =================================================================== --- trunk/src/common/util/pscssetup.cpp 2009-07-11 23:20:58 UTC (rev 3982) +++ trunk/src/common/util/pscssetup.cpp 2009-07-12 03:40:51 UTC (rev 3983) @@ -217,8 +217,8 @@ csRef<iGraphics3D> g3d2 = csQueryRegistry<iGraphics3D> (object_reg); iNativeWindow *nw2 = g3d2->GetDriver2D()->GetNativeWindow(); - if (nw2) - nw2->SetIcon(ifile); + //if (nw2) + // nw2->SetIcon(ifile); // tweak reporter plugin to report everything... // is there a command line switch or something to do this which I've missed? This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |