Some minor UI fixes.

Modal windows now disable all the background controls to avoid being selected
when navigating with TAB.
This commit is contained in:
Martín Lucas Golini
2013-10-02 23:53:29 -03:00
parent d3ea9a391a
commit 309ee5b86c
7 changed files with 59 additions and 5 deletions

View File

@@ -239,6 +239,7 @@ class EE_API cUIControl {
protected:
typedef std::map< Uint32, std::map<Uint32, UIEventCallback> > UIEventsMap;
friend class cUIManager;
friend class cUIWindow;
eeVector2i mPos;
eeVector2i mScreenPos;

View File

@@ -109,7 +109,7 @@ class EE_API cUITheme : protected tResourceManager<cUISkin> {
virtual cUIRadioButton * CreateRadioButton( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS );
virtual cUITextBox * CreateTextBox( const String& Text = "", cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS );
virtual cUITextBox * CreateTextBox( const String& Text = "", cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE );
virtual cUITextEdit * CreateTextEdit( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_PADDING | UI_CLIP_ENABLE | UI_AUTO_SIZE, UI_SCROLLBAR_MODE HScrollBar = UI_SCROLLBAR_AUTO, UI_SCROLLBAR_MODE VScrollBar = UI_SCROLLBAR_AUTO, bool WordWrap = true );

View File

@@ -74,6 +74,8 @@ class EE_API cUIWindow : public cUIComplexControl {
virtual void CloseWindow();
virtual void Close();
void BaseAlpha( const Uint8& Alpha );
const Uint8& BaseAlpha() const;
@@ -206,6 +208,10 @@ class EE_API cUIWindow : public cUIComplexControl {
KeyboardShortcuts::iterator ExistsShortcut( const Uint32& KeyCode, const Uint32& Mod );
void CreateModalControl();
void EnableByModal();
void DisableByModal();
};
}}

View File

@@ -19,6 +19,7 @@ enum UI_CONTROL_FLAGS_VALUES {
UI_CTRL_FLAG_COMPLEX = (1<<10),
UI_CTRL_FLAG_SKIN_OWNER = (1<<11),
UI_CTRL_FLAG_TOUCH_DRAGGING = (1<<12),
UI_CTRL_FLAG_DISABLED_BY_MODAL_WINDOW = (1<<13),
UI_CTRL_FLAG_FREE_USE = (1<<31)
};