Pre-resize fillparent
This commit is contained in:
@@ -8,7 +8,7 @@ using UtilityEngine::cUtility;
|
||||
|
||||
/*static*/ cInput* cInput::sp_inst = nullptr;
|
||||
|
||||
//Private
|
||||
/// private
|
||||
cInput::cInput()
|
||||
{}
|
||||
|
||||
@@ -17,7 +17,7 @@ cInput::~cInput()
|
||||
CleanUp();
|
||||
}
|
||||
|
||||
//Public
|
||||
/// public
|
||||
/*static*/ cInput& cInput::Inst()
|
||||
{
|
||||
if (sp_inst == nullptr)
|
||||
@@ -31,7 +31,7 @@ cInput::~cInput()
|
||||
sp_inst = nullptr;
|
||||
}
|
||||
|
||||
//Functions
|
||||
/// Functions
|
||||
const bool cInput::Initialize() const
|
||||
{
|
||||
bool rtn = IsInit();
|
||||
@@ -150,9 +150,9 @@ void cInput::RemoveAllInputs()
|
||||
RemoveAllKeyboards();
|
||||
}
|
||||
|
||||
///Sets
|
||||
/// Sets
|
||||
|
||||
///Gets
|
||||
/// Gets
|
||||
/* Gets return true if Input was initialized */
|
||||
const bool cInput::IsInit() const
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace InputEngine {
|
||||
static cInput& Inst();
|
||||
static void Delete();
|
||||
|
||||
//Functions
|
||||
/// Functions
|
||||
const bool Initialize() const;
|
||||
|
||||
const bool Setup();
|
||||
@@ -54,9 +54,9 @@ namespace InputEngine {
|
||||
void DeleteAllInputs();
|
||||
void RemoveAllInputs();
|
||||
|
||||
///Sets
|
||||
/// Sets
|
||||
|
||||
///Gets
|
||||
/// Gets
|
||||
/* Gets return true if Input was initialized */
|
||||
const bool IsInit() const;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace InputEngine {
|
||||
cJoystick();
|
||||
virtual ~cJoystick();
|
||||
|
||||
///Functions
|
||||
/// Functions
|
||||
virtual void OnEvent(const SDL_Event& event);
|
||||
|
||||
virtual void OnJoyAxis(SDL_JoystickID which, Uint8 axis, Sint16 value);
|
||||
@@ -30,7 +30,7 @@ namespace InputEngine {
|
||||
|
||||
virtual void OnJoyBall(SDL_JoystickID which, Uint8 ball, Sint16 xrel, Sint16 yrel);
|
||||
|
||||
//Used when looking for keys that have been add to the check list
|
||||
/// Used when looking for keys that have been add to the check list
|
||||
void JoystickCheck();
|
||||
|
||||
};/// END CLASS DEFINITION cJoystick
|
||||
|
||||
@@ -16,7 +16,7 @@ cKey::cKey( const cKey& copy )
|
||||
/*virtual*/ cKey::~cKey()
|
||||
{}
|
||||
|
||||
///Funtions
|
||||
/// Funtions
|
||||
/*virtual*/ void cKey::KeyPress()
|
||||
{}
|
||||
|
||||
@@ -26,13 +26,13 @@ cKey::cKey( const cKey& copy )
|
||||
/*virtual*/ void cKey::KeyDown()
|
||||
{}
|
||||
|
||||
///Sets
|
||||
/// Sets
|
||||
void cKey::setKey( const SDL_Keycode& key )
|
||||
{
|
||||
m_key = key;
|
||||
}
|
||||
|
||||
///Gets
|
||||
/// Gets
|
||||
const SDL_Keycode& cKey::getKey() const
|
||||
{
|
||||
return m_key;
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace InputEngine {
|
||||
cKey( const cKey& copy );
|
||||
virtual ~cKey();
|
||||
|
||||
///Funtions
|
||||
/// Funtions
|
||||
/* Call to check if the key is pressed */
|
||||
virtual void KeyPress();
|
||||
/* Call to check if the key is released */
|
||||
@@ -23,10 +23,10 @@ namespace InputEngine {
|
||||
/* Call to check if the key is pressed */
|
||||
virtual void KeyDown();
|
||||
|
||||
///Sets
|
||||
/// Sets
|
||||
void setKey( const SDL_Keycode& key );
|
||||
|
||||
///Gets
|
||||
/// Gets
|
||||
const SDL_Keycode& getKey() const;
|
||||
|
||||
private:
|
||||
|
||||
@@ -15,7 +15,7 @@ cKeyboard::cKeyboard( const cKeyboard& copy )
|
||||
DeleteAllKeys();
|
||||
}
|
||||
|
||||
///Functions
|
||||
/// Functions
|
||||
/*virtual*/ void cKeyboard::KeyboardCheck( const SDL_Event& event )
|
||||
{
|
||||
SDL_Keycode key = event.key.keysym.sym;
|
||||
@@ -65,7 +65,8 @@ void cKeyboard::DeleteAllKeys()
|
||||
m_keys.clear();
|
||||
}
|
||||
|
||||
///Sets
|
||||
/// Sets
|
||||
/// Gets
|
||||
const cString& cKeyboard::getLabel() const
|
||||
{
|
||||
return m_label;
|
||||
|
||||
@@ -32,9 +32,9 @@ namespace InputEngine {
|
||||
cKeyboard( const cKeyboard& copy );
|
||||
virtual ~cKeyboard();
|
||||
|
||||
///Funtions
|
||||
/// Functions
|
||||
|
||||
//Used when looking for keys that have been add to the check list
|
||||
/// Used when looking for keys that have been add to the check list
|
||||
virtual void KeyboardCheck( const SDL_Event& event );
|
||||
|
||||
void AddKey( InputEngine::cKey* key );
|
||||
@@ -42,12 +42,12 @@ namespace InputEngine {
|
||||
|
||||
void DeleteAllKeys();
|
||||
|
||||
///Sets
|
||||
///Gets
|
||||
/// Sets
|
||||
/// Gets
|
||||
const cString& getLabel() const;
|
||||
|
||||
private:
|
||||
cString m_label;// = ""
|
||||
cString m_label;/// = ""
|
||||
|
||||
std::vector<InputEngine::cKey*> m_keys;
|
||||
};/// END CLASS DEFINITION cKeyboard
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
using InputEngine::cTextInput;
|
||||
|
||||
cTextInput::cTextInput()
|
||||
: cKeyboard("TextInput"), m_text(""), m_caps(false), m_shift(false), INTERNATIONAL_MASK(0xFF80), UNICODE_MASK(0x7F)
|
||||
: cKeyboard("TextInput"), m_text(""), m_caps(false), m_shift(false), INTERNATIONAL_MASK(0xFF80), UNICODE_MASK(0x7F)
|
||||
{
|
||||
/*if (SDL_EnableUNICODE(SDL_QUERY) != SDL_ENABLE) {
|
||||
SDL_EnableUNICODE(SDL_ENABLE);
|
||||
@@ -21,7 +21,7 @@ cTextInput::cTextInput( const cTextInput& copy )
|
||||
/*virtual*/ cTextInput::~cTextInput()
|
||||
{}
|
||||
|
||||
///Functions
|
||||
/// Functions
|
||||
/* */
|
||||
/*virtual*/ void cTextInput::KeyboardCheck( const SDL_Event& event )
|
||||
{
|
||||
@@ -49,19 +49,19 @@ void cTextInput::ClearText()
|
||||
m_text = "";
|
||||
}
|
||||
|
||||
///Sets
|
||||
/// Sets
|
||||
void cTextInput::setText( const cString& text )
|
||||
{
|
||||
m_text = text;
|
||||
}
|
||||
|
||||
///Gets
|
||||
/// Gets
|
||||
const cString& cTextInput::getText() const
|
||||
{
|
||||
return m_text;
|
||||
}
|
||||
|
||||
//Private
|
||||
/// private
|
||||
const char cTextInput::UnicodeValue( const SDL_Event& event )
|
||||
{
|
||||
event;
|
||||
|
||||
@@ -24,27 +24,27 @@ namespace InputEngine {
|
||||
cTextInput( const cTextInput& copy );
|
||||
virtual ~cTextInput();
|
||||
|
||||
///Functions
|
||||
/// Functions
|
||||
/* */
|
||||
virtual void KeyboardCheck( const SDL_Event& event );
|
||||
/* Clears out the Text */
|
||||
void ClearText();
|
||||
///Sets
|
||||
/// Sets
|
||||
void setText( const cString& text );
|
||||
///Gets
|
||||
/// Gets
|
||||
const cString& getText() const;
|
||||
|
||||
private:
|
||||
const char UnicodeValue( const SDL_Event& event );
|
||||
|
||||
private:
|
||||
cString m_text;// = ""
|
||||
bool m_caps;// = false
|
||||
bool m_shift;// = false
|
||||
cString m_text;/// = ""
|
||||
bool m_caps;/// = false
|
||||
bool m_shift;/// = false
|
||||
|
||||
// magic numbers courtesy of SDL docs
|
||||
const unsigned long int INTERNATIONAL_MASK;// = 0xFF80
|
||||
const unsigned long int UNICODE_MASK;// = 0x7F
|
||||
/// magic numbers courtesy of SDL docs
|
||||
const unsigned long int INTERNATIONAL_MASK;/// = 0xFF80
|
||||
const unsigned long int UNICODE_MASK;/// = 0x7F
|
||||
};/// END CLASS DEFINITION cTextInput
|
||||
}/// END NAMESPACE DEFINITION InputEngine
|
||||
#endif/// END IFNDEF _CTEXTINPUT_HPP_
|
||||
|
||||
Reference in New Issue
Block a user