Difference between revisions of "MainWindow (Chili Framework)"
(→mouse) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
<code>const std::wstring& MainWindow::GetArgs() const</code><br /> | <code>const std::wstring& MainWindow::GetArgs() const</code><br /> | ||
− | + | This [[function]] the command line arguments used to invoke the executable. This way you can tell if the user is insulting you via the prompt. <code>C:\steve's files\lemonparty>mygame.exe your mother is a whore</code> | |
=== IsActive === | === IsActive === | ||
Line 38: | Line 38: | ||
<code>Keyboard MainWindow::kbd</code><br /> | <code>Keyboard MainWindow::kbd</code><br /> | ||
− | The <code>Keyboard</code> object is embedded in <code>MainWindow</code>. | + | The <code>[[Keyboard (Chili Framework)|Keyboard]]</code> object is embedded in <code>MainWindow</code>. |
==== mouse ==== | ==== mouse ==== | ||
<code>Mouse MainWindow::mouse</code><br /> | <code>Mouse MainWindow::mouse</code><br /> | ||
− | The <code>Mouse</code> object is embedded in <code>MainWindow</code>. | + | The <code>[[Mouse (Chili Framework)|Mouse]]</code> object is embedded in <code>MainWindow</code>. |
== See also == | == See also == | ||
* The [[Chili Framework]] | * The [[Chili Framework]] |
Latest revision as of 18:55, 15 May 2017
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
This function 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