20 #ifndef PAWS_PETITION_WINDOW_GM_HEADER 21 #define PAWS_PETITION_WINDOW_GM_HEADER 42 #define MAX_GMPETITION_LENGTH (65) 90 void SetText(
size_t rowNum,
int colNum,
const char* fmt, ...);
Window contains a manageable list of petitions.
psPetitionMessage petitionMessage
Holds the most recent petition message from the server.
int currentRow
Holds the current row number (for cancellation)
void QueryServer()
Queries the server for a list of petitions.
pawsMessageTextBox * petText
Displays text of petition.
void Show()
handles the request of petitions and checks if the user is allowed to use this window ...
const char * HandleCommand(const char *cmd)
Handles commands.
bool hasPetInterest
this is set to true the first time a player looks at this petition window this allows for most player...
psPetitionInfo selectedPet
keep track of the selected petition so that we can select it after receiving a new petition list ...
The structure of 1 queue entry (pointer to a message)
void OnListAction(pawsListBox *selected, int status)
Called whenever an item in a child list box is selected.
Messages sent to user with petition information.
Contains data for one petition.
void CloseCurrPetition(const char *desc)
Send network message to close a petition with explanation.
pawsPetitionGMWindow()
Constructor.
A simple list box widget.
void OnStringEntered(const char *name, int param, const char *value)
Handle popup question window callback.
void AddPetitions(csArray< psPetitionInfo > &petitions)
Function to add the petitions to the listbox given a csArray;.
This is a special type of text box that is used for messages.
This interface defines the callback used by pawsStringPromptWindow to notify another window of a supp...
bool OnButtonReleased(int mouseButton, int keyModifier, pawsWidget *reporter)
Handle button clicks.
int petCount
count the number of actual petitions
virtual ~pawsPetitionGMWindow()
Virtual destructor.
void SetText(size_t rowNum, int colNum, const char *fmt,...)
Quicker way to set text for each column in the listbox:
void HandleMessage(MsgEntry *message)
Handles petition server messages.
bool PostSetup()
Setup the widget with command/message handling capabilities.
pawsListBox * petitionList
List widget of petitions for easy access.
CREATE_PAWS_FACTORY(pawsPetitionGMWindow)
The pawsPetitionGMWindow factory.