All pastes #936614 Raw Edit

Someone

public cpp v1 · immutable
·published 2008-03-10 15:07 UTC
rendered paste body
void pawsBookReadingWindow::HandleMessage( MsgEntry* me ){       switch ( me->GetType() )    {        case MSGTYPE_READ_BOOK:        {            Show();            psReadBookTextMessage mesg( me );            description->SetText( mesg.text );                 name->SetText( mesg.name );                   slotID = mesg.slotID;            containerID = mesg.containerID;            if( writeButton ){               if( mesg.canWrite ) writeButton->Show();               else writeButton->Hide();            }			if( saveButton ){			   if( mesg.canWrite ) saveButton->Show();			   else saveButton->Hide();			}               break;        }        case MSGTYPE_CRAFT_INFO:        {            Show();            writeButton->Hide();			saveButton->Hide();			description->Hide();            psMsgCraftingInfo mesg(me);            csString text(mesg.craftInfo);            if (text)                descriptionCraft->SetText(text.GetData());            name->SetText( "You discover you can do the following:" );			break;        }    }}