Refactored UITextInput.

--HG--
branch : dev
This commit is contained in:
Martí­n Lucas Golini
2017-03-03 00:34:49 -03:00
parent a9679c78ae
commit 0e77e5e41d
11 changed files with 35 additions and 77 deletions

View File

@@ -11,25 +11,6 @@ class EE_API UITextInput : public UITextBox {
public:
static UITextInput * New();
class CreateParams : public UITextBox::CreateParams {
public:
inline CreateParams() :
UITextBox::CreateParams(),
SupportFreeEditing( true ),
MaxLength( 1024*8 ),
PassInput( false )
{
}
inline ~CreateParams() {}
bool SupportFreeEditing;
Uint32 MaxLength;
bool PassInput;
};
UITextInput( const UITextInput::CreateParams& Params );
UITextInput();
virtual ~UITextInput();
@@ -48,7 +29,7 @@ class EE_API UITextInput : public UITextBox {
InputTextBuffer * getInputTextBuffer();
void setAllowEditing( const bool& allow );
UITextInput * setAllowEditing( const bool& allow );
const bool& getAllowEditing() const;
@@ -58,11 +39,11 @@ class EE_API UITextInput : public UITextBox {
virtual void shrinkText( const Uint32& MaxWidth );
void setMaxLength( Uint32 maxLength );
UITextInput * setMaxLength( Uint32 maxLength );
Uint32 getMaxLength();
void setFreeEditing( bool support );
UITextInput * setFreeEditing( bool support );
bool isFreeEditingEnabled();
protected:

View File

@@ -85,8 +85,6 @@ class EE_API UITheme : protected ResourceManager<UISkin> {
virtual UITextBox * createTextBox( const String& Text = "", UIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE );
virtual UITextInput * createTextInput( UIControl * Parent = NULL, const Sizei& Size = Sizei(), const Vector2i& Pos = Vector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_TEXT_SELECTION_ENABLED, bool SupportFreeEditing = true, Uint32 MaxLength = 1024*8 );
ColorA getTooltipFontColor() const;
void setTooltipFontColor(const ColorA & tooltipFontColor);