00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 | //============================================================================= // Spatial Fear // Class: SFCommYesNo // Descritption: A client widow, that brings up a Yes/No selection box used, // by HUD communication windows, to branch inside a // conversation. // // Author: Markus Nuebel //============================================================================= class SFCommYesNo expands UWindowDialogClientWindow; var UWindowMessageBox m_wndQuestionBox; var SFHUD m_oHUD; // Brings up the window function ShowWindow() { // Call to base class Super.ShowWindow(); // Create the question box m_wndQuestionBox = MessageBox("Your choice?", "What do you think?", MB_YesNo, MR_No, MR_Yes); m_wndQuestionBox.bLeaveOnscreen = true; } // Handles the message box selection function MessageBoxDone(UWindowMessageBox W, MessageBoxResult Result) { if ((W == m_wndQuestionBox) && (Result == MR_Yes)) { // Select the yes branch m_oHUD.ResumeComm(true); Close(); } if ((W == m_wndQuestionBox) && (Result == MR_No)) { // Select the no branch m_oHUD.ResumeComm(false); Close(); } } defaultproperties { } |