MainWindow (Chili Framework)
Takes care of creating the window and handling the window messages. The message handling involves piping the mouse and keyboard messages to their respective objects. In fact, MainWindow
has eaten Keyboard
and Mouse
alive, and now they live in its belly. So you need to go through MainWindow
to get your input done, à la wnd.mouse.Read()
. You can also use this class to figure out whether the main window is minimized or if it's out of focus, and you can kill the fat bastard with wnd.Kill()
.
Contents
Members
GetArgs
const std::wstring& MainWindow::GetArgs() const
Gets the command line arguments used to invoke the executable. This way you can tell if the user is insulting you via the prompt. C:\steve's files\lemonparty>mygame.exe your mother is a whore
IsActive
bool MainWindow::IsActive() const
Checks whether the game window is the active window (generally, the one with the input focus).
IsMinimized
bool MainWindow::IsMinimized() const
Checks whether the game window is in the minimized state. I can tell you what's not in a minimized state hur hur (it's my penis).
ShowMessageBox
void MainWindow::ShowMessageBox( const std::wstring& title,const std::wstring& message ) const
Because everybody loves popup windows. Try one with this message: "Now installing Ransom_Virus.exe..."
Kill
void MainWindow::Kill()
You're a funny guy, MainWindow
. That's why I'm going to kill you last.
Member Variables
kbd
Keyboard MainWindow::kbd
The Keyboard
object is embedded in MainWindow
.
mouse
Mouse MainWindow::mouse
The Mouse
object is embedded in MainWindow
.
See also
- The Chili Framework