added ZEngine::MButtonPressed for middle button
This commit is contained in:
parent
0a8c6c0e44
commit
94faaebcb6
@ -1,5 +1,5 @@
|
|||||||
ZEngine Version Log for Version 0.8.5
|
ZEngine Version Log for Version 0.8.5
|
||||||
$Id: changelog.txt,v 1.50 2003/09/24 05:11:32 cozman Exp $
|
$Id: changelog.txt,v 1.51 2003/10/03 21:54:42 cozman Exp $
|
||||||
|
|
||||||
Changes are marked with symbols that describe them:
|
Changes are marked with symbols that describe them:
|
||||||
! is code that breaks backwards compatibility (used after 0.8.0-rc1, previous versions broke compatibility)
|
! is code that breaks backwards compatibility (used after 0.8.0-rc1, previous versions broke compatibility)
|
||||||
@ -13,6 +13,7 @@ Changes are marked with symbols that describe them:
|
|||||||
0.8.5
|
0.8.5
|
||||||
+ OpenFromZip code added for ZImage,ZFont and ZSound.
|
+ OpenFromZip code added for ZImage,ZFont and ZSound.
|
||||||
+ Zlib/Unzip code added directly into ZEngine.
|
+ Zlib/Unzip code added directly into ZEngine.
|
||||||
|
+ ZEngine::MButtonPressed added in addition to L & R button.
|
||||||
+ ZRect overload for ZEngine::MouseInRect.
|
+ ZRect overload for ZEngine::MouseInRect.
|
||||||
+ ZE_main as new entrypoint instead of main, ZE_main entrypoint allows ZEngine to initialize PhysFS and release itself.
|
+ ZE_main as new entrypoint instead of main, ZE_main entrypoint allows ZEngine to initialize PhysFS and release itself.
|
||||||
+ New Draw,DrawRotated, and DrawClipped overloads with vertex coloring parameter for advanced needs.
|
+ New Draw,DrawRotated, and DrawClipped overloads with vertex coloring parameter for advanced needs.
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
\brief Definition file for core ZEngine class.
|
\brief Definition file for core ZEngine class.
|
||||||
|
|
||||||
ZEngine Game Engine core Engine definition.
|
ZEngine Game Engine core Engine definition.
|
||||||
<br>$Id: ZE_ZEngine.h,v 1.50 2003/09/24 01:49:52 cozman Exp $<br>
|
<br>$Id: ZE_ZEngine.h,v 1.51 2003/10/03 21:54:42 cozman Exp $<br>
|
||||||
\author James Turk
|
\author James Turk
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -139,10 +139,9 @@ class ZEngine
|
|||||||
static ZEngine* GetInstance();
|
static ZEngine* GetInstance();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Release Instance (obsolete as of 0.8.5).
|
\brief Release Instance.
|
||||||
|
|
||||||
Release memory held by instance of engine and closes window.
|
Release memory held by instance of engine and closes window.
|
||||||
If you are using ZE_main (new in 0.8.5) this needs not ever be called.
|
|
||||||
**/
|
**/
|
||||||
static void ReleaseInstance();
|
static void ReleaseInstance();
|
||||||
|
|
||||||
@ -394,6 +393,8 @@ class ZEngine
|
|||||||
\brief Find the state of a key.
|
\brief Find the state of a key.
|
||||||
|
|
||||||
Function returns true/false based on if key is currently pressed or not.
|
Function returns true/false based on if key is currently pressed or not.
|
||||||
|
This is used when using keys as buttons, and you need to check if the button/key
|
||||||
|
is currently pressed (ex. arrow keys).
|
||||||
\param key Code of key to find status of.
|
\param key Code of key to find status of.
|
||||||
\return State of requested key.
|
\return State of requested key.
|
||||||
**/
|
**/
|
||||||
@ -403,6 +404,8 @@ class ZEngine
|
|||||||
\brief Find if key has been pressed since last check.
|
\brief Find if key has been pressed since last check.
|
||||||
|
|
||||||
Function returns true/false based on if key has been pressed since last check.
|
Function returns true/false based on if key has been pressed since last check.
|
||||||
|
This is what is good to use if you are trying to get user input where a key is only
|
||||||
|
counted once per press. (ex. typing in a name for a high scores list)
|
||||||
\param key Code of key to find status of.
|
\param key Code of key to find status of.
|
||||||
\return State of requested key.
|
\return State of requested key.
|
||||||
**/
|
**/
|
||||||
@ -454,6 +457,15 @@ class ZEngine
|
|||||||
**/
|
**/
|
||||||
bool RButtonPressed();
|
bool RButtonPressed();
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\brief Get status of Middle Button.
|
||||||
|
|
||||||
|
Get pressed status of middle button if available.
|
||||||
|
\return true if middle button is pressed, false if it is not or if it does not exist.
|
||||||
|
\since 0.8.5
|
||||||
|
**/
|
||||||
|
bool MButtonPressed();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Check if mouse is in given rectangle.
|
\brief Check if mouse is in given rectangle.
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
\brief Central source file for ZEngine.
|
\brief Central source file for ZEngine.
|
||||||
|
|
||||||
Actual implementation of ZEngine singleton class, the core of ZEngine.
|
Actual implementation of ZEngine singleton class, the core of ZEngine.
|
||||||
<br>$Id: ZE_ZEngine.cpp,v 1.59 2003/09/24 02:03:18 cozman Exp $<br>
|
<br>$Id: ZE_ZEngine.cpp,v 1.60 2003/10/03 21:54:42 cozman Exp $<br>
|
||||||
\author James Turk
|
\author James Turk
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -488,6 +488,11 @@ bool ZEngine::RButtonPressed()
|
|||||||
return (mMouseB & SDL_BUTTON_RMASK) > 0;
|
return (mMouseB & SDL_BUTTON_RMASK) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ZEngine::MButtonPressed()
|
||||||
|
{
|
||||||
|
return (mMouseB & SDL_BUTTON_MMASK) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
bool ZEngine::MouseInRect(SDL_Rect *rect)
|
bool ZEngine::MouseInRect(SDL_Rect *rect)
|
||||||
{
|
{
|
||||||
//useful function, needed so much it made it in
|
//useful function, needed so much it made it in
|
||||||
|
Loading…
Reference in New Issue
Block a user