[Gcblue-commits] gcb_wx/src/graphics tc3DWindow.cpp,1.19,1.20 tcAltitudeBarControl.cpp,1.1,1.2 tcEdi
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2005-04-17 22:35:40
|
Update of /cvsroot/gcblue/gcb_wx/src/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14954/src/graphics Modified Files: tc3DWindow.cpp tcAltitudeBarControl.cpp tcEditBox.cpp tcNetworkView.cpp tcRadioButton.cpp Log Message: fixed problem writing to account database, added command state update as part of create update for new objects at client, removed application-level command ack Index: tcRadioButton.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcRadioButton.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcRadioButton.cpp 2 Nov 2004 04:23:56 -0000 1.8 --- tcRadioButton.cpp 17 Apr 2005 22:35:31 -0000 1.9 *************** *** 67,71 **** */ backgroundColor.set(0.5f, 0.5f, 0.5f, 0.5f); ! textColor.set(0, 0, 0, 1); float width = float(mnWidth); --- 67,71 ---- */ backgroundColor.set(0.5f, 0.5f, 0.5f, 0.5f); ! textColor.set(1, 1, 1, 1); float width = float(mnWidth); Index: tcNetworkView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcNetworkView.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcNetworkView.cpp 16 Apr 2005 20:44:42 -0000 1.7 --- tcNetworkView.cpp 17 Apr 2005 22:35:31 -0000 1.8 *************** *** 311,314 **** --- 311,319 ---- usernameEdit->SetCommand(3); usernameEdit->SetClearOnReturn(false); + if (!tcOptions::Get()->OptionStringExists("UserName")) + { + tcOptions::Get()->SetOptionString("UserName", "observer"); + } + usernameEdit->SetBuffer(tcOptions::Get()->GetOptionString("UserName")); // add password edit box *************** *** 317,320 **** --- 322,326 ---- passwordEdit->SetCommand(4); passwordEdit->SetClearOnReturn(false); + usernameEdit->SetBuffer(""); if (!tcOptions::Get()->OptionStringExists("HostAddress")) *************** *** 356,360 **** chatEntry->SetCommand(2); chatEntry->SetClearOnReturn(true); ! chatEntry->SetBuffer("Enter chat text here"); } --- 362,366 ---- chatEntry->SetCommand(2); chatEntry->SetClearOnReturn(true); ! chatEntry->SetBuffer(""); } Index: tcAltitudeBarControl.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcAltitudeBarControl.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcAltitudeBarControl.cpp 23 Nov 2004 23:30:57 -0000 1.1 --- tcAltitudeBarControl.cpp 17 Apr 2005 22:35:31 -0000 1.2 *************** *** 153,162 **** { if (commandValue < 3) commandValue = 3; ! air->mcGS.SetAltitude(commandValue); } else if (tcSubObject* sub = dynamic_cast<tcSubObject*>(obj)) { if (commandValue > 0) commandValue = 0; ! sub->mcGS.SetAltitude(commandValue); } } --- 153,162 ---- { if (commandValue < 3) commandValue = 3; ! air->SetAltitude(commandValue); } else if (tcSubObject* sub = dynamic_cast<tcSubObject*>(obj)) { if (commandValue > 0) commandValue = 0; ! sub->SetAltitude(commandValue); } } Index: tc3DWindow.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tc3DWindow.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** tc3DWindow.cpp 16 Apr 2005 20:44:42 -0000 1.19 --- tc3DWindow.cpp 17 Apr 2005 22:35:31 -0000 1.20 *************** *** 2050,2057 **** --- 2050,2059 ---- { #ifdef _DEBUG + /* fprintf(stdout, "Destroying 3D window %s, %d text obj, %d image quad obj" ", line obj %d, rect obj %d, transform %d\n", wxWindow::GetName().c_str(), textPool.size(), imageQuadPool.size(), linePool.size(), rectPool.size(), transformPool.size()); + */ #endif if (hostParent) Index: tcEditBox.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcEditBox.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tcEditBox.cpp 16 Apr 2005 20:44:42 -0000 1.10 --- tcEditBox.cpp 17 Apr 2005 22:35:31 -0000 1.11 *************** *** 72,77 **** // draw text ! DrawTextInRect(mzBuffer, mrectTextBar, defaultFont.get(), osg::Vec4(0, 0, 0, 1), fontSize, LEFT_BASE_LINE); // draw caption --- 72,81 ---- // draw text ! char* drawText = (starText == true) ? mzBufferHide : mzBuffer; ! ! ! DrawTextInRect(drawText, mrectTextBar, defaultFont.get(), osg::Vec4(0, 0, 0, 1), fontSize, LEFT_BASE_LINE); + // draw caption *************** *** 81,85 **** // draw cursor wxSize size; ! MeasureText(defaultFont.get(), fontSize, mzBuffer, size); osg::Vec4 cursorColor(0, 0, 0, 1); --- 85,89 ---- // draw cursor wxSize size; ! MeasureText(defaultFont.get(), fontSize, drawText, size); osg::Vec4 cursorColor(0, 0, 0, 1); *************** *** 113,117 **** int nLength = (int)strlen(mzBuffer); ! if (keycode == WXK_RETURN) { if (textChanged) --- 117,121 ---- int nLength = (int)strlen(mzBuffer); ! if ((keycode == WXK_RETURN) || (keycode == WXK_TAB)) { if (textChanged) *************** *** 125,129 **** if (clearOnReturn) { ! strcpy(mzBuffer,""); } } --- 129,134 ---- if (clearOnReturn) { ! strcpy(mzBuffer, ""); ! strcpy(mzBufferHide, ""); } } *************** *** 133,136 **** --- 138,142 ---- if (nLength == 0) return; mzBuffer[--nLength] = 0; + mzBufferHide[nLength] = 0; textChanged = true; } *************** *** 153,157 **** --- 159,165 ---- mzBuffer[nLength] = (char)keycode; + mzBufferHide[nLength] = '*'; mzBuffer[++nLength] = 0; + mzBufferHide[nLength] = 0; textChanged = true; } *************** *** 201,205 **** --- 209,220 ---- { strncpy(mzBuffer,azBuffer,MAX_EDITBOX_CHAR-1); + + for (size_t n=0; (n<strlen(azBuffer)) && (n<MAX_EDITBOX_CHAR-1); n++) + { + mzBufferHide[n] = '*'; + } + mzBuffer[MAX_EDITBOX_CHAR-1] = 0; + mzBufferHide[MAX_EDITBOX_CHAR-1] = 0; textChanged = true; } *************** *** 218,227 **** drawBackground(true), clearOnReturn(false), ! command(0) { ref_count++; ! strcpy(mzBuffer,"Default string"); strcpy(mzCaption,"Default caption"); mrectTextBar.left = 5.0f; --- 233,244 ---- drawBackground(true), clearOnReturn(false), ! command(0), ! starText(false) { ref_count++; ! strcpy(mzBuffer, ""); ! strcpy(mzBufferHide, ""); strcpy(mzCaption,"Default caption"); mrectTextBar.left = 5.0f; *************** *** 282,285 **** --- 299,306 ---- current->Attribute("FontSize", &xmlFontSize); if (xmlFontSize > 0) fontSize = xmlFontSize; + + int passwordMode = 0; + current->Attribute("PasswordMode", &passwordMode); + if (passwordMode != 0) starText = true; } |