From: Keith F. <ven...@us...> - 2007-03-18 12:53:58
|
Update of /cvsroot/planeshift/planeshift/src/client/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30869/src/client/gui Modified Files: psmainwidget.cpp psmainwidget.h Log Message: - Added support for period-separated trigger groups all in one string in trigger text. Now "hello. gates. jobs. scully" makes all four triggers equivalent. "hello" ends up being the trigger of record, and the others are a dynamically created trigger_group under that. - Refactored and corrected Split() function for this parsing, which affected a couple other files. Index: psmainwidget.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/client/gui/psmainwidget.cpp,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** psmainwidget.cpp 9 Feb 2007 21:50:24 -0000 1.74 --- psmainwidget.cpp 18 Mar 2007 06:35:37 -0000 1.75 *************** *** 58,62 **** ////////////////////////////////////////////////////////////////////// ! psEntityType::psEntityType(csString id, csString label, int dflt, csString commandsStr, csString labelsStr) { this->id = id; --- 58,62 ---- ////////////////////////////////////////////////////////////////////// ! psEntityType::psEntityType(const char *id, const char *label, int dflt, const char *commandsStr, const char *labelsStr) { this->id = id; *************** *** 64,69 **** this->dflt = dflt; usedCommand = dflt; ! Split(labelsStr, this->labels); ! Split(commandsStr, this->commands); } --- 64,73 ---- this->dflt = dflt; usedCommand = dflt; ! ! psString pslabelsStr(labelsStr); ! psString pscommandsStr(commandsStr); ! ! pslabelsStr.Split(this->labels); ! pscommandsStr.Split(this->commands); } Index: psmainwidget.h =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/client/gui/psmainwidget.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** psmainwidget.h 8 Jul 2006 09:48:28 -0000 1.21 --- psmainwidget.h 18 Mar 2007 06:35:37 -0000 1.22 *************** *** 41,51 **** { public: ! psEntityType(csString id, csString label, int dflt, csString commandsStr, csString labelsStr); csString id; csString label; int usedCommand, dflt; ! csArray<csString> labels; ! csArray<csString> commands; }; --- 41,51 ---- { public: ! psEntityType(const char *id,const char *label, int dflt, const char *commandsStr, const char *labelsStr); csString id; csString label; int usedCommand, dflt; ! csStringArray labels; ! csStringArray commands; }; |