| CBData provides a class that can be used to house data that needs to
be Globally accessible. |
| |
| For each Edit Field in the GUI, Developers should call CBData::AddEditFieldData()
with the ID of the Edit Field. |
| ChatBlade shall keep track the Chat History and default Slash Command
for each Edit field via the related CBEditFieldData
instance that CBData::AddEditFieldData()
creates. |
| The CBEditFieldData instance is
stored in the Map CBData::mEditFieldDataMap, and an individual instance
can be accessed by providing the ID of the Edit Field as the key, like
so: CBData::mEditFieldDataMap[nEditFieldID]. |
| |
| For each Text Window or Tab in the GUI, Developers should call
CBData::AddTextWindowData() with the ID
of the Text Window or Tab. |
| ChatBlade shall keep track the Chat Messages and Chat Channels to
Monitor for each Text Window/Tab via the related CBTextWindowData
instance that CBData::AddTextWindowData()
creates. |
| The CBTextWindowData instance is
stored in the Map CBData::mTextWindowDataMap,
and an individual instance can be accessed by providing the ID of the
Text Window/Tab as the key, like so: CBData::mTextWindowDataMap[nTextWindowID]. |
| Typically after creating a CBTextWindowData
instance via CBData::AddTextWindowData(),
Developers should immediately add in what Chat Channels the related Text
Window should initially monitor. This can be done like so: |
| CBData::mTextWindowDataMap[nTextWindowID].AddAllChannelIDs()
or |
| CBData::mTextWindowDataMap[nTextWindowID].AddChannelID(CB_CHANNEL_GROUP)
or |
| via other AddChannelXXX() functions from CBTextWindowData. |
| |
| The CBTextWindowData instances
contained in CBData::mTextWindowDataMap
are where ChatBlade stores all the Games Chat Messages. When a new
Chat Message is added to one of these instances, ChatBlade shall call CBClientImplementation::OnMessageAddedToTextWindow()
with the ID of the Chat Window that the message was added to. CBClientImplementation::OnMessageAddedToTextWindow()
should then call the Text Window and inform it that it should redraw its
contents. |
| The Contents of the Text Window are contained in the CBTextWindowData
instance referred to by CBData::mTextWindowDataMap[nTextWindowID]. |
| To access the text of last Chat Message added, the Code may look
something like: |
| nMessageDequeSize = CBData::mTextWindowDataMap[nTextWindowID].dqMessageArray.size(); |
| CBData::mTextWindowDataMap[nTextWindowID].dqMessageArray[nMessageDequeSize-1].GetChatString(sTempString); |
| This would fill sTempString (a CBSTRING
instance) with the Text contained in the last Chat Message added to this
Text Window. |
| See the ChatBlade Sample GUI Test Application (CBMFCTestClient) for more complete sample
code of how to access the Chat Messages a Text Window should
display. |
| |
| If a User modifies their Game UI and removes Chat Windows or Chat Tabs
then the game should invoke CBData::RemoveTextWindowData()
and CBData::RemoveEditFieldData() as
appropriate. |
| |
| CBData contains a list of all Characters that have given this Player a
/tell this session. It is contained in CBData::vTellerNamesSet.
ChatBlade does not make use of this information, but it is provided to
the Game Developers in case they want to make a GUI drop down list of
all Characters the Player can /reply to. |
| |
| CBData contains a helper Map of all the Slash Command function
pointers as indexed by the UPPERCASE function name in CBData::mCommandFunctionPointerMap.
Developers may want to use this Map when implementing CBClientImplementation::LoadSlashCommands(). |
| |
| ChatBlade automatically takes care of most /AFK and /DND (Do Not
Disturb) functionality. |
| |
| |