diff --git a/include/eepp/ui/uilistbox.hpp b/include/eepp/ui/uilistbox.hpp index 7bf700b71..1de4e1e68 100644 --- a/include/eepp/ui/uilistbox.hpp +++ b/include/eepp/ui/uilistbox.hpp @@ -25,17 +25,17 @@ class EE_API UIListBox : public UIComplexControl { FontSelectedColor( 0, 0, 0, 255 ), TouchDragDeceleration( 0.01f ) { - UITheme * Theme = UIThemeManager::instance()->defaultTheme(); + UITheme * Theme = UIThemeManager::instance()->getDefaultTheme(); if ( NULL != Theme ) { - Font = Theme->font(); - FontColor = Theme->fontColor(); - FontOverColor = Theme->fontOverColor(); - FontSelectedColor = Theme->fontSelectedColor(); + Font = Theme->getFont(); + FontColor = Theme->getFontColor(); + FontOverColor = Theme->getFontOverColor(); + FontSelectedColor = Theme->getFontSelectedColor(); } if ( NULL == Font ) - Font = UIThemeManager::instance()->defaultFont(); + Font = UIThemeManager::instance()->getDefaultFont(); } inline ~CreateParams() {} diff --git a/include/eepp/ui/uimenu.hpp b/include/eepp/ui/uimenu.hpp index b98dbf428..e7c91be22 100644 --- a/include/eepp/ui/uimenu.hpp +++ b/include/eepp/ui/uimenu.hpp @@ -26,18 +26,18 @@ class EE_API UIMenu : public UIComplexControl { FontOverColor( 0, 0, 0, 255 ), FontSelectedColor( 0, 0, 0, 255 ) { - UITheme * Theme = UIThemeManager::instance()->defaultTheme(); + UITheme * Theme = UIThemeManager::instance()->getDefaultTheme(); if ( NULL != Theme ) { - Font = Theme->font(); - FontColor = Theme->fontColor(); - FontShadowColor = Theme->fontShadowColor(); - FontOverColor = Theme->fontOverColor(); - FontSelectedColor = Theme->fontSelectedColor(); + Font = Theme->getFont(); + FontColor = Theme->getFontColor(); + FontShadowColor = Theme->getFontShadowColor(); + FontOverColor = Theme->getFontOverColor(); + FontSelectedColor = Theme->getFontSelectedColor(); } if ( NULL == Font ) - Font = UIThemeManager::instance()->defaultFont(); + Font = UIThemeManager::instance()->getDefaultFont(); } inline ~CreateParams() {} @@ -55,7 +55,7 @@ class EE_API UIMenu : public UIComplexControl { }; - static void FixMenuPos( Vector2i& position, UIMenu * Menu, UIMenu * parent = NULL, UIMenuSubMenu * SubMenu = NULL ); + static void fixMenuPos( Vector2i& position, UIMenu * Menu, UIMenu * parent = NULL, UIMenuSubMenu * SubMenu = NULL ); UIMenu( UIMenu::CreateParams& Params ); @@ -65,33 +65,33 @@ class EE_API UIMenu : public UIComplexControl { virtual bool isType( const Uint32& type ) const; - Uint32 Add( const String& Text, SubTexture * Icon = NULL ); + Uint32 add( const String& Text, SubTexture * Icon = NULL ); - Uint32 Add( UIControl * Control ); + Uint32 add( UIControl * Control ); - Uint32 AddSeparator(); + Uint32 addSeparator(); - Uint32 AddCheckBox( const String& Text, const bool& Active = false ); + Uint32 addCheckBox( const String& Text, const bool& Active = false ); - Uint32 AddSubMenu( const String& Text, SubTexture * Icon = NULL, UIMenu * SubMenu = NULL ); + Uint32 addSubMenu( const String& Text, SubTexture * Icon = NULL, UIMenu * SubMenu = NULL ); - UIControl * GetItem( const Uint32& Index ); + UIControl * getItem( const Uint32& Index ); - UIControl * GetItem( const String& Text ); + UIControl * getItem( const String& Text ); - Uint32 GetItemIndex( UIControl * Item ); + Uint32 getItemIndex( UIControl * Item ); - Uint32 Count() const; + Uint32 getCount() const; - void Remove( const Uint32& Index ); + void remove( const Uint32& Index ); - void Remove( UIControl * Ctrl ); + void remove( UIControl * Ctrl ); - void RemoveAll(); + void removeAll(); - void Insert( const String& Text, SubTexture * Icon, const Uint32& Index ); + void insert( const String& Text, SubTexture * Icon, const Uint32& Index ); - void Insert( UIControl * Control, const Uint32& Index ); + void insert( UIControl * Control, const Uint32& Index ); virtual void setTheme( UITheme * Theme ); @@ -99,7 +99,7 @@ class EE_API UIMenu : public UIComplexControl { virtual bool hide(); - const Recti& Padding() const; + const Recti& getPadding() const; protected: friend class UIMenuItem; friend class UIMenuCheckBox; @@ -107,11 +107,11 @@ class EE_API UIMenu : public UIComplexControl { std::deque mItems; Recti mPadding; - Font * mFont; - ColorA mFontColor; - ColorA mFontShadowColor; - ColorA mFontOverColor; - ColorA mFontSelectedColor; + Font * mFont; + ColorA mFontColor; + ColorA mFontShadowColor; + ColorA mFontOverColor; + ColorA mFontSelectedColor; Uint32 mMinWidth; Uint32 mMinSpaceForIcons; Uint32 mMinRightMargin; @@ -119,46 +119,46 @@ class EE_API UIMenu : public UIComplexControl { Uint32 mRowHeight; Uint32 mNextPosY; Uint32 mBiggestIcon; - UIControl * mItemSelected; + UIControl * mItemSelected; Uint32 mItemSelectedIndex; bool mClickHide; Uint32 mLastTickMove; virtual void onSizeChange(); - void AutoPadding(); + void autoPadding(); virtual Uint32 onMessage( const UIMessage * Msg ); - void SetControlSize( UIControl * Control, const Uint32& position ); + void setControlSize( UIControl * Control, const Uint32& position ); - void ResizeControls(); + void resizeControls(); - void ReposControls(); + void rePosControls(); - void ResizeMe(); + void resizeMe(); - UIMenuItem * CreateMenuItem( const String& Text, SubTexture * Icon ); + UIMenuItem * createMenuItem( const String& Text, SubTexture * Icon ); - UIMenuCheckBox * CreateMenuCheckBox( const String& Text, const bool& Active ); + UIMenuCheckBox * createMenuCheckBox( const String& Text, const bool& Active ); - UIMenuSubMenu * CreateSubMenu( const String& Text, SubTexture * Icon, UIMenu * SubMenu ); + UIMenuSubMenu * createSubMenu( const String& Text, SubTexture * Icon, UIMenu * SubMenu ); void doAftersetTheme(); - bool CheckControlSize( UIControl * Control, const bool& Resize = true ); + bool checkControlSize( UIControl * Control, const bool& Resize = true ); - bool IsSubMenu( UIControl * Ctrl ); + bool isSubMenu( UIControl * Ctrl ); - void SetItemSelected( UIControl * Item ); + void setItemSelected( UIControl * Item ); virtual Uint32 onKeyDown( const UIEventKey& Event ); - void PrevSel(); + void prevSel(); - void NextSel(); + void nextSel(); - void TrySelect( UIControl * Ctrl, bool Up ); + void trySelect( UIControl * Ctrl, bool Up ); }; }} diff --git a/include/eepp/ui/uimenucheckbox.hpp b/include/eepp/ui/uimenucheckbox.hpp index 87de1a1b9..1c5bdfdcd 100644 --- a/include/eepp/ui/uimenucheckbox.hpp +++ b/include/eepp/ui/uimenucheckbox.hpp @@ -17,11 +17,9 @@ class EE_API UIMenuCheckBox : public UIMenuItem { virtual void setTheme( UITheme * Theme ); - const bool& active() const; - const bool& isActive() const; - void active( const bool& active ); + void setActive( const bool& active ); void switchActive(); diff --git a/include/eepp/ui/uimenusubmenu.hpp b/include/eepp/ui/uimenusubmenu.hpp index 324f737c8..a88c0c69b 100644 --- a/include/eepp/ui/uimenusubmenu.hpp +++ b/include/eepp/ui/uimenusubmenu.hpp @@ -34,9 +34,9 @@ class EE_API UIMenuSubMenu : public UIMenuItem { virtual void setTheme( UITheme * Theme ); - void subMenu( UIMenu * subMenu ); + void setSubMenu( UIMenu * subMenu ); - UIMenu * subMenu() const; + UIMenu * getSubMenu() const; UIGfx * getArrow() const; diff --git a/include/eepp/ui/uimessagebox.hpp b/include/eepp/ui/uimessagebox.hpp index 755b89100..3d2a95901 100644 --- a/include/eepp/ui/uimessagebox.hpp +++ b/include/eepp/ui/uimessagebox.hpp @@ -33,7 +33,7 @@ class EE_API UIMessageBox : public UIWindow { virtual void setTheme( UITheme * Theme ); - UITextBox * getTextBox() const; + UITextBox * getTextBox() const; UIPushButton * getButtonOK() const; diff --git a/include/eepp/ui/uiprogressbar.hpp b/include/eepp/ui/uiprogressbar.hpp index 26ae94245..b57eda5c0 100644 --- a/include/eepp/ui/uiprogressbar.hpp +++ b/include/eepp/ui/uiprogressbar.hpp @@ -37,38 +37,38 @@ class EE_API UIProgressBar : public UIComplexControl { virtual void setTheme( UITheme * Theme ); - virtual void progress( Float Val ); + virtual void setProgress( Float Val ); - const Float& progress() const; + const Float& getProgress() const; - virtual void totalSteps( const Float& Steps ); + virtual void setTotalSteps( const Float& Steps ); - const Float& totalSteps() const; + const Float& getTotalSteps() const; virtual void draw(); - void movementSpeed( const Vector2f& Speed ); + void setMovementSpeed( const Vector2f& Speed ); - const Vector2f& movementSpeed() const; + const Vector2f& getMovementSpeed() const; - void verticalExpand( const bool& verticalExpand ); + void setVerticalExpand( const bool& verticalExpand ); - const bool& verticalExpand() const; + const bool& getVerticalExpand() const; - void fillerMargin( const Rectf& margin ); + void setFillerMargin( const Rectf& margin ); - const Rectf& fillerMargin() const; + const Rectf& getFillerMargin() const; - void displayPercent( const bool& displayPercent ); + void setDisplayPercent( const bool& displayPercent ); - const bool& displayPercent() const; + const bool& getDisplayPercent() const; UITextBox * getTextBox() const; protected: bool mVerticalExpand; Vector2f mSpeed; - Rectf mFillerMargin; + Rectf mFillerMargin; bool mDisplayPercent; Float mProgress; diff --git a/include/eepp/ui/uipushbutton.hpp b/include/eepp/ui/uipushbutton.hpp index ee2468c19..9f6ab88ed 100644 --- a/include/eepp/ui/uipushbutton.hpp +++ b/include/eepp/ui/uipushbutton.hpp @@ -22,22 +22,22 @@ class EE_API UIPushButton : public UIComplexControl { IconAutoMargin( true ), IconMinSize( 0, 0 ) { - UITheme * Theme = UIThemeManager::instance()->defaultTheme(); + UITheme * Theme = UIThemeManager::instance()->getDefaultTheme(); if ( NULL != Theme ) { - Font = Theme->font(); - FontColor = Theme->fontColor(); - FontShadowColor = Theme->fontShadowColor(); - FontOverColor = Theme->fontOverColor(); + Font = Theme->getFont(); + FontColor = Theme->getFontColor(); + FontShadowColor = Theme->getFontShadowColor(); + FontOverColor = Theme->getFontOverColor(); } if ( NULL == Font ) - Font = UIThemeManager::instance()->defaultFont(); + Font = UIThemeManager::instance()->getDefaultFont(); } inline ~CreateParams() {} - inline void SetIcon( SubTexture * icon ) { + inline void setIcon( SubTexture * icon ) { Icon = icon; if ( !IconHorizontalMargin ) @@ -64,31 +64,31 @@ class EE_API UIPushButton : public UIComplexControl { virtual void setTheme( UITheme * Theme ); - virtual void icon( SubTexture * icon ); + virtual void setIcon( SubTexture * icon ); - virtual UIGfx * icon() const; + virtual UIGfx * getIcon() const; - virtual void text( const String& text ); + virtual void setText( const String& text ); - virtual const String& text(); + virtual const String& getText(); - void padding( const Recti& padding ); + void setPadding( const Recti& padding ); - const Recti& padding() const; + const Recti& getPadding() const; - void iconHorizontalMargin( Int32 margin ); + void setIconHorizontalMargin( Int32 margin ); - const Int32& iconHorizontalMargin() const; + const Int32& getIconHorizontalMargin() const; UITextBox * getTextBox() const; - const ColorA& fontColor() const; + const ColorA& getFontColor() const; - void fontColor( const ColorA& color ); + void setFontColor( const ColorA& color ); - const ColorA& fontOverColor() const; + const ColorA& getFontOverColor() const; - void fontOverColor( const ColorA& color ); + void setFontOverColor( const ColorA& color ); protected: ColorA mFontColor; ColorA mFontOverColor; diff --git a/include/eepp/ui/uiradiobutton.hpp b/include/eepp/ui/uiradiobutton.hpp index d7cafce88..268090f1c 100644 --- a/include/eepp/ui/uiradiobutton.hpp +++ b/include/eepp/ui/uiradiobutton.hpp @@ -20,20 +20,18 @@ class EE_API UIRadioButton : public UITextBox { const bool& isActive() const; - void active( const bool& active ); - - const bool& active() const; + void setActive( const bool& active ); virtual void setPadding( const Recti& padding ); - UIControlAnim * activeButton() const; + UIControlAnim * getActiveButton() const; - UIControlAnim * inactiveButton() const; + UIControlAnim * getInactiveButton() const; protected: UIControlAnim * mActiveButton; UIControlAnim * mInactiveButton; - bool mActive; - Uint32 mLastTick; + bool mActive; + Uint32 mLastTick; virtual void onSizeChange(); diff --git a/include/eepp/ui/uiscrollbar.hpp b/include/eepp/ui/uiscrollbar.hpp index 10eb867d6..006d5c1ea 100644 --- a/include/eepp/ui/uiscrollbar.hpp +++ b/include/eepp/ui/uiscrollbar.hpp @@ -29,21 +29,21 @@ class EE_API UIScrollBar : public UIComplexControl { virtual bool isType( const Uint32& type ) const; - virtual void value( Float Val ); + virtual void setValue( Float Val ); - const Float& value() const; + const Float& getValue() const; - virtual void minValue( const Float& MinVal ); + virtual void setMinValue( const Float& MinVal ); - const Float& minValue() const; + const Float& getMinValue() const; - virtual void maxValue( const Float& MaxVal ); + virtual void setMaxValue( const Float& MaxVal ); - const Float& maxValue() const; + const Float& getMaxValue() const; - virtual void clickStep( const Float& step ); + virtual void setClickStep( const Float& step ); - const Float& clickStep() const; + const Float& getClickStep() const; virtual void setTheme( UITheme * Theme ); diff --git a/include/eepp/ui/uiskin.hpp b/include/eepp/ui/uiskin.hpp index b5fd827a1..e64944ebe 100644 --- a/include/eepp/ui/uiskin.hpp +++ b/include/eepp/ui/uiskin.hpp @@ -44,11 +44,11 @@ class EE_API UISkin { const Uint32& getId() const; - UITheme * theme() const; + UITheme * getTheme() const; - void theme( UITheme * theme ); + void setTheme( UITheme * theme ); - virtual UISkin * copy() = 0; + virtual UISkin * clone() = 0; const Uint32& getType() const; protected: diff --git a/include/eepp/ui/uiskincomplex.hpp b/include/eepp/ui/uiskincomplex.hpp index 4c9a50972..3d086a6cd 100644 --- a/include/eepp/ui/uiskincomplex.hpp +++ b/include/eepp/ui/uiskincomplex.hpp @@ -35,9 +35,9 @@ class EE_API UISkinComplex : public UISkin { SubTexture * getSubTextureSide( const Uint32& State, const Uint32& Side ); - UISkinComplex * copy( const std::string& NewName, const bool& CopyColorsState = true ); + UISkinComplex * clone( const std::string& NewName, const bool& CopyColorsState = true ); - virtual UISkin * copy(); + virtual UISkin * clone(); protected: SubTexture * mSubTexture[ UISkinState::StateCount ][ SideCount ]; ColorA mTempColor; diff --git a/include/eepp/ui/uiskinsimple.hpp b/include/eepp/ui/uiskinsimple.hpp index 8efa4d40e..41fe98836 100644 --- a/include/eepp/ui/uiskinsimple.hpp +++ b/include/eepp/ui/uiskinsimple.hpp @@ -18,9 +18,9 @@ class EE_API UISkinSimple : public UISkin { SubTexture * getSubTexture( const Uint32& State ) const; - UISkinSimple * copy( const std::string& NewName, const bool& CopyColorsState = true ); + UISkinSimple * clone( const std::string& NewName, const bool& CopyColorsState = true ); - virtual UISkin * copy(); + virtual UISkin * clone(); protected: SubTexture * mSubTexture[ UISkinState::StateCount ]; ColorA mTempColor; diff --git a/include/eepp/ui/uislider.hpp b/include/eepp/ui/uislider.hpp index e607b078a..ae230411c 100644 --- a/include/eepp/ui/uislider.hpp +++ b/include/eepp/ui/uislider.hpp @@ -35,21 +35,21 @@ class EE_API UISlider : public UIComplexControl { virtual void setTheme( UITheme * Theme ); - virtual void value( Float Val ); + virtual void setValue( Float Val ); - const Float& value() const; + const Float& getValue() const; - virtual void minValue( const Float& MinVal ); + virtual void setMinValue( const Float& MinVal ); - const Float& minValue() const; + const Float& getMinValue() const; - virtual void maxValue( const Float& MaxVal ); + virtual void setMaxValue( const Float& MaxVal ); - const Float& maxValue() const; + const Float& getMaxValue() const; - virtual void clickStep( const Float& step ); + virtual void setClickStep( const Float& step ); - const Float& clickStep() const; + const Float& getClickStep() const; const bool& isVertical() const; @@ -61,9 +61,9 @@ class EE_API UISlider : public UIComplexControl { void adjustChilds(); - const bool& allowHalfSliderOut() const; + const bool& isHalfSliderOutAllowed() const; - const bool& expandBackground() const; + const bool& isBackgroundExpanded() const; void manageClick( const Uint32& flags ); protected: @@ -72,7 +72,7 @@ class EE_API UISlider : public UIComplexControl { bool mVertical; bool mAllowHalfSliderOut; bool mExpandBackground; - UIControlAnim * mBackSlider; + UIControlAnim * mBackSlider; UIControlAnim * mSlider; Float mMinValue; Float mMaxValue; diff --git a/include/eepp/ui/uispinbox.hpp b/include/eepp/ui/uispinbox.hpp index a6e65cdc5..7dc42b649 100644 --- a/include/eepp/ui/uispinbox.hpp +++ b/include/eepp/ui/uispinbox.hpp @@ -34,29 +34,29 @@ class EE_API UISpinBox : public UIComplexControl { virtual void setTheme( UITheme * Theme ); - virtual void padding( const Recti& padding ); + virtual void setPadding( const Recti& padding ); - const Recti& padding() const; + const Recti& getPadding() const; - virtual void clickStep( const Float& step ); + virtual void setClickStep( const Float& step ); - const Float& clickStep() const; + const Float& getClickStep() const; virtual Uint32 onMessage( const UIMessage * Msg ); void addValue( const Float& value ); - virtual void minValue( const Float& MinVal ); + virtual void setMinValue( const Float& MinVal ); - const Float& minValue() const; + const Float& getMinValue() const; - virtual void maxValue( const Float& MaxVal ); + virtual void setMaxValue( const Float& MaxVal ); - const Float& maxValue() const; + const Float& getMaxValue() const; - virtual void value( const Float& Val ); + virtual void setValue( const Float& Val ); - const Float& value() const; + const Float& getValue() const; virtual void update(); diff --git a/include/eepp/ui/uisprite.hpp b/include/eepp/ui/uisprite.hpp index f2d928ea1..9e75cd5f5 100644 --- a/include/eepp/ui/uisprite.hpp +++ b/include/eepp/ui/uisprite.hpp @@ -40,19 +40,19 @@ class EE_API UISprite : public UIComplexControl { virtual void setAlpha( const Float& alpha ); - Graphics::Sprite * sprite() const; + Graphics::Sprite * getSprite() const; - void sprite( Graphics::Sprite * sprite ); + void setSprite( Graphics::Sprite * sprite ); - ColorA color() const; + ColorA getColor() const; - void color( const ColorA& color ); + void setColor( const ColorA& color ); - const EE_RENDER_MODE& renderMode() const; + const EE_RENDER_MODE& getRenderMode() const; - void renderMode( const EE_RENDER_MODE& render ); + void setRenderMode( const EE_RENDER_MODE& render ); - const Vector2i& alignOffset() const; + const Vector2i& getAlignOffset() const; protected: Graphics::Sprite * mSprite; EE_RENDER_MODE mRender; diff --git a/include/eepp/ui/uitab.hpp b/include/eepp/ui/uitab.hpp index 5e4af0c8d..c997477b4 100644 --- a/include/eepp/ui/uitab.hpp +++ b/include/eepp/ui/uitab.hpp @@ -21,9 +21,9 @@ class EE_API UITab : public UISelectButton { virtual void setTheme( UITheme * Theme ); - virtual const String& text(); + virtual const String& getText(); - virtual void text( const String& text ); + virtual void setText( const String& text ); virtual void update(); protected: diff --git a/include/eepp/ui/uitabwidget.hpp b/include/eepp/ui/uitabwidget.hpp index f1797dd86..75b7d6fb8 100644 --- a/include/eepp/ui/uitabwidget.hpp +++ b/include/eepp/ui/uitabwidget.hpp @@ -30,18 +30,18 @@ class EE_API UITabWidget : public UIComplexControl { { Flags = ( UI_VALIGN_BOTTOM | UI_HALIGN_LEFT | UI_ANCHOR_LEFT | UI_ANCHOR_TOP ); - UITheme * Theme = UIThemeManager::instance()->defaultTheme(); + UITheme * Theme = UIThemeManager::instance()->getDefaultTheme(); if ( NULL != Theme ) { - Font = Theme->font(); - FontColor = Theme->fontColor(); - FontShadowColor = Theme->fontShadowColor(); - FontOverColor = Theme->fontOverColor(); - FontSelectedColor = Theme->fontSelectedColor(); + Font = Theme->getFont(); + FontColor = Theme->getFontColor(); + FontShadowColor = Theme->getFontShadowColor(); + FontOverColor = Theme->getFontOverColor(); + FontSelectedColor = Theme->getFontSelectedColor(); } if ( NULL == Font ) - Font = UIThemeManager::instance()->defaultFont(); + Font = UIThemeManager::instance()->getDefaultFont(); } inline ~CreateParams() {} @@ -83,7 +83,7 @@ class EE_API UITabWidget : public UIComplexControl { Uint32 getTabIndex( UITab * Tab ); - Uint32 count() const; + Uint32 getCount() const; void remove( const Uint32& Index ); diff --git a/include/eepp/ui/uitextbox.hpp b/include/eepp/ui/uitextbox.hpp index cd4118fbd..da464aabc 100644 --- a/include/eepp/ui/uitextbox.hpp +++ b/include/eepp/ui/uitextbox.hpp @@ -16,16 +16,16 @@ class EE_API UITextBox : public UIComplexControl { FontShadowColor( 255, 255, 255, 150 ), FontSelectionBackColor( 150, 150, 150, 150 ) { - UITheme * Theme = UIThemeManager::instance()->defaultTheme(); + UITheme * Theme = UIThemeManager::instance()->getDefaultTheme(); if ( NULL != Theme ) { - Font = Theme->font(); - FontColor = Theme->fontColor(); - FontShadowColor = Theme->fontShadowColor(); + Font = Theme->getFont(); + FontColor = Theme->getFontColor(); + FontShadowColor = Theme->getFontShadowColor(); } if ( NULL == Font ) - Font = UIThemeManager::instance()->defaultFont(); + Font = UIThemeManager::instance()->getDefaultFont(); } inline ~CreateParams() {} @@ -68,10 +68,6 @@ class EE_API UITextBox : public UIComplexControl { void setSelectionBackColor( const ColorA& color ); - virtual void onTextChanged(); - - virtual void onFontChanged(); - virtual void setPadding( const Recti& padding ); const Recti& getPadding() const; @@ -112,6 +108,10 @@ class EE_API UITextBox : public UIComplexControl { virtual void autoAlign(); + virtual void onTextChanged(); + + virtual void onFontChanged(); + virtual Uint32 onFocusLoss(); virtual Uint32 onMouseDoubleClick( const Vector2i& position, const Uint32 flags ); diff --git a/include/eepp/ui/uitextedit.hpp b/include/eepp/ui/uitextedit.hpp index bf4be1e37..d1a8b4b4e 100644 --- a/include/eepp/ui/uitextedit.hpp +++ b/include/eepp/ui/uitextedit.hpp @@ -35,9 +35,9 @@ class EE_API UITextEdit : public UIComplexControl { virtual void setTheme( UITheme * Theme ); - const String& text() const; + const String& getText() const; - void text( const String& Txt ); + void setText( const String& Txt ); UITextInput * getTextInput() const; @@ -47,9 +47,9 @@ class EE_API UITextEdit : public UIComplexControl { virtual void update(); - void allowEditing( const bool& allow ); + void setAllowEditing( const bool& allow ); - const bool& allowEditing() const; + const bool& getAllowEditing() const; protected: UITextInput * mTextInput; UIScrollBar * mHScrollBar; diff --git a/include/eepp/ui/uitextinput.hpp b/include/eepp/ui/uitextinput.hpp index 7d6e5387c..a8da8dca3 100644 --- a/include/eepp/ui/uitextinput.hpp +++ b/include/eepp/ui/uitextinput.hpp @@ -44,9 +44,9 @@ class EE_API UITextInput : public UITextBox { InputTextBuffer * getInputTextBuffer(); - void allowEditing( const bool& allow ); + void setAllowEditing( const bool& allow ); - const bool& allowEditing() const; + const bool& getAllowEditing() const; virtual const String& getText(); diff --git a/include/eepp/ui/uitheme.hpp b/include/eepp/ui/uitheme.hpp index 742ef7c54..be5cd9702 100644 --- a/include/eepp/ui/uitheme.hpp +++ b/include/eepp/ui/uitheme.hpp @@ -70,33 +70,33 @@ class EE_API UITheme : protected ResourceManager { const Uint32& getId() const; - const std::string& abbr() const; + const std::string& getAbbr() const; virtual UISkin * add( UISkin * Resource ); - void font( Graphics::Font * font ); + void setFont( Graphics::Font * setFont ); - Graphics::Font * font() const; + Graphics::Font * getFont() const; - const ColorA& fontColor() const; + const ColorA& getFontColor() const; - const ColorA& fontShadowColor() const; + const ColorA& getFontShadowColor() const; - const ColorA& fontOverColor() const; + const ColorA& getFontOverColor() const; - const ColorA& fontSelectedColor() const; + const ColorA& getFontSelectedColor() const; - void fontColor( const ColorA& Color ); + void setFontColor( const ColorA& Color ); - void fontShadowColor( const ColorA& Color ); + void setFontShadowColor( const ColorA& Color ); - void fontOverColor( const ColorA& Color ); + void setFontOverColor( const ColorA& Color ); - void fontSelectedColor( const ColorA& Color ); + void setFontSelectedColor( const ColorA& Color ); - void useDefaultThemeValues( const bool& Use ); + void setUseDefaultThemeValues( const bool& Use ); - const bool& useDefaultThemeValues() const; + const bool& getUseDefaultThemeValues() const; Graphics::TextureAtlas * getTextureAtlas() const; diff --git a/include/eepp/ui/uithememanager.hpp b/include/eepp/ui/uithememanager.hpp index c9628a841..b024d7c7a 100644 --- a/include/eepp/ui/uithememanager.hpp +++ b/include/eepp/ui/uithememanager.hpp @@ -14,51 +14,51 @@ class EE_API UIThemeManager : public ResourceManager { public: virtual ~UIThemeManager(); - void defaultFont( Font * Font ); + void setDefaultFont( Font * Font ); - Font * defaultFont() const; + Font * getDefaultFont() const; void setTheme( const std::string& Theme ); void setTheme( UITheme * Theme ); - void defaultTheme( UITheme * Theme ); + void setDefaultTheme( UITheme * Theme ); - void defaultTheme( const std::string& Theme ); + void setDefaultTheme( const std::string& Theme ); - UITheme * defaultTheme() const; + UITheme * getDefaultTheme() const; void applyDefaultTheme( UIControl * Control ); - void autoApplyDefaultTheme( const bool& apply ); + void setAutoApplyDefaultTheme( const bool& apply ); - const bool& autoApplyDefaultTheme() const; + const bool& getAutoApplyDefaultTheme() const; - void defaultEffectsEnabled( const bool& Enabled ); + void setDefaultEffectsEnabled( const bool& Enabled ); - const bool& defaultEffectsEnabled() const; + const bool& getDefaultEffectsEnabled() const; - const Time& controlsFadeInTime() const; + const Time& getControlsFadeInTime() const; - void controlsFadeInTime( const Time & Time ); + void setControlsFadeInTime( const Time & Time ); - const Time& controlsFadeOutTime() const; + const Time& getControlsFadeOutTime() const; - void controlsFadeOutTime( const Time& Time ); + void setControlsFadeOutTime( const Time& Time ); - void tooltipTimeToShow( const Time & Time ); + void setTooltipTimeToShow( const Time & Time ); - const Time& tooltipTimeToShow() const; + const Time& getTooltipTimeToShow() const; - void tooltipFollowMouse( const bool& Follow ); + void setTooltipFollowMouse( const bool& Follow ); - const bool& tooltipFollowMouse() const; + const bool& getTooltipFollowMouse() const; - void cursorSize( const Sizei& Size ); + void setCursorSize( const Sizei& Size ); - const Sizei& cursorSize() const; + const Sizei& getCursorSize() const; protected: - Font * mFont; + Font * mFont; UITheme * mThemeDefault; bool mautoApplyDefaultTheme; diff --git a/include/eepp/ui/uitooltip.hpp b/include/eepp/ui/uitooltip.hpp index 8186f1cdc..4c897e33f 100644 --- a/include/eepp/ui/uitooltip.hpp +++ b/include/eepp/ui/uitooltip.hpp @@ -19,16 +19,16 @@ class EE_API UITooltip : public UIControlAnim { FontColor( 0, 0, 0, 255 ), FontShadowColor( 255, 255, 255, 150 ) { - UITheme * Theme = UIThemeManager::instance()->defaultTheme(); + UITheme * Theme = UIThemeManager::instance()->getDefaultTheme(); if ( NULL != Theme ) { - Font = Theme->font(); - FontColor = Theme->fontColor(); - FontShadowColor = Theme->fontShadowColor(); + Font = Theme->getFont(); + FontColor = Theme->getFontColor(); + FontShadowColor = Theme->getFontShadowColor(); } if ( NULL == Font ) - Font = UIThemeManager::instance()->defaultFont(); + Font = UIThemeManager::instance()->getDefaultFont(); } inline ~CreateParams() {} @@ -57,29 +57,29 @@ class EE_API UITooltip : public UIControlAnim { virtual void setAlpha( const Float& alpha ); - Graphics::Font * font() const; + Graphics::Font * getFont() const; - void font( Graphics::Font * font ); + void setFont( Graphics::Font * font ); - virtual const String& text(); + virtual const String& getText(); - virtual void text( const String& text ); + virtual void setText( const String& text ); - const ColorA& color() const; + const ColorA& getColor() const; - void color( const ColorA& color ); + void setColor( const ColorA& color ); - const ColorA& shadowColor() const; + const ColorA& getShadowColor() const; - void shadowColor( const ColorA& color ); + void setShadowColor( const ColorA& color ); virtual void onTextChanged(); virtual void onFontChanged(); - virtual void padding( const Recti& padding ); + virtual void setPadding( const Recti& padding ); - const Recti& padding() const; + const Recti& getPadding() const; TextCache * getTextCache(); @@ -89,13 +89,13 @@ class EE_API UITooltip : public UIControlAnim { const int& getNumLines() const; - const Vector2f& alignOffset() const; + const Vector2f& getAlignOffset() const; - void tooltipTime( const Time& Time ); + void setTooltipTime( const Time& Time ); - void tooltipTimeAdd( const Time & Time ); + void addTooltipTime( const Time & Time ); - const Time & tooltipTime() const; + const Time & getTooltipTime() const; protected: TextCache * mTextCache; ColorA mFontColor; diff --git a/include/eepp/ui/uiwindow.hpp b/include/eepp/ui/uiwindow.hpp index 48ed8f07e..d4003eb91 100644 --- a/include/eepp/ui/uiwindow.hpp +++ b/include/eepp/ui/uiwindow.hpp @@ -173,17 +173,17 @@ class EE_API UIWindow : public UIComplexControl { virtual Uint32 onKeyDown( const UIEventKey &Event ); - void buttonCloseClick( const UIEvent * Event ); + void onButtonCloseClick( const UIEvent * Event ); - void buttonMaximizeClick( const UIEvent * Event ); + void onButtonMaximizeClick( const UIEvent * Event ); - void buttonMinimizeClick( const UIEvent * Event ); + void onButtonMinimizeClick( const UIEvent * Event ); - void containerPosChange( const UIEvent * Event ); + void onContainerPosChange( const UIEvent * Event ); void fixChildsSize(); - void doResize ( const UIMessage * Msg ); + void doResize( const UIMessage * Msg ); void decideResizeType( UIControl * Control ); diff --git a/include/eepp/ui/uiwinmenu.hpp b/include/eepp/ui/uiwinmenu.hpp index 1c8bac812..911a7be58 100644 --- a/include/eepp/ui/uiwinmenu.hpp +++ b/include/eepp/ui/uiwinmenu.hpp @@ -24,18 +24,18 @@ class EE_API UIWinMenu : public UIComplexControl { MenuHeight(0), FirstButtonMargin(1) { - UITheme * Theme = UIThemeManager::instance()->defaultTheme(); + UITheme * Theme = UIThemeManager::instance()->getDefaultTheme(); if ( NULL != Theme ) { - Font = Theme->font(); - FontColor = Theme->fontColor(); - FontShadowColor = Theme->fontShadowColor(); - FontOverColor = Theme->fontOverColor(); - FontSelectedColor = Theme->fontSelectedColor(); + Font = Theme->getFont(); + FontColor = Theme->getFontColor(); + FontShadowColor = Theme->getFontShadowColor(); + FontOverColor = Theme->getFontOverColor(); + FontSelectedColor = Theme->getFontSelectedColor(); } if ( NULL == Font ) - Font = UIThemeManager::instance()->defaultFont(); + Font = UIThemeManager::instance()->getDefaultFont(); } Graphics::Font * Font; @@ -63,19 +63,19 @@ class EE_API UIWinMenu : public UIComplexControl { virtual void setTheme( UITheme * Theme ); - void fontColor( const ColorA& Color ); + void setFontColor( const ColorA& Color ); - const ColorA& fontColor() const; + const ColorA& getFontColor() const; - void fontOverColor( const ColorA& Color ); + void setFontOverColor( const ColorA& Color ); - const ColorA& fontOverColor() const; + const ColorA& getFontOverColor() const; - void fontSelectedColor( const ColorA& Color ); + void setFontSelectedColor( const ColorA& Color ); - const ColorA& fontSelectedColor() const; + const ColorA& getFontSelectedColor() const; - Graphics::Font * font() const; + Graphics::Font * getFont() const; UISelectButton * getButton( const String& ButtonText ); diff --git a/projects/linux/ee.creator.user b/projects/linux/ee.creator.user index acd7b7f86..d0d1a5e55 100644 --- a/projects/linux/ee.creator.user +++ b/projects/linux/ee.creator.user @@ -1,6 +1,6 @@ - + EnvironmentId diff --git a/src/eepp/gaming/mapeditor/mapeditor.cpp b/src/eepp/gaming/mapeditor/mapeditor.cpp index 3ae9634a8..4483e66b8 100644 --- a/src/eepp/gaming/mapeditor/mapeditor.cpp +++ b/src/eepp/gaming/mapeditor/mapeditor.cpp @@ -41,7 +41,7 @@ namespace EE { namespace Gaming { MapEditor::MapEditor( UIWindow * AttatchTo, const MapEditorCloseCb& callback ) : mUIWindow( AttatchTo ), - mTheme( UIThemeManager::instance()->defaultTheme() ), + mTheme( UIThemeManager::instance()->getDefaultTheme() ), mUIMap( NULL ), mCloseCb( callback ), mGOTypeList( NULL ), @@ -92,70 +92,70 @@ void MapEditor::CreateWinMenu() { mTileBox->updateAnchorsDistances(); UIPopUpMenu * PU1 = mTheme->createPopUpMenu( mUIContainer ); - PU1->Add( "New...", mTheme->getIconByName( "document-new" ) ); - PU1->Add( "Open...", mTheme->getIconByName( "document-open" ) ); - PU1->AddSeparator(); - PU1->Add( "Save", mTheme->getIconByName( "document-save" ) ); - PU1->Add( "Save As...", mTheme->getIconByName( "document-save-as" ) ); - PU1->AddSeparator(); - PU1->Add( "Close", mTheme->getIconByName( "document-close" ) ); - PU1->AddSeparator(); - PU1->Add( "Quit", mTheme->getIconByName( "quit" ) ); + PU1->add( "New...", mTheme->getIconByName( "document-new" ) ); + PU1->add( "Open...", mTheme->getIconByName( "document-open" ) ); + PU1->addSeparator(); + PU1->add( "Save", mTheme->getIconByName( "document-save" ) ); + PU1->add( "Save As...", mTheme->getIconByName( "document-save-as" ) ); + PU1->addSeparator(); + PU1->add( "Close", mTheme->getIconByName( "document-close" ) ); + PU1->addSeparator(); + PU1->add( "Quit", mTheme->getIconByName( "quit" ) ); PU1->addEventListener( UIEvent::EventOnItemClicked, cb::Make1( this, &MapEditor::FileMenuClick ) ); WinMenu->addMenuButton( "File", PU1 ); UIPopUpMenu * PU3 = mTheme->createPopUpMenu( mUIContainer ); - mChkShowGrid = reinterpret_cast( PU3->GetItem( PU3->AddCheckBox( "Show Grid" ) ) ); + mChkShowGrid = reinterpret_cast( PU3->getItem( PU3->addCheckBox( "Show Grid" ) ) ); - mChkShowGrid->active( true ); + mChkShowGrid->setActive( true ); - mChkMarkTileOver = reinterpret_cast( PU3->GetItem( PU3->AddCheckBox( "Mark Tile Over" ) ) ); + mChkMarkTileOver = reinterpret_cast( PU3->getItem( PU3->addCheckBox( "Mark Tile Over" ) ) ); - mChkShowBlocked = reinterpret_cast( PU3->GetItem( PU3->AddCheckBox( "Show Blocked" ) ) ); + mChkShowBlocked = reinterpret_cast( PU3->getItem( PU3->addCheckBox( "Show Blocked" ) ) ); - PU3->AddSeparator(); - mUIWindow->addShortcut( KEY_KP_PLUS , KEYMOD_CTRL, reinterpret_cast ( PU3->GetItem( PU3->Add( "Zoom In", mTheme->getIconByName( "zoom-in" ) ) ) ) ); - mUIWindow->addShortcut( KEY_KP_MINUS, KEYMOD_CTRL, reinterpret_cast ( PU3->GetItem( PU3->Add( "Zoom Out", mTheme->getIconByName( "zoom-out" ) ) ) ) ); - mUIWindow->addShortcut( KEY_KP0 , KEYMOD_CTRL, reinterpret_cast ( PU3->GetItem( PU3->Add( "Normal Size", mTheme->getIconByName( "zoom-original" ) ) ) ) ); - PU3->AddSeparator(); + PU3->addSeparator(); + mUIWindow->addShortcut( KEY_KP_PLUS , KEYMOD_CTRL, reinterpret_cast ( PU3->getItem( PU3->add( "Zoom In", mTheme->getIconByName( "zoom-in" ) ) ) ) ); + mUIWindow->addShortcut( KEY_KP_MINUS, KEYMOD_CTRL, reinterpret_cast ( PU3->getItem( PU3->add( "Zoom Out", mTheme->getIconByName( "zoom-out" ) ) ) ) ); + mUIWindow->addShortcut( KEY_KP0 , KEYMOD_CTRL, reinterpret_cast ( PU3->getItem( PU3->add( "Normal Size", mTheme->getIconByName( "zoom-original" ) ) ) ) ); + PU3->addSeparator(); PU3->addEventListener( UIEvent::EventOnItemClicked, cb::Make1( this, &MapEditor::ViewMenuClick ) ); WinMenu->addMenuButton( "View", PU3 ); UIPopUpMenu * PU4 = mTheme->createPopUpMenu( mUIContainer ); - PU4->Add( "Properties..." ); - PU4->Add( "Resize..." ); + PU4->add( "Properties..." ); + PU4->add( "Resize..." ); PU4->addEventListener( UIEvent::EventOnItemClicked, cb::Make1( this, &MapEditor::MapMenuClick ) ); WinMenu->addMenuButton( "Map", PU4 ); UIPopUpMenu * PU5 = mTheme->createPopUpMenu( mUIContainer ); - PU5->Add( "Add Tile Layer..." ); - PU5->Add( "Add Object Layer..." ); - PU5->AddSeparator(); - PU5->Add( "Remove Layer" ); - PU5->AddSeparator(); - PU5->Add( "Move Layer Up" ); - PU5->Add( "Move Layer Down" ); - PU5->AddSeparator(); - PU5->Add( "Layer Properties..." ); - PU5->AddSeparator(); + PU5->add( "Add Tile Layer..." ); + PU5->add( "Add Object Layer..." ); + PU5->addSeparator(); + PU5->add( "Remove Layer" ); + PU5->addSeparator(); + PU5->add( "Move Layer Up" ); + PU5->add( "Move Layer Down" ); + PU5->addSeparator(); + PU5->add( "Layer Properties..." ); + PU5->addSeparator(); - Uint32 LayerChkBoxIndex = PU5->AddCheckBox( "Lights Enabled" ); - mLayerChkLights = reinterpret_cast ( PU5->GetItem( LayerChkBoxIndex ) ); + Uint32 LayerChkBoxIndex = PU5->addCheckBox( "Lights Enabled" ); + mLayerChkLights = reinterpret_cast ( PU5->getItem( LayerChkBoxIndex ) ); - PU5->AddSeparator(); + PU5->addSeparator(); - LayerChkBoxIndex = PU5->AddCheckBox( "Visible" ); - mLayerChkVisible = reinterpret_cast ( PU5->GetItem( LayerChkBoxIndex ) ); + LayerChkBoxIndex = PU5->addCheckBox( "Visible" ); + mLayerChkVisible = reinterpret_cast ( PU5->getItem( LayerChkBoxIndex ) ); PU5->addEventListener( UIEvent::EventOnItemClicked, cb::Make1( this, &MapEditor::LayerMenuClick ) ); WinMenu->addMenuButton( "Layer", PU5 ); UIPopUpMenu * PU6 = mTheme->createPopUpMenu( mUIContainer ); - PU6->Add( "New Texture Atlas..." ); - PU6->Add( "Add External Texture Atlas..." ); + PU6->add( "New Texture Atlas..." ); + PU6->add( "Add External Texture Atlas..." ); WinMenu->addMenuButton( "Atlases", PU6 ); PU6->addEventListener( UIEvent::EventOnItemClicked, cb::Make1( this, &MapEditor::MapMenuClick ) ); @@ -251,8 +251,8 @@ void MapEditor::CreateSubTextureContainer( Int32 Width ) { mBtnGOTypeAdd->setTooltipText( "Adds a new game object type\nunknown by the map editor." ); mBtnGOTypeAdd->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &MapEditor::AddNewGOType ) ); - if ( NULL == mBtnGOTypeAdd->icon()->subTexture() ) - mBtnGOTypeAdd->text( "..." ); + if ( NULL == mBtnGOTypeAdd->getIcon()->subTexture() ) + mBtnGOTypeAdd->setText( "..." ); Txt = mTheme->createTextBox( "Layers:", mSubTextureCont, Sizei( Width, 16 ), Vector2i( TAB_CONT_X_DIST, mGOTypeList->getPosition().y + mGOTypeList->getSize().getHeight() + 4 ), TxtFlags ); @@ -337,7 +337,7 @@ void MapEditor::CreateSubTextureContainer( Int32 Width ) { void MapEditor::CreateLighContainer() { UIPushButton * NewLightBut = mTheme->createPushButton( mLightCont, Sizei( mLightCont->getSize().getWidth() - TAB_CONT_X_DIST * 2, 22 ), Vector2i( TAB_CONT_X_DIST, 0 ) ); - NewLightBut->text( "New Light" ); + NewLightBut->setText( "New Light" ); NewLightBut->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &MapEditor::OnNewLight ) ); UITextBox * Txt = mTheme->createTextBox( "Light Color:", mLightCont, Sizei(), Vector2i( TAB_CONT_X_DIST, 32 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); @@ -355,24 +355,24 @@ void MapEditor::CreateLighContainer() { Txt = mTheme->createTextBox( "R:", mLightCont, Sizei(), Vector2i( mUIBaseColor->getPosition().x + mUIBaseColor->getSize().getWidth() + 4, mUIBaseColor->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); mUIRedSlider = mTheme->createSlider( mLightCont, Sizei( 100, 20 ), Vector2i( Txt->getPosition().x + Txt->getSize().getWidth(), Txt->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); - mUIRedSlider->maxValue( 255 ); - mUIRedSlider->value( 255 ); + mUIRedSlider->setMaxValue( 255 ); + mUIRedSlider->setValue( 255 ); mUIRedSlider->addEventListener( UIEvent::EventOnValueChange, cb::Make1( this, &MapEditor::OnRedChange ) ); mUIRedTxt = mTheme->createTextBox( String::toStr( (Uint32)255 ), mLightCont, Sizei(), Vector2i( mUIRedSlider->getPosition().x + mUIRedSlider->getSize().getWidth() + 4, mUIRedSlider->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); Txt = mTheme->createTextBox( "G:", mLightCont, Sizei(), Vector2i( mUIBaseColor->getPosition().x + mUIBaseColor->getSize().getWidth() + 4, mUIRedSlider->getPosition().y + mUIRedSlider->getSize().getHeight() + 4 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); mUIGreenSlider = mTheme->createSlider( mLightCont, Sizei( 100, 20 ), Vector2i( mUIRedSlider->getPosition().x, Txt->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); - mUIGreenSlider->maxValue( 255 ); - mUIGreenSlider->value( 255 ); + mUIGreenSlider->setMaxValue( 255 ); + mUIGreenSlider->setValue( 255 ); mUIGreenSlider->addEventListener( UIEvent::EventOnValueChange, cb::Make1( this, &MapEditor::OnGreenChange ) ); mUIGreenTxt = mTheme->createTextBox( String::toStr( (Uint32)255 ), mLightCont, Sizei(), Vector2i( mUIGreenSlider->getPosition().x + mUIGreenSlider->getSize().getWidth() + 4, mUIGreenSlider->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); Txt = mTheme->createTextBox( "B:", mLightCont, Sizei(), Vector2i( mUIBaseColor->getPosition().x + mUIBaseColor->getSize().getWidth() + 4, mUIGreenSlider->getPosition().y + mUIGreenSlider->getSize().getHeight() + 4 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); mUIBlueSlider = mTheme->createSlider( mLightCont, Sizei( 100, 20 ), Vector2i( mUIRedSlider->getPosition().x, Txt->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); - mUIBlueSlider->maxValue( 255 ); - mUIBlueSlider->value( 255 ); + mUIBlueSlider->setMaxValue( 255 ); + mUIBlueSlider->setValue( 255 ); mUIBlueSlider->addEventListener( UIEvent::EventOnValueChange, cb::Make1( this, &MapEditor::OnBlueChange ) ); mUIBlueTxt = mTheme->createTextBox( String::toStr( (Uint32)255 ), mLightCont, Sizei(), Vector2i( mUIBlueSlider->getPosition().x + mUIBlueSlider->getSize().getWidth() + 4, mUIBlueSlider->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); @@ -380,7 +380,7 @@ void MapEditor::CreateLighContainer() { Txt = mTheme->createTextBox( "Light Radius:", mLightCont, Sizei(), Vector2i( TAB_CONT_X_DIST, mUIBlueTxt->getPosition().y + mUIBlueTxt->getSize().getHeight() + 16 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); mLightRadius = mTheme->createSpinBox( mLightCont, Sizei( 100, 22 ), Vector2i( Txt->getPosition().x, Txt->getPosition().y + Txt->getSize().getHeight() + 8 ), UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_SIZE | UI_TEXT_SELECTION_ENABLED, 100, false ); - mLightRadius->maxValue( 2000 ); + mLightRadius->setMaxValue( 2000 ); mLightRadius->addEventListener( UIEvent::EventOnValueChange, cb::Make1( this, &MapEditor::OnLightRadiusChangeVal ) ); mLightTypeChk = mTheme->createCheckBox( mLightCont, Sizei(), Vector2i( mLightRadius->getPosition().x, mLightRadius->getPosition().y + mLightRadius->getSize().getHeight() + 8 ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); @@ -392,7 +392,7 @@ void MapEditor::CreateLighContainer() { UISelectButton * MapEditor::AddObjContButton( String text, Uint32 mode ) { UISelectButton * Button = mTheme->createSelectButton( mObjectCont, Sizei( mObjectCont->getSize().getWidth() - TAB_CONT_X_DIST * 2, 22 ), Vector2i( TAB_CONT_X_DIST, mLastSelButtonY ) ); - Button->text( text ); + Button->setText( text ); Button->setData( mode ); Button->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &MapEditor::OnObjectModeSel ) ); @@ -437,8 +437,8 @@ void MapEditor::OnObjectModeSel( const UIEvent * Event ) { } void MapEditor::CreateUIMap() { - UISkin * HScrollSkin = mTheme->getByName( mTheme->abbr() + "_" + "hscrollbar_bg" ); - UISkin * VScrollSkin = mTheme->getByName( mTheme->abbr() + "_" + "vscrollbar_bg" ); + UISkin * HScrollSkin = mTheme->getByName( mTheme->getAbbr() + "_" + "hscrollbar_bg" ); + UISkin * VScrollSkin = mTheme->getByName( mTheme->getAbbr() + "_" + "vscrollbar_bg" ); Float ScrollH = 16; Float ScrollV = 16; @@ -522,21 +522,21 @@ void MapEditor::OnLightTypeChange( const UIEvent * Event ) { void MapEditor::OnLightRadiusChangeVal( const UIEvent * Event ) { if ( NULL != mUIMap->GetSelectedLight() ) { - mUIMap->GetSelectedLight()->Radius( mLightRadius->value() ); + mUIMap->GetSelectedLight()->Radius( mLightRadius->getValue() ); } } void MapEditor::OnLightRadiusChange( MapLight * Light ) { - mLightRadius->value( Light->Radius() ); + mLightRadius->setValue( Light->Radius() ); } void MapEditor::OnLightSelect( MapLight * Light ) { ColorA Col( Light->Color() ); - mUIRedSlider->value( Col.r() ); - mUIGreenSlider->value( Col.g() ); - mUIBlueSlider->value( Col.b() ); - mLightRadius->value( Light->Radius() ); + mUIRedSlider->setValue( Col.r() ); + mUIGreenSlider->setValue( Col.g() ); + mUIBlueSlider->setValue( Col.b() ); + mLightRadius->setValue( Light->Radius() ); mLightTypeChk->active( Light->Type() == LIGHT_ISOMETRIC ? true : false ); } @@ -545,15 +545,15 @@ void MapEditor::OnNewLight( const UIEvent * Event ) { if ( MEvent->getFlags() & EE_BUTTON_LMASK ) { Vector2i Pos = mUIMap->Map()->GetMouseMapPos(); - mUIMap->AddLight( eeNew( MapLight, ( mLightRadius->value(), Pos.x, Pos.y, mUIBaseColor->getBackground()->getColor().toColor(), mLightTypeChk->active() ? LIGHT_ISOMETRIC : LIGHT_NORMAL ) ) ); + mUIMap->AddLight( eeNew( MapLight, ( mLightRadius->getValue(), Pos.x, Pos.y, mUIBaseColor->getBackground()->getColor().toColor(), mLightTypeChk->active() ? LIGHT_ISOMETRIC : LIGHT_NORMAL ) ) ); } } void MapEditor::OnRedChange( const UIEvent * Event ) { ColorA Col = mUIBaseColor->getBackground()->getColor(); - Col.Red = (Uint8)mUIRedSlider->value(); + Col.Red = (Uint8)mUIRedSlider->getValue(); mUIBaseColor->getBackground()->setColor( Col ); - mUIRedTxt->setText( String::toStr( (Int32)mUIRedSlider->value() ) ); + mUIRedTxt->setText( String::toStr( (Int32)mUIRedSlider->getValue() ) ); if ( NULL != mUIMap->GetSelectedLight() ) { RGB lCol( mUIMap->GetSelectedLight()->Color() ); @@ -564,9 +564,9 @@ void MapEditor::OnRedChange( const UIEvent * Event ) { void MapEditor::OnGreenChange( const UIEvent * Event ) { ColorA Col = mUIBaseColor->getBackground()->getColor(); - Col.Green = (Uint8)mUIGreenSlider->value(); + Col.Green = (Uint8)mUIGreenSlider->getValue(); mUIBaseColor->getBackground()->setColor( Col ); - mUIGreenTxt->setText( String::toStr( (Uint32)mUIGreenSlider->value() ) ); + mUIGreenTxt->setText( String::toStr( (Uint32)mUIGreenSlider->getValue() ) ); if ( NULL != mUIMap->GetSelectedLight() ) { RGB lCol( mUIMap->GetSelectedLight()->Color() ); @@ -577,9 +577,9 @@ void MapEditor::OnGreenChange( const UIEvent * Event ) { void MapEditor::OnBlueChange( const UIEvent * Event ) { ColorA Col = mUIBaseColor->getBackground()->getColor(); - Col.Blue = (Uint8)mUIBlueSlider->value(); + Col.Blue = (Uint8)mUIBlueSlider->getValue(); mUIBaseColor->getBackground()->setColor( Col ); - mUIBlueTxt->setText( String::toStr( (Uint32)mUIBlueSlider->value() ) ); + mUIBlueTxt->setText( String::toStr( (Uint32)mUIBlueSlider->getValue() ) ); if ( NULL != mUIMap->GetSelectedLight() ) { RGB lCol( mUIMap->GetSelectedLight()->Color() ); @@ -757,7 +757,7 @@ void MapEditor::FillSubTextureList() { } } - mSubTextureList->verticalScrollBar()->clickStep( 8.f / (Float)mSubTextureList->count() ); + mSubTextureList->verticalScrollBar()->setClickStep( 8.f / (Float)mSubTextureList->count() ); } void MapEditor::OnSubTextureChange( const UIEvent * Event ) { @@ -790,8 +790,8 @@ void MapEditor::MapCreated() { FillSGCombo(); FillGotyList(); - mMapHScroll->value( 0 ); - mMapVScroll->value( 0 ); + mMapHScroll->setValue( 0 ); + mMapVScroll->setValue( 0 ); OnMapSizeChange( NULL ); mUIMap->ClearLights(); @@ -805,12 +805,12 @@ void MapEditor::OnMapSizeChange( const UIEvent *Event ) { Vector2i v( mUIMap->Map()->GetMaxOffset() ); - mMapHScroll->minValue( 0 ); - mMapHScroll->maxValue( v.x ); - mMapHScroll->clickStep( mUIMap->Map()->TileSize().getWidth() * mUIMap->Map()->Scale() ); - mMapVScroll->minValue( 0 ); - mMapVScroll->maxValue( v.y ); - mMapVScroll->clickStep( mUIMap->Map()->TileSize().getHeight() * mUIMap->Map()->Scale() ); + mMapHScroll->setMinValue( 0 ); + mMapHScroll->setMaxValue( v.x ); + mMapHScroll->setClickStep( mUIMap->Map()->TileSize().getWidth() * mUIMap->Map()->Scale() ); + mMapVScroll->setMinValue( 0 ); + mMapVScroll->setMaxValue( v.y ); + mMapVScroll->setClickStep( mUIMap->Map()->TileSize().getHeight() * mUIMap->Map()->Scale() ); } void MapEditor::OnScrollMapH( const UIEvent * Event ) { @@ -821,7 +821,7 @@ void MapEditor::OnScrollMapH( const UIEvent * Event ) { Vector2f Off = mUIMap->Map()->Offset(); - Off.x = -Scr->value(); + Off.x = -Scr->getValue(); mUIMap->Map()->Offset( Off ) ; } @@ -831,15 +831,15 @@ void MapEditor::OnScrollMapV( const UIEvent * Event ) { Vector2f Off = mUIMap->Map()->Offset(); - Off.y = -Scr->value(); + Off.y = -Scr->getValue(); mUIMap->Map()->Offset( Off ) ; } void MapEditor::UpdateScroll() { mMouseScrolling = true; - mMapHScroll->value( -mUIMap->Map()->Offset().x ); - mMapVScroll->value( -mUIMap->Map()->Offset().y ); + mMapHScroll->setValue( -mUIMap->Map()->Offset().x ); + mMapVScroll->setValue( -mUIMap->Map()->Offset().y ); mMouseScrolling = false; } @@ -879,7 +879,7 @@ void MapEditor::FileMenuClick( const UIEvent * Event ) { if ( !Event->getControl()->isType( UI_TYPE_MENUITEM ) ) return; - const String& txt = reinterpret_cast ( Event->getControl() )->text(); + const String& txt = reinterpret_cast ( Event->getControl() )->getText(); if ( "New..." == txt ) { CreateNewMap(); @@ -930,14 +930,14 @@ void MapEditor::ViewMenuClick( const UIEvent * Event ) { if ( !Event->getControl()->isType( UI_TYPE_MENUITEM ) ) return; - const String& txt = reinterpret_cast ( Event->getControl() )->text(); + const String& txt = reinterpret_cast ( Event->getControl() )->getText(); if ( "Show Grid" == txt ) { - mUIMap->Map()->DrawGrid( reinterpret_cast ( Event->getControl() )->active() ); + mUIMap->Map()->DrawGrid( reinterpret_cast ( Event->getControl() )->isActive() ); } else if ( "Mark Tile Over" == txt ) { - mUIMap->Map()->DrawTileOver( reinterpret_cast ( Event->getControl() )->active() ); + mUIMap->Map()->DrawTileOver( reinterpret_cast ( Event->getControl() )->isActive() ); } else if ( "Show Blocked" == txt ) { - mUIMap->Map()->ShowBlocked( reinterpret_cast ( Event->getControl() )->active() ); + mUIMap->Map()->ShowBlocked( reinterpret_cast ( Event->getControl() )->isActive() ); } else if ( "Zoom In" == txt ) { ZoomIn(); } else if ( "Zoom Out" == txt ) { @@ -1009,7 +1009,7 @@ void MapEditor::MapMenuClick( const UIEvent * Event ) { if ( !Event->getControl()->isType( UI_TYPE_MENUITEM ) ) return; - const String& txt = reinterpret_cast ( Event->getControl() )->text(); + const String& txt = reinterpret_cast ( Event->getControl() )->getText(); if ( "New Texture Atlas..." == txt ) { UIWindow * tWin = mTheme->createWindow( NULL, Sizei( 1024, 768 ), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON | UI_WIN_DRAGABLE_CONTAINER, Sizei( 1024, 768 ) ); @@ -1034,7 +1034,7 @@ void MapEditor::LayerMenuClick( const UIEvent * Event ) { if ( !Event->getControl()->isType( UI_TYPE_MENUITEM ) ) return; - const String& txt = reinterpret_cast ( Event->getControl() )->text(); + const String& txt = reinterpret_cast ( Event->getControl() )->getText(); if ( "Add Tile Layer..." == txt ) { eeNew( UIMapLayerNew, ( mUIMap, MAP_LAYER_TILED, cb::Make1( this, &MapEditor::OnLayerAdd ) ) ); @@ -1167,9 +1167,9 @@ void MapEditor::OnLayerSelect( const UIEvent * Event ) { mUIMap->CurLayer( mCurLayer ); - mLayerChkVisible->active( mCurLayer->Visible() ); + mLayerChkVisible->setActive( mCurLayer->Visible() ); - mLayerChkLights->active( mCurLayer->LightsEnabled() ); + mLayerChkLights->setActive( mCurLayer->LightsEnabled() ); } } @@ -1331,9 +1331,9 @@ void MapEditor::OnMapMouseDown( const UIEvent * Event ) { } void MapEditor::SetViewOptions() { - mChkShowGrid->active( mUIMap->Map()->DrawGrid() ? true : false ); - mChkMarkTileOver->active( mUIMap->Map()->DrawTileOver() ? true : false ); - mChkShowBlocked->active( mUIMap->Map()->ShowBlocked() ? true : false ); + mChkShowGrid->setActive( mUIMap->Map()->DrawGrid() ? true : false ); + mChkMarkTileOver->setActive( mUIMap->Map()->DrawTileOver() ? true : false ); + mChkShowBlocked->setActive( mUIMap->Map()->ShowBlocked() ? true : false ); } }} diff --git a/src/eepp/gaming/mapeditor/maplayerproperties.cpp b/src/eepp/gaming/mapeditor/maplayerproperties.cpp index 61f8c22e2..9d7e82875 100644 --- a/src/eepp/gaming/mapeditor/maplayerproperties.cpp +++ b/src/eepp/gaming/mapeditor/maplayerproperties.cpp @@ -15,7 +15,7 @@ MapLayerProperties::MapLayerProperties( MapLayer * Map, RefreshLayerListCb Cb ) return; } - mUITheme = UIThemeManager::instance()->defaultTheme(); + mUITheme = UIThemeManager::instance()->getDefaultTheme(); if ( NULL == mUITheme ) return; @@ -40,11 +40,11 @@ MapLayerProperties::MapLayerProperties( MapLayer * Map, RefreshLayerListCb Cb ) OKButton->setPosition( mUIWindow->getContainer()->getSize().getWidth() - OKButton->getSize().getWidth() - 4, mUIWindow->getContainer()->getSize().getHeight() - OKButton->getSize().getHeight() - 4 ); OKButton->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &MapLayerProperties::OKClick ) ); - OKButton->text( "OK" ); + OKButton->setText( "OK" ); UIPushButton * CancelButton = mUITheme->createPushButton( mUIWindow->getContainer(), OKButton->getSize(), Vector2i( OKButton->getPosition().x - OKButton->getSize().getWidth() - 4, OKButton->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mUITheme->getIconByName( "cancel" ) ); CancelButton->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &MapLayerProperties::CancelClick ) ); - CancelButton->text( "Cancel" ); + CancelButton->setText( "Cancel" ); UIGenericGrid::CreateParams GridParams; GridParams.setParent( mUIWindow->getContainer() ); @@ -67,16 +67,16 @@ MapLayerProperties::MapLayerProperties( MapLayer * Map, RefreshLayerListCb Cb ) UIPushButton * AddButton = mUITheme->createPushButton( mUIWindow->getContainer(), Sizei(24,21), Pos, UI_CONTROL_ALIGN_CENTER | UI_AUTO_SIZE | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP, mUITheme->getIconByName( "add" ) ); AddButton->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &MapLayerProperties::AddCellClick ) ); - if ( NULL == AddButton->icon()->subTexture() ) - AddButton->text( "+" ); + if ( NULL == AddButton->getIcon()->subTexture() ) + AddButton->setText( "+" ); Pos.y += AddButton->getSize().getHeight() + 5; UIPushButton * RemoveButton = mUITheme->createPushButton( mUIWindow->getContainer(), Sizei(24,21), Pos, UI_CONTROL_ALIGN_CENTER | UI_AUTO_SIZE | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP, mUITheme->getIconByName( "remove" ) ); RemoveButton->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &MapLayerProperties::RemoveCellClick ) ); - if ( NULL == RemoveButton->icon()->subTexture() ) - RemoveButton->text( "-" ); + if ( NULL == RemoveButton->getIcon()->subTexture() ) + RemoveButton->setText( "-" ); CreateGridElems(); diff --git a/src/eepp/gaming/mapeditor/mapobjectproperties.cpp b/src/eepp/gaming/mapeditor/mapobjectproperties.cpp index d10b1de4c..cc1767864 100644 --- a/src/eepp/gaming/mapeditor/mapobjectproperties.cpp +++ b/src/eepp/gaming/mapeditor/mapobjectproperties.cpp @@ -14,7 +14,7 @@ MapObjectProperties::MapObjectProperties( GameObjectObject * Obj ) : return; } - mUITheme = UIThemeManager::instance()->defaultTheme(); + mUITheme = UIThemeManager::instance()->getDefaultTheme(); if ( NULL == mUITheme ) return; @@ -44,11 +44,11 @@ MapObjectProperties::MapObjectProperties( GameObjectObject * Obj ) : OKButton->setPosition( mUIWindow->getContainer()->getSize().getWidth() - OKButton->getSize().getWidth() - 4, mUIWindow->getContainer()->getSize().getHeight() - OKButton->getSize().getHeight() - 4 ); OKButton->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &MapObjectProperties::OKClick ) ); - OKButton->text( "OK" ); + OKButton->setText( "OK" ); UIPushButton * CancelButton = mUITheme->createPushButton( mUIWindow->getContainer(), OKButton->getSize(), Vector2i( OKButton->getPosition().x - OKButton->getSize().getWidth() - 4, OKButton->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mUITheme->getIconByName( "cancel" ) ); CancelButton->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &MapObjectProperties::CancelClick ) ); - CancelButton->text( "Cancel" ); + CancelButton->setText( "Cancel" ); UIGenericGrid::CreateParams GridParams; GridParams.setParent( mUIWindow->getContainer() ); @@ -71,16 +71,16 @@ MapObjectProperties::MapObjectProperties( GameObjectObject * Obj ) : UIPushButton * AddButton = mUITheme->createPushButton( mUIWindow->getContainer(), Sizei(24,21), Pos, UI_CONTROL_ALIGN_CENTER | UI_AUTO_SIZE | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP, mUITheme->getIconByName( "add" ) ); AddButton->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &MapObjectProperties::AddCellClick ) ); - if ( NULL == AddButton->icon()->subTexture() ) - AddButton->text( "+" ); + if ( NULL == AddButton->getIcon()->subTexture() ) + AddButton->setText( "+" ); Pos.y += AddButton->getSize().getHeight() + 5; UIPushButton * RemoveButton = mUITheme->createPushButton( mUIWindow->getContainer(), Sizei(24,21), Pos, UI_CONTROL_ALIGN_CENTER | UI_AUTO_SIZE | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP, mUITheme->getIconByName( "remove" ) ); RemoveButton->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &MapObjectProperties::RemoveCellClick ) ); - if ( NULL == RemoveButton->icon()->subTexture() ) - RemoveButton->text( "-" ); + if ( NULL == RemoveButton->getIcon()->subTexture() ) + RemoveButton->setText( "-" ); CreateGridElems(); diff --git a/src/eepp/gaming/mapeditor/tilemapproperties.cpp b/src/eepp/gaming/mapeditor/tilemapproperties.cpp index 246a5a321..24e46c61e 100644 --- a/src/eepp/gaming/mapeditor/tilemapproperties.cpp +++ b/src/eepp/gaming/mapeditor/tilemapproperties.cpp @@ -13,7 +13,7 @@ TileMapProperties::TileMapProperties( TileMap * Map ) : return; } - mUITheme = UIThemeManager::instance()->defaultTheme(); + mUITheme = UIThemeManager::instance()->getDefaultTheme(); if ( NULL == mUITheme ) return; @@ -43,24 +43,24 @@ TileMapProperties::TileMapProperties( TileMap * Map ) : Txt = mUITheme->createTextBox( "Red Color:", mUIWindow->getContainer(), Sizei(), Vector2i( mUIBaseColor->getPosition().x + mUIBaseColor->getSize().getWidth() + 4, mUIBaseColor->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); mUIRedSlider = mUITheme->createSlider( mUIWindow->getContainer(), Sizei( 255, 20 ), Vector2i( Txt->getPosition().x + Txt->getSize().getWidth() + 16, Txt->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); - mUIRedSlider->maxValue( 255 ); - mUIRedSlider->value( mMap->BaseColor().r() ); + mUIRedSlider->setMaxValue( 255 ); + mUIRedSlider->setValue( mMap->BaseColor().r() ); mUIRedSlider->addEventListener( UIEvent::EventOnValueChange, cb::Make1( this, &TileMapProperties::OnRedChange ) ); mUIRedTxt = mUITheme->createTextBox( String::toStr( (Uint32)mMap->BaseColor().r() ), mUIWindow->getContainer(), Sizei(), Vector2i( mUIRedSlider->getPosition().x + mUIRedSlider->getSize().getWidth() + 4, mUIRedSlider->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); Txt = mUITheme->createTextBox( "Green Color:", mUIWindow->getContainer(), Sizei(), Vector2i( mUIBaseColor->getPosition().x + mUIBaseColor->getSize().getWidth() + 4, mUIRedSlider->getPosition().y + mUIRedSlider->getSize().getHeight() + 4 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); mUIGreenSlider = mUITheme->createSlider( mUIWindow->getContainer(), Sizei( 255, 20 ), Vector2i( mUIRedSlider->getPosition().x, Txt->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); - mUIGreenSlider->maxValue( 255 ); - mUIGreenSlider->value( mMap->BaseColor().g() ); + mUIGreenSlider->setMaxValue( 255 ); + mUIGreenSlider->setValue( mMap->BaseColor().g() ); mUIGreenSlider->addEventListener( UIEvent::EventOnValueChange, cb::Make1( this, &TileMapProperties::OnGreenChange ) ); mUIGreenTxt = mUITheme->createTextBox( String::toStr( (Uint32)mMap->BaseColor().g() ), mUIWindow->getContainer(), Sizei(), Vector2i( mUIGreenSlider->getPosition().x + mUIGreenSlider->getSize().getWidth() + 4, mUIGreenSlider->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); Txt = mUITheme->createTextBox( "Blue Color:", mUIWindow->getContainer(), Sizei(), Vector2i( mUIBaseColor->getPosition().x + mUIBaseColor->getSize().getWidth() + 4, mUIGreenSlider->getPosition().y + mUIGreenSlider->getSize().getHeight() + 4 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); mUIBlueSlider = mUITheme->createSlider( mUIWindow->getContainer(), Sizei( 255, 20 ), Vector2i( mUIRedSlider->getPosition().x, Txt->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); - mUIBlueSlider->maxValue( 255 ); - mUIBlueSlider->value( mMap->BaseColor().b() ); + mUIBlueSlider->setMaxValue( 255 ); + mUIBlueSlider->setValue( mMap->BaseColor().b() ); mUIBlueSlider->addEventListener( UIEvent::EventOnValueChange, cb::Make1( this, &TileMapProperties::OnBlueChange ) ); mUIBlueTxt = mUITheme->createTextBox( String::toStr( (Uint32)mMap->BaseColor().b() ), mUIWindow->getContainer(), Sizei(), Vector2i( mUIBlueSlider->getPosition().x + mUIBlueSlider->getSize().getWidth() + 4, mUIBlueSlider->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); @@ -74,11 +74,11 @@ TileMapProperties::TileMapProperties( TileMap * Map ) : OKButton->setPosition( mUIWindow->getContainer()->getSize().getWidth() - OKButton->getSize().getWidth() - 4, mUIWindow->getContainer()->getSize().getHeight() - OKButton->getSize().getHeight() - 4 ); OKButton->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &TileMapProperties::OKClick ) ); - OKButton->text( "OK" ); + OKButton->setText( "OK" ); UIPushButton * CancelButton = mUITheme->createPushButton( mUIWindow->getContainer(), OKButton->getSize(), Vector2i( OKButton->getPosition().x - OKButton->getSize().getWidth() - 4, OKButton->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mUITheme->getIconByName( "cancel" ) ); CancelButton->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &TileMapProperties::CancelClick ) ); - CancelButton->text( "Cancel" ); + CancelButton->setText( "Cancel" ); UIGenericGrid::CreateParams GridParams; GridParams.setParent( mUIWindow->getContainer() ); @@ -101,16 +101,16 @@ TileMapProperties::TileMapProperties( TileMap * Map ) : UIPushButton * AddButton = mUITheme->createPushButton( mUIWindow->getContainer(), Sizei(24,21), Pos, UI_CONTROL_ALIGN_CENTER | UI_AUTO_SIZE | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP, mUITheme->getIconByName( "add" ) ); AddButton->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &TileMapProperties::AddCellClick ) ); - if ( NULL == AddButton->icon()->subTexture() ) - AddButton->text( "+" ); + if ( NULL == AddButton->getIcon()->subTexture() ) + AddButton->setText( "+" ); Pos.y += AddButton->getSize().getHeight() + 5; UIPushButton * RemoveButton = mUITheme->createPushButton( mUIWindow->getContainer(), Sizei(24,21), Pos, UI_CONTROL_ALIGN_CENTER | UI_AUTO_SIZE | UI_ANCHOR_RIGHT | UI_ANCHOR_TOP, mUITheme->getIconByName( "remove" ) ); RemoveButton->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &TileMapProperties::RemoveCellClick ) ); - if ( NULL == RemoveButton->icon()->subTexture() ) - RemoveButton->text( "-" ); + if ( NULL == RemoveButton->getIcon()->subTexture() ) + RemoveButton->setText( "-" ); CreateGridElems(); @@ -123,9 +123,9 @@ TileMapProperties::~TileMapProperties() { void TileMapProperties::OnRedChange( const UIEvent * Event ) { ColorA Col = mUIBaseColor->getBackground()->getColor(); - Col.Red = (Uint8)mUIRedSlider->value(); + Col.Red = (Uint8)mUIRedSlider->getValue(); mUIBaseColor->getBackground()->setColor( Col ); - mUIRedTxt->setText( String::toStr( (Int32)mUIRedSlider->value() ) ); + mUIRedTxt->setText( String::toStr( (Int32)mUIRedSlider->getValue() ) ); ColorA MapCol = mMap->BaseColor(); MapCol.Red = Col.Red; @@ -134,9 +134,9 @@ void TileMapProperties::OnRedChange( const UIEvent * Event ) { void TileMapProperties::OnGreenChange( const UIEvent * Event ) { ColorA Col = mUIBaseColor->getBackground()->getColor(); - Col.Green = (Uint8)mUIGreenSlider->value(); + Col.Green = (Uint8)mUIGreenSlider->getValue(); mUIBaseColor->getBackground()->setColor( Col ); - mUIGreenTxt->setText( String::toStr( (Uint32)mUIGreenSlider->value() ) ); + mUIGreenTxt->setText( String::toStr( (Uint32)mUIGreenSlider->getValue() ) ); ColorA MapCol = mMap->BaseColor(); MapCol.Green = Col.Green; @@ -145,9 +145,9 @@ void TileMapProperties::OnGreenChange( const UIEvent * Event ) { void TileMapProperties::OnBlueChange( const UIEvent * Event ) { ColorA Col = mUIBaseColor->getBackground()->getColor(); - Col.Blue = (Uint8)mUIBlueSlider->value(); + Col.Blue = (Uint8)mUIBlueSlider->getValue(); mUIBaseColor->getBackground()->setColor( Col ); - mUIBlueTxt->setText( String::toStr( (Uint32)mUIBlueSlider->value() ) ); + mUIBlueTxt->setText( String::toStr( (Uint32)mUIBlueSlider->getValue() ) ); ColorA MapCol = mMap->BaseColor(); MapCol.Blue = Col.Blue; diff --git a/src/eepp/gaming/mapeditor/uigotypenew.cpp b/src/eepp/gaming/mapeditor/uigotypenew.cpp index 840f6b4a7..88db36733 100644 --- a/src/eepp/gaming/mapeditor/uigotypenew.cpp +++ b/src/eepp/gaming/mapeditor/uigotypenew.cpp @@ -9,7 +9,7 @@ UIGOTypeNew::UIGOTypeNew( cb::Callback2 Cb ) : mUIInput( NULL ), mCb( Cb ) { - mUITheme = UIThemeManager::instance()->defaultTheme(); + mUITheme = UIThemeManager::instance()->getDefaultTheme(); if ( NULL == mUITheme ) return; @@ -30,11 +30,11 @@ UIGOTypeNew::UIGOTypeNew( cb::Callback2 Cb ) : OKButton->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &UIGOTypeNew::OKClick ) ); mUIInput->addEventListener( UIEvent::EventOnPressEnter, cb::Make1( this, &UIGOTypeNew::OKClick ) ); - OKButton->text( "Add" ); + OKButton->setText( "Add" ); UIPushButton * CancelButton = mUITheme->createPushButton( mUIWindow->getContainer(), OKButton->getSize(), Vector2i( OKButton->getPosition().x - OKButton->getSize().getWidth() - 4, OKButton->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mUITheme->getIconByName( "cancel" ) ); CancelButton->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &UIGOTypeNew::CancelClick ) ); - CancelButton->text( "Cancel" ); + CancelButton->setText( "Cancel" ); mUIWindow->center(); mUIWindow->show(); diff --git a/src/eepp/gaming/mapeditor/uimap.cpp b/src/eepp/gaming/mapeditor/uimap.cpp index 0249f97df..d8b5b1c8a 100644 --- a/src/eepp/gaming/mapeditor/uimap.cpp +++ b/src/eepp/gaming/mapeditor/uimap.cpp @@ -547,7 +547,7 @@ void UIMap::ObjItemClick( const UIEvent * Event ) { return; if ( NULL != mSelObj && NULL != mCurLayer && mCurLayer->Type() == MAP_LAYER_OBJECT && mSelObj->Layer() == mCurLayer ) { - const String& txt = reinterpret_cast ( Event->getControl() )->text(); + const String& txt = reinterpret_cast ( Event->getControl() )->getText(); MapObjectLayer * tLayer = reinterpret_cast( mCurLayer ); @@ -567,15 +567,15 @@ void UIMap::ObjItemClick( const UIEvent * Event ) { void UIMap::CreateObjPopUpMenu() { UIPopUpMenu * Menu = mTheme->createPopUpMenu(); - Menu->Add( "Duplicate Object" ); - Menu->Add( "Remove Object" ); - Menu->AddSeparator(); - Menu->Add( "Object Properties..." ); + Menu->add( "Duplicate Object" ); + Menu->add( "Remove Object" ); + Menu->addSeparator(); + Menu->add( "Object Properties..." ); Menu->addEventListener( UIEvent::EventOnItemClicked, cb::Make1( this, &UIMap::ObjItemClick ) ); if ( Menu->show() ) { Vector2i Pos = UIManager::instance()->getInput()->getMousePos(); - UIMenu::FixMenuPos( Pos , Menu ); + UIMenu::fixMenuPos( Pos , Menu ); Menu->setPosition( Pos ); } } diff --git a/src/eepp/gaming/mapeditor/uimaplayernew.cpp b/src/eepp/gaming/mapeditor/uimaplayernew.cpp index 9f5afde1f..2408d6d3a 100644 --- a/src/eepp/gaming/mapeditor/uimaplayernew.cpp +++ b/src/eepp/gaming/mapeditor/uimaplayernew.cpp @@ -11,7 +11,7 @@ UIMapLayerNew::UIMapLayerNew( UIMap * Map, EE_LAYER_TYPE Type, NewLayerCb newLay mUIWindow( NULL ), mLayer( NULL ) { - mTheme = UIThemeManager::instance()->defaultTheme(); + mTheme = UIThemeManager::instance()->getDefaultTheme(); if ( NULL == mTheme ) return; @@ -37,11 +37,11 @@ UIMapLayerNew::UIMapLayerNew( UIMap * Map, EE_LAYER_TYPE Type, NewLayerCb newLay OKButton->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &UIMapLayerNew::OKClick ) ); mUILayerName->addEventListener( UIEvent::EventOnPressEnter, cb::Make1( this, &UIMapLayerNew::OKClick ) ); - OKButton->text( "Add" ); + OKButton->setText( "Add" ); UIPushButton * CancelButton = mTheme->createPushButton( mUIWindow->getContainer(), OKButton->getSize(), Vector2i( OKButton->getPosition().x - OKButton->getSize().getWidth() - 4, OKButton->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mTheme->getIconByName( "cancel" ) ); CancelButton->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &UIMapLayerNew::CancelClick ) ); - CancelButton->text( "Cancel" ); + CancelButton->setText( "Cancel" ); mUIWindow->addEventListener( UIEvent::EventKeyUp, cb::Make1( this, &UIMapLayerNew::OnKeyUp ) ); diff --git a/src/eepp/gaming/mapeditor/uimapnew.cpp b/src/eepp/gaming/mapeditor/uimapnew.cpp index 30591c06f..c82ff381c 100644 --- a/src/eepp/gaming/mapeditor/uimapnew.cpp +++ b/src/eepp/gaming/mapeditor/uimapnew.cpp @@ -12,7 +12,7 @@ UIMapNew::UIMapNew( UIMap * Map, cb::Callback0 NewMapCb, bool ResizeMap ) mNewMapCb( NewMapCb ), mResizeMap( ResizeMap ) { - mTheme = UIThemeManager::instance()->defaultTheme(); + mTheme = UIThemeManager::instance()->getDefaultTheme(); if ( NULL == mTheme ) return; @@ -34,19 +34,19 @@ UIMapNew::UIMapNew( UIMap * Map, cb::Callback0 NewMapCb, bool ResizeMap ) Txt = mTheme->createTextBox( "Width:", mUIWindow->getContainer(), Sizei( 46, 24 ), Vector2i( Txt->getPosition().x + DistFromTitle, Txt->getPosition().y + DistFromTitle ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW ); mUIMapWidth = mTheme->createSpinBox( mUIWindow->getContainer(), Sizei( 53, 24 ), Vector2i( Txt->getPosition().x + Txt->getSize().getWidth(), Txt->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS | UI_TEXT_SELECTION_ENABLED, 100, false ); - mUIMapWidth->minValue(1); + mUIMapWidth->setMinValue(1); if ( ResizeMap ) { - mUIMapWidth->value( mUIMap->Map()->Size().getWidth() ); + mUIMapWidth->setValue( mUIMap->Map()->Size().getWidth() ); } Txt = mTheme->createTextBox( "Height:", mUIWindow->getContainer(), Sizei( 46, 24 ), Vector2i( Txt->getPosition().x, Txt->getPosition().y + Txt->getSize().getHeight() + 8 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW ); mUIMapHeight = mTheme->createSpinBox( mUIWindow->getContainer(), Sizei( 53, 24 ), Vector2i( Txt->getPosition().x + Txt->getSize().getWidth(), Txt->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS | UI_TEXT_SELECTION_ENABLED, 100, false ); - mUIMapHeight->minValue(1); + mUIMapHeight->setMinValue(1); if ( ResizeMap ) { - mUIMapHeight->value( mUIMap->Map()->Size().getHeight() ); + mUIMapHeight->setValue( mUIMap->Map()->Size().getHeight() ); } Txt = mTheme->createTextBox( "Tile Size", mUIWindow->getContainer(), Sizei(), Vector2i( mUIWindow->getContainer()->getSize().getWidth() / 2, InitialY ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); @@ -54,25 +54,25 @@ UIMapNew::UIMapNew( UIMap * Map, cb::Callback0 NewMapCb, bool ResizeMap ) Txt = mTheme->createTextBox( "Width:", mUIWindow->getContainer(), Sizei( 46, 24 ), Vector2i( Txt->getPosition().x + DistFromTitle, Txt->getPosition().y + DistFromTitle ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW ); mUIMapTWidth = mTheme->createSpinBox( mUIWindow->getContainer(), Sizei( 53, 24 ), Vector2i( Txt->getPosition().x + Txt->getSize().getWidth(), Txt->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS | UI_TEXT_SELECTION_ENABLED, 32, false ); - mUIMapTWidth->minValue(1); + mUIMapTWidth->setMinValue(1); if ( ResizeMap ) { - mUIMapTWidth->value( mUIMap->Map()->TileSize().getWidth() ); + mUIMapTWidth->setValue( mUIMap->Map()->TileSize().getWidth() ); } Txt = mTheme->createTextBox( "Height:", mUIWindow->getContainer(), Sizei( 46, 24 ), Vector2i( Txt->getPosition().x, Txt->getPosition().y + Txt->getSize().getHeight() + 8 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW ); mUIMapTHeight = mTheme->createSpinBox( mUIWindow->getContainer(), Sizei( 53, 24 ), Vector2i( Txt->getPosition().x + Txt->getSize().getWidth(), Txt->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS | UI_TEXT_SELECTION_ENABLED, 32, false ); - mUIMapTHeight->minValue(1); + mUIMapTHeight->setMinValue(1); if ( ResizeMap ) { - mUIMapTHeight->value( mUIMap->Map()->TileSize().getHeight() ); + mUIMapTHeight->setValue( mUIMap->Map()->TileSize().getHeight() ); } Txt = mTheme->createTextBox( "Max Layers", mUIWindow->getContainer(), Sizei(), Vector2i( 16, mUIMapTHeight->getPosition().y + mUIMapTHeight->getSize().getHeight() + 8 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); mUIMapMaxLayers = mTheme->createSpinBox( mUIWindow->getContainer(), Sizei( 53, 24 ), Vector2i( Txt->getPosition().x + DistFromTitle, Txt->getPosition().y + DistFromTitle ), UI_CONTROL_DEFAULT_FLAGS | UI_TEXT_SELECTION_ENABLED, 8, false ); - mUIMapMaxLayers->maxValue( 32 ); + mUIMapMaxLayers->setMaxValue( 32 ); Txt = mTheme->createTextBox( "Map Flags:", mUIWindow->getContainer(), Sizei(), Vector2i( Txt->getPosition().x, mUIMapMaxLayers->getPosition().y + mUIMapMaxLayers->getSize().getHeight() + 8 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); @@ -129,51 +129,51 @@ UIMapNew::UIMapNew( UIMap * Map, cb::Callback0 NewMapCb, bool ResizeMap ) Txt = mTheme->createTextBox( "Red Color:", mUIWindow->getContainer(), Sizei(), Vector2i( mUIBaseColor->getPosition().x + mUIBaseColor->getSize().getWidth() + 4, mUIBaseColor->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); mUIRedSlider = mTheme->createSlider( mUIWindow->getContainer(), Sizei( 128, 20 ), Vector2i( Txt->getPosition().x + Txt->getSize().getWidth() + 16, Txt->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); - mUIRedSlider->maxValue( 255 ); - mUIRedSlider->value( 255 ); + mUIRedSlider->setMaxValue( 255 ); + mUIRedSlider->setValue( 255 ); mUIRedSlider->addEventListener( UIEvent::EventOnValueChange, cb::Make1( this, &UIMapNew::OnRedChange ) ); mUIRedTxt = mTheme->createTextBox( String::toStr( 255 ), mUIWindow->getContainer(), Sizei(), Vector2i( mUIRedSlider->getPosition().x + mUIRedSlider->getSize().getWidth() + 4, mUIRedSlider->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); if ( ResizeMap ) { - mUIRedSlider->value( mUIMap->Map()->BaseColor().r() ); + mUIRedSlider->setValue( mUIMap->Map()->BaseColor().r() ); } Txt = mTheme->createTextBox( "Green Color:", mUIWindow->getContainer(), Sizei(), Vector2i( mUIBaseColor->getPosition().x + mUIBaseColor->getSize().getWidth() + 4, mUIRedSlider->getPosition().y + mUIRedSlider->getSize().getHeight() + 4 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); mUIGreenSlider = mTheme->createSlider( mUIWindow->getContainer(), Sizei( 128, 20 ), Vector2i( mUIRedSlider->getPosition().x, Txt->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); - mUIGreenSlider->maxValue( 255 ); - mUIGreenSlider->value( 255 ); + mUIGreenSlider->setMaxValue( 255 ); + mUIGreenSlider->setValue( 255 ); mUIGreenSlider->addEventListener( UIEvent::EventOnValueChange, cb::Make1( this, &UIMapNew::OnGreenChange ) ); mUIGreenTxt = mTheme->createTextBox( String::toStr( 255 ), mUIWindow->getContainer(), Sizei(), Vector2i( mUIGreenSlider->getPosition().x + mUIGreenSlider->getSize().getWidth() + 4, mUIGreenSlider->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); if ( ResizeMap ) { - mUIGreenSlider->value( mUIMap->Map()->BaseColor().g() ); + mUIGreenSlider->setValue( mUIMap->Map()->BaseColor().g() ); } Txt = mTheme->createTextBox( "Blue Color:", mUIWindow->getContainer(), Sizei(), Vector2i( mUIBaseColor->getPosition().x + mUIBaseColor->getSize().getWidth() + 4, mUIGreenSlider->getPosition().y + mUIGreenSlider->getSize().getHeight() + 4 ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); mUIBlueSlider = mTheme->createSlider( mUIWindow->getContainer(), Sizei( 128, 20 ), Vector2i( mUIRedSlider->getPosition().x, Txt->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE ); - mUIBlueSlider->maxValue( 255 ); - mUIBlueSlider->value( 255 ); + mUIBlueSlider->setMaxValue( 255 ); + mUIBlueSlider->setValue( 255 ); mUIBlueSlider->addEventListener( UIEvent::EventOnValueChange, cb::Make1( this, &UIMapNew::OnBlueChange ) ); mUIBlueTxt = mTheme->createTextBox( String::toStr( 255 ), mUIWindow->getContainer(), Sizei(), Vector2i( mUIBlueSlider->getPosition().x + mUIBlueSlider->getSize().getWidth() + 4, mUIBlueSlider->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS | UI_DRAW_SHADOW | UI_AUTO_SIZE ); if ( ResizeMap ) { - mUIBlueSlider->value( mUIMap->Map()->BaseColor().b() ); + mUIBlueSlider->setValue( mUIMap->Map()->BaseColor().b() ); } UIPushButton * OKButton = mTheme->createPushButton( mUIWindow->getContainer(), Sizei( 80, 22 ), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mTheme->getIconByName( "ok" ) ); OKButton->setPosition( mUIWindow->getContainer()->getSize().getWidth() - OKButton->getSize().getWidth() - 4, mUIWindow->getContainer()->getSize().getHeight() - OKButton->getSize().getHeight() - 4 ); OKButton->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &UIMapNew::OKClick ) ); - OKButton->text( "OK" ); + OKButton->setText( "OK" ); UIPushButton * CancelButton = mTheme->createPushButton( mUIWindow->getContainer(), OKButton->getSize(), Vector2i( OKButton->getPosition().x - OKButton->getSize().getWidth() - 4, OKButton->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mTheme->getIconByName( "cancel" ) ); CancelButton->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &UIMapNew::CancelClick ) ); - CancelButton->text( "Cancel" ); + CancelButton->setText( "Cancel" ); mUIWindow->center(); mUIWindow->show(); @@ -184,31 +184,31 @@ UIMapNew::~UIMapNew() { void UIMapNew::OnRedChange( const UIEvent * Event ) { ColorA Col = mUIBaseColor->getBackground()->getColor(); - Col.Red = (Uint8)mUIRedSlider->value(); + Col.Red = (Uint8)mUIRedSlider->getValue(); mUIBaseColor->getBackground()->setColor( Col ); - mUIRedTxt->setText( String::toStr( (Int32)mUIRedSlider->value() ) ); + mUIRedTxt->setText( String::toStr( (Int32)mUIRedSlider->getValue() ) ); } void UIMapNew::OnGreenChange( const UIEvent * Event ) { ColorA Col = mUIBaseColor->getBackground()->getColor(); - Col.Green = (Uint8)mUIGreenSlider->value(); + Col.Green = (Uint8)mUIGreenSlider->getValue(); mUIBaseColor->getBackground()->setColor( Col ); - mUIGreenTxt->setText( String::toStr( (Uint32)mUIGreenSlider->value() ) ); + mUIGreenTxt->setText( String::toStr( (Uint32)mUIGreenSlider->getValue() ) ); } void UIMapNew::OnBlueChange( const UIEvent * Event ) { ColorA Col = mUIBaseColor->getBackground()->getColor(); - Col.Blue = (Uint8)mUIBlueSlider->value(); + Col.Blue = (Uint8)mUIBlueSlider->getValue(); mUIBaseColor->getBackground()->setColor( Col ); - mUIBlueTxt->setText( String::toStr( (Uint32)mUIBlueSlider->value() ) ); + mUIBlueTxt->setText( String::toStr( (Uint32)mUIBlueSlider->getValue() ) ); } void UIMapNew::OKClick( const UIEvent * Event ) { - Int32 w = static_cast( mUIMapWidth->value() ); - Int32 h = static_cast( mUIMapHeight->value() ); - Int32 tw = static_cast( mUIMapTWidth->value() ); - Int32 th = static_cast( mUIMapTHeight->value() ); - Int32 ml = static_cast( mUIMapMaxLayers->value() ); + Int32 w = static_cast( mUIMapWidth->getValue() ); + Int32 h = static_cast( mUIMapHeight->getValue() ); + Int32 tw = static_cast( mUIMapTWidth->getValue() ); + Int32 th = static_cast( mUIMapTHeight->getValue() ); + Int32 ml = static_cast( mUIMapMaxLayers->getValue() ); Uint32 Flags = MAP_EDITOR_DEFAULT_FLAGS; diff --git a/src/eepp/gaming/tilemap.cpp b/src/eepp/gaming/tilemap.cpp index cde04dbed..fdd7a946e 100644 --- a/src/eepp/gaming/tilemap.cpp +++ b/src/eepp/gaming/tilemap.cpp @@ -1379,7 +1379,7 @@ std::vector TileMap::GetTextureAtlases() { //! Ugly ugly ugly, but i don't see another way Uint32 Restricted1 = String::hash( std::string( "global" ) ); - Uint32 Restricted2 = String::hash( UI::UIThemeManager::instance()->defaultTheme()->getTextureAtlas()->getName() ); + Uint32 Restricted2 = String::hash( UI::UIThemeManager::instance()->getDefaultTheme()->getTextureAtlas()->getName() ); for ( std::list::iterator it = Res.begin(); it != Res.end(); it++ ) { if ( (*it)->getId() != Restricted1 && (*it)->getId() != Restricted2 ) diff --git a/src/eepp/ui/tools/textureatlaseditor.cpp b/src/eepp/ui/tools/textureatlaseditor.cpp index aae1e284b..e210fbe34 100644 --- a/src/eepp/ui/tools/textureatlaseditor.cpp +++ b/src/eepp/ui/tools/textureatlaseditor.cpp @@ -17,12 +17,12 @@ TextureAtlasEditor::TextureAtlasEditor( UIWindow * AttatchTo, const TGEditorClos mTextureAtlasLoader( NULL ), mCurSubTexture( NULL ) { - if ( NULL == UIThemeManager::instance()->defaultTheme() ) { + if ( NULL == UIThemeManager::instance()->getDefaultTheme() ) { eePRINTL( "TextureAtlasEditor needs a default theme assigned to work." ); return; } - mTheme = UIThemeManager::instance()->defaultTheme(); + mTheme = UIThemeManager::instance()->getDefaultTheme(); if ( NULL == mUIWindow ) { mUIWindow = UIManager::instance()->mainControl(); @@ -50,8 +50,8 @@ TextureAtlasEditor::TextureAtlasEditor( UIWindow * AttatchTo, const TGEditorClos InitY +=30; mSpinOffX = mTheme->createSpinBox( mUIContainer, Sizei( 100, 22 ), Vector2i(), Flags, 0, false ); - mSpinOffX->minValue( -32000 ); - mSpinOffX->maxValue( 32000 ); + mSpinOffX->setMinValue( -32000 ); + mSpinOffX->setMaxValue( 32000 ); mSpinOffX->setPosition( mUIContainer->getSize().getWidth() - mSpinOffX->getSize().getWidth() - 10, InitY ); mSpinOffX->addEventListener( UIEvent::EventOnValueChange, cb::Make1( this, &TextureAtlasEditor::onOffXChange ) ); @@ -61,8 +61,8 @@ TextureAtlasEditor::TextureAtlasEditor( UIWindow * AttatchTo, const TGEditorClos InitY +=30; mSpinOffY = mTheme->createSpinBox( mUIContainer, Sizei( 100, 22 ), Vector2i(), Flags, 0, false ); - mSpinOffY->minValue( -32000 ); - mSpinOffY->maxValue( 32000 ); + mSpinOffY->setMinValue( -32000 ); + mSpinOffY->setMaxValue( 32000 ); mSpinOffY->setPosition( mUIContainer->getSize().getWidth() - mSpinOffY->getSize().getWidth() - 10, InitY ); mSpinOffY->addEventListener( UIEvent::EventOnValueChange, cb::Make1( this, &TextureAtlasEditor::onOffYChange ) ); TxtBox = createTextBox( Vector2i(), "Offset Y:" ); @@ -71,7 +71,7 @@ TextureAtlasEditor::TextureAtlasEditor( UIWindow * AttatchTo, const TGEditorClos InitY +=30; mSpinDestW = mTheme->createSpinBox( mUIContainer, Sizei( 100, 22 ), Vector2i(), Flags, 0, false ); - mSpinDestW->maxValue( 32000 ); + mSpinDestW->setMaxValue( 32000 ); mSpinDestW->setPosition( mUIContainer->getSize().getWidth() - mSpinDestW->getSize().getWidth() - 10, InitY ); mSpinDestW->addEventListener( UIEvent::EventOnValueChange, cb::Make1( this, &TextureAtlasEditor::onDestWChange ) ); TxtBox = createTextBox( Vector2i(), "Dest. Width:" ); @@ -80,7 +80,7 @@ TextureAtlasEditor::TextureAtlasEditor( UIWindow * AttatchTo, const TGEditorClos InitY +=30; mSpinDestH = mTheme->createSpinBox( mUIContainer, Sizei( 100, 22 ), Vector2i(), Flags, 0, false ); - mSpinDestH->maxValue( 32000 ); + mSpinDestH->setMaxValue( 32000 ); mSpinDestH->setPosition( mUIContainer->getSize().getWidth() - mSpinDestH->getSize().getWidth() - 10, InitY ); mSpinDestH->addEventListener( UIEvent::EventOnValueChange, cb::Make1( this, &TextureAtlasEditor::onDestHChange ) ); TxtBox = createTextBox( Vector2i(), "Dest. Height:" ); @@ -89,20 +89,20 @@ TextureAtlasEditor::TextureAtlasEditor( UIWindow * AttatchTo, const TGEditorClos Uint32 ButFlags = UI_CONTROL_ALIGN_CENTER | UI_ANCHOR_TOP | UI_ANCHOR_RIGHT | UI_AUTO_SIZE; UIPushButton * ResetButton = mTheme->createPushButton( mUIContainer, Sizei( 120, 22 ), Vector2i( mUIContainer->getSize().getWidth() - 120 - 5 , mSpinDestH->getPosition().y + mSpinDestH->getSize().getHeight() + 8 ), ButFlags ); - ResetButton->text( "Reset Dest. Size" ); + ResetButton->setText( "Reset Dest. Size" ); ResetButton->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &TextureAtlasEditor::onResetDestSize ) ); UIPushButton * ResetOffsetButton = mTheme->createPushButton( mUIContainer, Sizei( 120, 22 ), Vector2i( ResetButton->getPosition().x, ResetButton->getPosition().y + ResetButton->getSize().getHeight() + 8 ), ButFlags ); ResetOffsetButton->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &TextureAtlasEditor::onResetOffset ) ); - ResetOffsetButton->text( "Reset Offset" ); + ResetOffsetButton->setText( "Reset Offset" ); UIPushButton * CenterOffsetButton = mTheme->createPushButton( mUIContainer, Sizei( 120, 22 ), Vector2i( ResetOffsetButton->getPosition().x, ResetOffsetButton->getPosition().y + ResetOffsetButton->getSize().getHeight() + 8 ), ButFlags ); CenterOffsetButton->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &TextureAtlasEditor::onCenterOffset ) ); - CenterOffsetButton->text( "Centered Offset" ); + CenterOffsetButton->setText( "Centered Offset" ); UIPushButton * HBOffsetButton = mTheme->createPushButton( mUIContainer, Sizei( 120, 22 ), Vector2i( CenterOffsetButton->getPosition().x, CenterOffsetButton->getPosition().y + CenterOffsetButton->getSize().getHeight() + 8 ), ButFlags ); HBOffsetButton->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &TextureAtlasEditor::onHBOffset ) ); - HBOffsetButton->text( "Half-Bottom Offset" ); + HBOffsetButton->setText( "Half-Bottom Offset" ); mUIWindow->setTitle( "Texture Atlas Editor" ); mUIWindow->addEventListener( UIEvent::EventOnWindowClose, cb::Make1( this, &TextureAtlasEditor::windowClose ) ); @@ -139,8 +139,8 @@ void TextureAtlasEditor::onResetDestSize( const UIEvent * Event ) { mCurSubTexture->resetDestSize(); - mSpinDestW->value( RealSize.getWidth() ); - mSpinDestH->value( RealSize.getHeight() ); + mSpinDestW->setValue( RealSize.getWidth() ); + mSpinDestH->setValue( RealSize.getHeight() ); } } @@ -148,8 +148,8 @@ void TextureAtlasEditor::onResetOffset( const UIEvent * Event ) { const UIEventMouse * MouseEvent = reinterpret_cast ( Event ); if ( NULL != mCurSubTexture && MouseEvent->getFlags() & EE_BUTTON_LMASK ) { - mSpinOffX->value( 0 ); - mSpinOffY->value( 0 ); + mSpinOffX->setValue( 0 ); + mSpinOffY->setValue( 0 ); } } @@ -159,8 +159,8 @@ void TextureAtlasEditor::onCenterOffset( const UIEvent * Event ) { if ( NULL != mCurSubTexture && MouseEvent->getFlags() & EE_BUTTON_LMASK ) { Sizei NSize( -( (Int32)mCurSubTexture->getDestSize().x / 2 ), -( (Int32)mCurSubTexture->getDestSize().y / 2 ) ); - mSpinOffX->value( NSize.x ); - mSpinOffY->value( NSize.y ); + mSpinOffX->setValue( NSize.x ); + mSpinOffY->setValue( NSize.y ); } } @@ -170,32 +170,32 @@ void TextureAtlasEditor::onHBOffset( const UIEvent * Event ) { if ( NULL != mCurSubTexture && MouseEvent->getFlags() & EE_BUTTON_LMASK ) { Sizei NSize( -( (Int32)mCurSubTexture->getDestSize().x / 2 ), -(Int32)mCurSubTexture->getDestSize().y ); - mSpinOffX->value( NSize.x ); - mSpinOffY->value( NSize.y ); + mSpinOffX->setValue( NSize.x ); + mSpinOffY->setValue( NSize.y ); } } void TextureAtlasEditor::onOffXChange( const UIEvent * Event ) { if ( NULL != mCurSubTexture ) { - mCurSubTexture->setOffset( Vector2i( (Int32)mSpinOffX->value(), mCurSubTexture->getOffset().y ) ); + mCurSubTexture->setOffset( Vector2i( (Int32)mSpinOffX->getValue(), mCurSubTexture->getOffset().y ) ); } } void TextureAtlasEditor::onOffYChange( const UIEvent * Event ) { if ( NULL != mCurSubTexture ) { - mCurSubTexture->setOffset( Vector2i( mCurSubTexture->getOffset().x, (Int32)mSpinOffY->value() ) ); + mCurSubTexture->setOffset( Vector2i( mCurSubTexture->getOffset().x, (Int32)mSpinOffY->getValue() ) ); } } void TextureAtlasEditor::onDestWChange( const UIEvent * Event ) { if ( NULL != mCurSubTexture ) { - mCurSubTexture->setDestSize( Sizef( (Int32)mSpinDestW->value(), mCurSubTexture->getDestSize().y ) ); + mCurSubTexture->setDestSize( Sizef( (Int32)mSpinDestW->getValue(), mCurSubTexture->getDestSize().y ) ); } } void TextureAtlasEditor::onDestHChange( const UIEvent * Event ) { if ( NULL != mCurSubTexture ) { - mCurSubTexture->setDestSize( Sizef( mCurSubTexture->getDestSize().x, (Int32)mSpinDestH->value() ) ); + mCurSubTexture->setDestSize( Sizef( mCurSubTexture->getDestSize().x, (Int32)mSpinDestH->getValue() ) ); } } @@ -218,14 +218,14 @@ void TextureAtlasEditor::createWinMenu() { mWinMenu = mTheme->createWinMenu( mUIContainer ); UIPopUpMenu * PU = mTheme->createPopUpMenu(); - PU->Add( "New...", mTheme->getIconByName( "document-new" ) ); - PU->Add( "Open...", mTheme->getIconByName( "document-open" ) ); - PU->AddSeparator(); - PU->Add( "Save", mTheme->getIconByName( "document-save" ) ); - PU->AddSeparator(); - PU->Add( "Close", mTheme->getIconByName( "document-close" ) ); - PU->AddSeparator(); - PU->Add( "Quit", mTheme->getIconByName( "quit" ) ); + PU->add( "New...", mTheme->getIconByName( "document-new" ) ); + PU->add( "Open...", mTheme->getIconByName( "document-open" ) ); + PU->addSeparator(); + PU->add( "Save", mTheme->getIconByName( "document-save" ) ); + PU->addSeparator(); + PU->add( "Close", mTheme->getIconByName( "document-close" ) ); + PU->addSeparator(); + PU->add( "Quit", mTheme->getIconByName( "quit" ) ); PU->addEventListener( UIEvent::EventOnItemClicked, cb::Make1( this, &TextureAtlasEditor::fileMenuClick ) ); mWinMenu->addMenuButton( "File", PU ); @@ -235,7 +235,7 @@ void TextureAtlasEditor::fileMenuClick( const UIEvent * Event ) { if ( !Event->getControl()->isType( UI_TYPE_MENUITEM ) ) return; - const String& txt = reinterpret_cast ( Event->getControl() )->text(); + const String& txt = reinterpret_cast ( Event->getControl() )->getText(); if ( "New..." == txt ) { eeNew( TextureAtlasNew, ( cb::Make1( this, &TextureAtlasEditor::onTextureAtlasCreate ) ) ); @@ -307,7 +307,7 @@ void TextureAtlasEditor::fillSubTextureList() { mSubTextureList->setSelected( 0 ); } - mSubTextureList->verticalScrollBar()->clickStep( 8.f / (Float)mSubTextureList->count() ); + mSubTextureList->verticalScrollBar()->setClickStep( 8.f / (Float)mSubTextureList->count() ); } void TextureAtlasEditor::onSubTextureChange( const UIEvent * Event ) { @@ -316,10 +316,10 @@ void TextureAtlasEditor::onSubTextureChange( const UIEvent * Event ) { if ( NULL != mCurSubTexture ) { mSubTextureEditor->subTexture( mCurSubTexture ); - mSpinOffX->value( mCurSubTexture->getOffset().x ); - mSpinOffY->value( mCurSubTexture->getOffset().y ); - mSpinDestW->value( mCurSubTexture->getDestSize().x ); - mSpinDestH->value( mCurSubTexture->getDestSize().y ); + mSpinOffX->setValue( mCurSubTexture->getOffset().x ); + mSpinOffY->setValue( mCurSubTexture->getOffset().y ); + mSpinDestW->setValue( mCurSubTexture->getDestSize().x ); + mSpinDestH->setValue( mCurSubTexture->getDestSize().y ); } } } @@ -357,10 +357,10 @@ void TextureAtlasEditor::saveTextureAtlas( const UIEvent * Event ) { void TextureAtlasEditor::onTextureAtlasClose( const UIEvent * Event ) { eeSAFE_DELETE( mTextureAtlasLoader ); mSubTextureList->clear(); - mSpinOffX->value( 0 ); - mSpinOffY->value( 0 ); - mSpinDestW->value( 0 ); - mSpinDestH->value( 0 ); + mSpinOffX->setValue( 0 ); + mSpinOffY->setValue( 0 ); + mSpinDestW->setValue( 0 ); + mSpinDestH->setValue( 0 ); mSubTextureEditor->subTexture( NULL ); mCurSubTexture = NULL; } diff --git a/src/eepp/ui/tools/textureatlasnew.cpp b/src/eepp/ui/tools/textureatlasnew.cpp index c130fb26d..cdb170ec1 100644 --- a/src/eepp/ui/tools/textureatlasnew.cpp +++ b/src/eepp/ui/tools/textureatlasnew.cpp @@ -11,7 +11,7 @@ TextureAtlasNew::TextureAtlasNew( TGCreateCb NewTGCb ) : mUIWindow( NULL ), mNewTGCb( NewTGCb ) { - mTheme = UIThemeManager::instance()->defaultTheme(); + mTheme = UIThemeManager::instance()->getDefaultTheme(); if ( NULL == mTheme ) return; @@ -58,20 +58,20 @@ TextureAtlasNew::TextureAtlasNew( TGCreateCb NewTGCb ) : createTxtBox( Vector2i( 10, 140 ), "Texture Atlas Folder Path:" ); mTGPath = mTheme->createTextInput( mUIWindow->getContainer(), Sizei( mUIWindow->getContainer()->getSize().getWidth() - 60, 22 ), Vector2i( 10, 160 ), UI_CONTROL_DEFAULT_FLAGS | UI_CLIP_ENABLE | UI_AUTO_PADDING | UI_AUTO_SIZE , false, 512 ); - mTGPath->allowEditing( false ); + mTGPath->setAllowEditing( false ); mSetPathButton = mTheme->createPushButton( mUIWindow->getContainer(), Sizei( 32, 32 ), Vector2i( mUIWindow->getContainer()->getSize().getWidth() - 10 - 32, 160 ) ); - mSetPathButton->text( "..." ); + mSetPathButton->setText( "..." ); mSetPathButton->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &TextureAtlasNew::onDialogFolderSelect ) ); UIPushButton * OKButton = mTheme->createPushButton( mUIWindow->getContainer(), Sizei( 80, 22 ), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mTheme->getIconByName( "ok" ) ); OKButton->setPosition( mUIWindow->getContainer()->getSize().getWidth() - OKButton->getSize().getWidth() - 4, mUIWindow->getContainer()->getSize().getHeight() - OKButton->getSize().getHeight() - 4 ); OKButton->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &TextureAtlasNew::okClick ) ); - OKButton->text( "OK" ); + OKButton->setText( "OK" ); UIPushButton * CancelButton = mTheme->createPushButton( mUIWindow->getContainer(), OKButton->getSize(), Vector2i( OKButton->getPosition().x - OKButton->getSize().getWidth() - 4, OKButton->getPosition().y ), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_AUTO_SIZE, mTheme->getIconByName( "cancel" ) ); CancelButton->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &TextureAtlasNew::cancelClick ) ); - CancelButton->text( "Cancel" ); + CancelButton->setText( "Cancel" ); mUIWindow->center(); mUIWindow->show(); @@ -124,7 +124,7 @@ void TextureAtlasNew::textureAtlasSave( const UIEvent * Event ) { Int32 w = 0, h = 0, b; bool Res1 = String::fromString( w, mComboWidth->getText() ); bool Res2 = String::fromString( h, mComboHeight->getText() ); - b = static_cast( mPixelSpace->value() ); + b = static_cast( mPixelSpace->getValue() ); if ( Res1 && Res2 ) { Graphics::TexturePacker * TexturePacker = eeNew( Graphics::TexturePacker, ( w, h, false, b ) ); diff --git a/src/eepp/ui/tools/textureatlassubtextureeditor.cpp b/src/eepp/ui/tools/textureatlassubtextureeditor.cpp index 4b4a9d486..c918bf8a4 100644 --- a/src/eepp/ui/tools/textureatlassubtextureeditor.cpp +++ b/src/eepp/ui/tools/textureatlassubtextureeditor.cpp @@ -10,11 +10,11 @@ TextureAtlasSubTextureEditor::TextureAtlasSubTextureEditor( const UIComplexContr mGfx( NULL ), mEditor( Editor ) { - if ( NULL == UIThemeManager::instance()->defaultTheme() ) { + if ( NULL == UIThemeManager::instance()->getDefaultTheme() ) { return; } - mTheme = UIThemeManager::instance()->defaultTheme(); + mTheme = UIThemeManager::instance()->getDefaultTheme(); mGfx = mTheme->createGfx( NULL, this ); @@ -51,8 +51,8 @@ void TextureAtlasSubTextureEditor::update() { mGfx->subTexture()->setOffset( Vector2i( mGfx->subTexture()->getOffset().x + Diff.x, mGfx->subTexture()->getOffset().y + Diff.y ) ); - mEditor->spinOffX()->value( mGfx->subTexture()->getOffset().x ); - mEditor->spinOffY()->value( mGfx->subTexture()->getOffset().y ); + mEditor->spinOffX()->setValue( mGfx->subTexture()->getOffset().x ); + mEditor->spinOffY()->setValue( mGfx->subTexture()->getOffset().y ); } mGfx->setPosition( mUICenter ); diff --git a/src/eepp/ui/uicombobox.cpp b/src/eepp/ui/uicombobox.cpp index 435660a1f..2caf02873 100644 --- a/src/eepp/ui/uicombobox.cpp +++ b/src/eepp/ui/uicombobox.cpp @@ -7,7 +7,7 @@ UIComboBox::UIComboBox( UIComboBox::CreateParams& Params ) : UIDropDownList( Params ), mButton( NULL ) { - allowEditing( true ); + setAllowEditing( true ); applyDefaultTheme(); } diff --git a/src/eepp/ui/uicommondialog.cpp b/src/eepp/ui/uicommondialog.cpp index 5fcbe5d15..c00b75e45 100644 --- a/src/eepp/ui/uicommondialog.cpp +++ b/src/eepp/ui/uicommondialog.cpp @@ -50,7 +50,7 @@ UICommonDialog::UICommonDialog( const UICommonDialog::CreateParams& Params ) : mButtonCancel = eeNew( UIPushButton, ( ButtonParams ) ); mButtonCancel->setVisible( true ); mButtonCancel->setEnabled( true ); - mButtonCancel->text( "Cancel" ); + mButtonCancel->setText( "Cancel" ); mButtonCancel->setPosition( Vector2i( mButtonCancel->getPosition().x, getContainer()->getSize().getHeight() - mButtonCancel->getSize().getHeight() - 2 ) ); mButtonCancel->updateAnchorsDistances(); @@ -60,9 +60,9 @@ UICommonDialog::UICommonDialog( const UICommonDialog::CreateParams& Params ) : mButtonOpen->setEnabled( true ); if ( isSaveDialog() ) - mButtonOpen->text( "Save" ); + mButtonOpen->setText( "Save" ); else - mButtonOpen->text( "Open" ); + mButtonOpen->setText( "Open" ); UITextInput::CreateParams TInputParams; TInputParams.setParent( getContainer() ); @@ -81,7 +81,7 @@ UICommonDialog::UICommonDialog( const UICommonDialog::CreateParams& Params ) : mButtonUp = eeNew( UIPushButton, ( ButtonParams ) ); mButtonUp->setVisible( true ); mButtonUp->setEnabled( true ); - mButtonUp->text( "Up" ); + mButtonUp->setText( "Up" ); UIListBox::CreateParams LBParams; LBParams.setParent( getContainer() ); @@ -98,10 +98,10 @@ UICommonDialog::UICommonDialog( const UICommonDialog::CreateParams& Params ) : LBParams.Flags = UI_AUTO_PADDING | UI_ANCHOR_RIGHT | UI_ANCHOR_LEFT | UI_ANCHOR_TOP | UI_ANCHOR_BOTTOM | UI_CLIP_ENABLE; LBParams.FontSelectedColor = ColorA( 255, 255, 255, 255 ); - if ( NULL != UIThemeManager::instance()->defaultTheme() ) { - UITheme * Theme = UIThemeManager::instance()->defaultTheme(); + if ( NULL != UIThemeManager::instance()->getDefaultTheme() ) { + UITheme * Theme = UIThemeManager::instance()->getDefaultTheme(); - LBParams.FontSelectedColor = Theme->fontSelectedColor(); + LBParams.FontSelectedColor = Theme->getFontSelectedColor(); } mList = eeNew( UIListBox, ( LBParams ) ); @@ -164,8 +164,8 @@ void UICommonDialog::setTheme( UITheme * Theme ) { SubTexture * Icon = Theme->getIconByName( "go-up" ); if ( NULL != Icon ) { - mButtonUp->text( "" ); - mButtonUp->icon( Icon ); + mButtonUp->setText( "" ); + mButtonUp->setIcon( Icon ); } } @@ -220,7 +220,7 @@ void UICommonDialog::refreshFolder() { mList->addListBoxItems( files ); if ( NULL != mList->verticalScrollBar() ) { - mList->verticalScrollBar()->clickStep( 1.f / ( ( mList->count() * mList->rowHeight() ) / (Float)mList->getSize().getHeight() ) ); + mList->verticalScrollBar()->setClickStep( 1.f / ( ( mList->count() * mList->rowHeight() ) / (Float)mList->getSize().getHeight() ) ); } } diff --git a/src/eepp/ui/uicomplexcontrol.cpp b/src/eepp/ui/uicomplexcontrol.cpp index 3d50bdc8a..e4b7669ce 100644 --- a/src/eepp/ui/uicomplexcontrol.cpp +++ b/src/eepp/ui/uicomplexcontrol.cpp @@ -34,11 +34,11 @@ void UIComplexControl::updateAnchorsDistances() { } void UIComplexControl::update() { - if ( mVisible && NULL != mTooltip && mTooltip->text().size() ) { + if ( mVisible && NULL != mTooltip && mTooltip->getText().size() ) { if ( isMouseOverMeOrChilds() ) { Vector2i Pos = UIManager::instance()->getMousePos(); - Pos.x += UIThemeManager::instance()->cursorSize().x; - Pos.y += UIThemeManager::instance()->cursorSize().y; + Pos.x += UIThemeManager::instance()->getCursorSize().x; + Pos.y += UIThemeManager::instance()->getCursorSize().y; if ( Pos.x + mTooltip->getSize().getWidth() > UIManager::instance()->mainControl()->getSize().getWidth() ) { Pos.x = UIManager::instance()->getMousePos().x - mTooltip->getSize().getWidth(); @@ -48,32 +48,32 @@ void UIComplexControl::update() { Pos.y = UIManager::instance()->getMousePos().y - mTooltip->getSize().getHeight(); } - if ( Time::Zero == UIThemeManager::instance()->tooltipTimeToShow() ) { - if ( !mTooltip->isVisible() || UIThemeManager::instance()->tooltipFollowMouse() ) + if ( Time::Zero == UIThemeManager::instance()->getTooltipTimeToShow() ) { + if ( !mTooltip->isVisible() || UIThemeManager::instance()->getTooltipFollowMouse() ) mTooltip->setPosition( Pos ); mTooltip->show(); } else { - if ( -1.f != mTooltip->tooltipTime().asMilliseconds() ) { - mTooltip->tooltipTimeAdd( UIManager::instance()->elapsed() ); + if ( -1.f != mTooltip->getTooltipTime().asMilliseconds() ) { + mTooltip->addTooltipTime( UIManager::instance()->elapsed() ); } - if ( mTooltip->tooltipTime() >= UIThemeManager::instance()->tooltipTimeToShow() ) { - if ( mTooltip->tooltipTime().asMilliseconds() != -1.f ) { + if ( mTooltip->getTooltipTime() >= UIThemeManager::instance()->getTooltipTimeToShow() ) { + if ( mTooltip->getTooltipTime().asMilliseconds() != -1.f ) { mTooltip->setPosition( Pos ); mTooltip->show(); - mTooltip->tooltipTime( Milliseconds( -1.f ) ); + mTooltip->setTooltipTime( Milliseconds( -1.f ) ); } } } - if ( UIThemeManager::instance()->tooltipFollowMouse() ) { + if ( UIThemeManager::instance()->getTooltipFollowMouse() ) { mTooltip->setPosition( Pos ); } } else { - mTooltip->tooltipTime( Milliseconds( 0.f ) ); + mTooltip->setTooltipTime( Milliseconds( 0.f ) ); if ( mTooltip->isVisible() ) mTooltip->hide(); @@ -87,7 +87,7 @@ void UIComplexControl::createTooltip() { if ( NULL != mTooltip ) return; - UITheme * tTheme = UIThemeManager::instance()->defaultTheme(); + UITheme * tTheme = UIThemeManager::instance()->getDefaultTheme(); if ( NULL != tTheme ) { mTooltip = tTheme->createTooltip( this, UIManager::instance()->mainControl() ); @@ -106,16 +106,16 @@ void UIComplexControl::setTooltipText( const String& Text ) { if ( Text.size() ) { createTooltip(); - mTooltip->text( Text ); + mTooltip->setText( Text ); } } else { // but if it's created, i will allow it - mTooltip->text( Text ); + mTooltip->setText( Text ); } } String UIComplexControl::getTooltipText() { if ( NULL != mTooltip ) - return mTooltip->text(); + return mTooltip->getText(); return String(); } diff --git a/src/eepp/ui/uicontrol.cpp b/src/eepp/ui/uicontrol.cpp index 12da906af..8997d1b05 100644 --- a/src/eepp/ui/uicontrol.cpp +++ b/src/eepp/ui/uicontrol.cpp @@ -958,7 +958,7 @@ void UIControl::safeDeleteSkinState() { void UIControl::setThemeControl( UITheme * Theme, const std::string& ControlName ) { if ( NULL != Theme ) { - UISkin * tSkin = Theme->getByName( Theme->abbr() + "_" + ControlName ); + UISkin * tSkin = Theme->getByName( Theme->getAbbr() + "_" + ControlName ); if ( NULL != tSkin ) { Uint32 InitialState = UISkinState::StateNormal; @@ -984,7 +984,7 @@ void UIControl::setSkin( const UISkin& Skin ) { writeCtrlFlag( UI_CTRL_FLAG_SKIN_OWNER, 1 ); - UISkin * SkinCopy = const_cast( &Skin )->copy(); + UISkin * SkinCopy = const_cast( &Skin )->clone(); mSkinState = eeNew( UISkinState, ( SkinCopy ) ); diff --git a/src/eepp/ui/uidefaulttheme.cpp b/src/eepp/ui/uidefaulttheme.cpp index c6026fcc2..0aec2b114 100644 --- a/src/eepp/ui/uidefaulttheme.cpp +++ b/src/eepp/ui/uidefaulttheme.cpp @@ -12,10 +12,10 @@ namespace EE { namespace UI { UIdefaultTheme::UIdefaultTheme( const std::string& Name, const std::string& Abbr, Graphics::Font * defaultFont ) : UITheme( Name, Abbr, defaultFont ) { - fontColor( ColorA( 230, 230, 230, 255 ) ); - fontOverColor( ColorA( 255, 255, 255, 255 ) ); - fontSelectedColor( ColorA( 255, 255, 255, 255 ) ); - fontShadowColor( ColorA( 50, 50, 50, 150 ) ); + setFontColor( ColorA( 230, 230, 230, 255 ) ); + setFontOverColor( ColorA( 255, 255, 255, 255 ) ); + setFontSelectedColor( ColorA( 255, 255, 255, 255 ) ); + setFontShadowColor( ColorA( 50, 50, 50, 150 ) ); } UIPopUpMenu * UIdefaultTheme::createPopUpMenu( UIControl * Parent, const Sizei& Size, const Vector2i& Pos, const Uint32& Flags, Uint32 RowHeight, Recti PaddingContainer, Uint32 MinWidth, Uint32 MinSpaceForIcons, Uint32 MinRightMargin ) { @@ -30,7 +30,7 @@ UIPopUpMenu * UIdefaultTheme::createPopUpMenu( UIControl * Parent, const Sizei& MenuParams.MinSpaceForIcons = MinSpaceForIcons; MenuParams.MinRightMargin = MinRightMargin; - if ( useDefaultThemeValues() ) { + if ( getUseDefaultThemeValues() ) { MenuParams.MinWidth = 100; MenuParams.MinSpaceForIcons = 24; MenuParams.MinRightMargin = 8; @@ -51,7 +51,7 @@ UIProgressBar * UIdefaultTheme::createProgressBar( UIControl * Parent, const Siz PBParams.MovementSpeed = MovementSpeed; PBParams.FillerMargin = FillerMargin; - if ( useDefaultThemeValues() ) { + if ( getUseDefaultThemeValues() ) { PBParams.Flags |= UI_AUTO_SIZE; PBParams.DisplayPercent = true; PBParams.VerticalExpand = true; @@ -76,7 +76,7 @@ UIWinMenu * UIdefaultTheme::createWinMenu( UIControl * Parent, const Sizei& Size WinMenuParams.MenuHeight = MenuHeight; WinMenuParams.FirstButtonMargin = FirstButtonMargin; - if ( useDefaultThemeValues() ) { + if ( getUseDefaultThemeValues() ) { WinMenuParams.ButtonMargin = 12; } @@ -96,7 +96,7 @@ UIWindow * UIdefaultTheme::createWindow( UIControl * Parent, const Sizei& Size, WinParams.MinWindowSize = MinWindowSize; WinParams.BaseAlpha = BaseAlpha; - if ( useDefaultThemeValues() ) { + if ( getUseDefaultThemeValues() ) { WinParams.Flags |= UI_DRAW_SHADOW; WinParams.WinFlags |= UI_WIN_DRAW_SHADOW; WinParams.ButtonsPositionFixer.x = -2; @@ -119,7 +119,7 @@ UICommonDialog * UIdefaultTheme::createCommonDialog( UIControl * Parent, const S DLGParams.DefaultFilePattern = DefaultFilePattern; DLGParams.CDLFlags = CDLFlags; - if ( useDefaultThemeValues() ) { + if ( getUseDefaultThemeValues() ) { DLGParams.Flags |= UI_DRAW_SHADOW; DLGParams.WinFlags |= UI_WIN_DRAW_SHADOW; DLGParams.ButtonsPositionFixer.x = -2; @@ -141,7 +141,7 @@ UIMessageBox * UIdefaultTheme::createMessageBox( UI_MSGBOX_TYPE Type, const Stri MsgBoxParams.Type = Type; MsgBoxParams.Message = Message; - if ( useDefaultThemeValues() ) { + if ( getUseDefaultThemeValues() ) { MsgBoxParams.Flags |= UI_DRAW_SHADOW; MsgBoxParams.WinFlags |= UI_WIN_DRAW_SHADOW; MsgBoxParams.ButtonsPositionFixer.x = -2; @@ -161,7 +161,7 @@ UIComboBox * UIdefaultTheme::createComboBox( UIControl * Parent, const Sizei& Si ComboParams.PopUpToMainControl = PopUpToMainControl; ComboParams.ListBox = ListBox; - if ( useDefaultThemeValues() ) { + if ( getUseDefaultThemeValues() ) { ComboParams.Flags |= UI_AUTO_SIZE | UI_TEXT_SELECTION_ENABLED; } @@ -181,7 +181,7 @@ UIDropDownList * UIdefaultTheme::createDropDownList( UIControl * Parent, const S DDLParams.PopUpToMainControl = PopUpToMainControl; DDLParams.ListBox = ListBox; - if ( useDefaultThemeValues() ) { + if ( getUseDefaultThemeValues() ) { DDLParams.Flags |= UI_AUTO_SIZE; } @@ -206,7 +206,7 @@ UITabWidget * UIdefaultTheme::createTabWidget( UIControl *Parent, const Sizei &S TabWidgetParams.MinTabWidth = MinTabWidth; TabWidgetParams.MaxTabWidth = MaxTabWidth; - if ( useDefaultThemeValues() ) { + if ( getUseDefaultThemeValues() ) { TabWidgetParams.TabSeparation = -1; TabWidgetParams.FontSelectedColor = ColorA( 255, 255, 255, 255 ); TabWidgetParams.DrawLineBelowTabs = true; @@ -227,7 +227,7 @@ UITooltip * UIdefaultTheme::createTooltip( UIControl * TooltipOf, UIControl * Pa TooltipParams.setSize( Size ); TooltipParams.Flags = Flags; - if ( useDefaultThemeValues() ) { + if ( getUseDefaultThemeValues() ) { TooltipParams.Flags &= ~UI_AUTO_PADDING; TooltipParams.FontColor = ColorA( 0, 0, 0, 255 ); TooltipParams.Padding = Recti( 4, 6, 4, 6 ); diff --git a/src/eepp/ui/uidropdownlist.cpp b/src/eepp/ui/uidropdownlist.cpp index d21130c1c..39e992c78 100644 --- a/src/eepp/ui/uidropdownlist.cpp +++ b/src/eepp/ui/uidropdownlist.cpp @@ -9,7 +9,7 @@ UIDropDownList::UIDropDownList( UIDropDownList::CreateParams& Params ) : mMinNumVisibleItems( Params.MinNumVisibleItems ), mPopUpToMainControl( Params.PopUpToMainControl ) { - allowEditing( false ); + setAllowEditing( false ); applyDefaultTheme(); @@ -22,7 +22,7 @@ UIDropDownList::UIDropDownList( UIDropDownList::CreateParams& Params ) : if ( Params.Flags & UI_TEXT_SELECTION_ENABLED ) flags |= UI_TEXT_SELECTION_ENABLED; - UITheme * Theme = UIThemeManager::instance()->defaultTheme(); + UITheme * Theme = UIThemeManager::instance()->getDefaultTheme(); if ( NULL != Theme ) { mListBox = Theme->createListBox( NULL, Sizei( mSize.getWidth(), mMinNumVisibleItems * mSize.getHeight() ),Vector2i(), flags ); @@ -112,7 +112,7 @@ void UIDropDownList::showListBox() { if ( mListBox->count() ) { Recti tPadding = mListBox->paddingContainer(); - Float sliderValue = mListBox->verticalScrollBar()->value(); + Float sliderValue = mListBox->verticalScrollBar()->getValue(); if ( mMinNumVisibleItems < mListBox->count() ) mListBox->setSize( mSize.getWidth(), (Int32)( mMinNumVisibleItems * mListBox->rowHeight() ) + tPadding.Top + tPadding.Bottom ); @@ -137,7 +137,7 @@ void UIDropDownList::showListBox() { mListBox->setPosition( Pos ); } - mListBox->verticalScrollBar()->value( sliderValue ); + mListBox->verticalScrollBar()->setValue( sliderValue ); show(); @@ -183,14 +183,14 @@ void UIDropDownList::show() { mListBox->setEnabled( true ); mListBox->setVisible( true ); - if ( UIThemeManager::instance()->defaultEffectsEnabled() ) { - mListBox->startAlphaAnim( 255.f == mListBox->getAlpha() ? 0.f : mListBox->getAlpha(), 255.f, UIThemeManager::instance()->controlsFadeInTime() ); + if ( UIThemeManager::instance()->getDefaultEffectsEnabled() ) { + mListBox->startAlphaAnim( 255.f == mListBox->getAlpha() ? 0.f : mListBox->getAlpha(), 255.f, UIThemeManager::instance()->getControlsFadeInTime() ); } } void UIDropDownList::hide() { - if ( UIThemeManager::instance()->defaultEffectsEnabled() ) { - mListBox->disableFadeOut( UIThemeManager::instance()->controlsFadeOutTime() ); + if ( UIThemeManager::instance()->getDefaultEffectsEnabled() ) { + mListBox->disableFadeOut( UIThemeManager::instance()->getControlsFadeOutTime() ); } else { mListBox->setEnabled( false ); mListBox->setVisible( false ); diff --git a/src/eepp/ui/uigenericgrid.cpp b/src/eepp/ui/uigenericgrid.cpp index 897b579b9..d769dfc6f 100644 --- a/src/eepp/ui/uigenericgrid.cpp +++ b/src/eepp/ui/uigenericgrid.cpp @@ -191,7 +191,7 @@ void UIGenericGrid::updateHScroll() { Int32 ScrollH = mTotalWidth - mContainer->getSize().getWidth(); - Int32 HScrolleable = (Uint32)( mHScrollBar->value() * ScrollH ); + Int32 HScrolleable = (Uint32)( mHScrollBar->getValue() * ScrollH ); mHScrollInit = -HScrolleable; } else { @@ -231,7 +231,7 @@ void UIGenericGrid::updateScroll( bool FromScrollChange ) { if ( Clipped && mSmoothScroll ) { if ( Scrolleable >= 0 ) - RelPos = (Uint32)( mVScrollBar->value() * Scrolleable ); + RelPos = (Uint32)( mVScrollBar->getValue() * Scrolleable ); else RelPos = 0; @@ -267,7 +267,7 @@ void UIGenericGrid::updateScroll( bool FromScrollChange ) { RelPosMax = (Uint32)mItems.size(); if ( mItemsNotVisible > 0 ) { - RelPos = (Uint32)( mVScrollBar->value() * mItemsNotVisible ); + RelPos = (Uint32)( mVScrollBar->getValue() * mItemsNotVisible ); RelPosMax = RelPos + VisibleItems; } @@ -577,7 +577,7 @@ void UIGenericGrid::update() { if ( mTouchDragPoint != Pos ) { Vector2i diff = -( mTouchDragPoint - Pos ); - mVScrollBar->value( mVScrollBar->value() + ( -diff.y / (Float)( ( mItems.size() - 1 ) * mRowHeight ) ) ); + mVScrollBar->setValue( mVScrollBar->getValue() + ( -diff.y / (Float)( ( mItems.size() - 1 ) * mRowHeight ) ) ); mTouchDragAcceleration += elapsed().asMilliseconds() * diff.y * mTouchDragDeceleration; @@ -606,7 +606,7 @@ void UIGenericGrid::update() { // Deaccelerate if ( mTouchDragAcceleration > 0.01f || mTouchDragAcceleration < -0.01f ) { - mVScrollBar->value( mVScrollBar->value() + ( -mTouchDragAcceleration / (Float)( ( mItems.size() - 1 ) * mRowHeight ) ) ); + mVScrollBar->setValue( mVScrollBar->getValue() + ( -mTouchDragAcceleration / (Float)( ( mItems.size() - 1 ) * mRowHeight ) ) ); mTouchDragAcceleration -= mTouchDragAcceleration * mTouchDragDeceleration * elapsed().asMilliseconds(); } diff --git a/src/eepp/ui/uilistbox.cpp b/src/eepp/ui/uilistbox.cpp index 87206bddf..20ff93895 100644 --- a/src/eepp/ui/uilistbox.cpp +++ b/src/eepp/ui/uilistbox.cpp @@ -32,8 +32,8 @@ UIListBox::UIListBox( UIListBox::CreateParams& Params ) : mTouchDragAcceleration(0), mTouchDragDeceleration( Params.TouchDragDeceleration ) { - if ( NULL == Params.Font && NULL != UIThemeManager::instance()->defaultFont() ) - mFont = UIThemeManager::instance()->defaultFont(); + if ( NULL == Params.Font && NULL != UIThemeManager::instance()->getDefaultFont() ) + mFont = UIThemeManager::instance()->getDefaultFont(); UIControl::CreateParams CParams; CParams.setParent( this ); @@ -92,8 +92,8 @@ bool UIListBox::isType( const Uint32& type ) const { void UIListBox::setTheme( UITheme * Theme ) { UIControl::setThemeControl( Theme, "listbox" ); - if ( NULL == mFont && NULL != mSkinState && NULL != mSkinState->getSkin() && NULL != mSkinState->getSkin()->theme() && NULL != mSkinState->getSkin()->theme()->font() ) - mFont = mSkinState->getSkin()->theme()->font(); + if ( NULL == mFont && NULL != mSkinState && NULL != mSkinState->getSkin() && NULL != mSkinState->getSkin()->getTheme() && NULL != mSkinState->getSkin()->getTheme()->getFont() ) + mFont = mSkinState->getSkin()->getTheme()->getFont(); autoPadding(); @@ -233,7 +233,7 @@ void UIListBox::clear() { mTexts.clear(); mItems.clear(); mSelected.clear(); - mVScrollBar->value(0); + mVScrollBar->setValue(0); updateScroll(); findMaxWidth(); @@ -304,11 +304,11 @@ void UIListBox::setRowHeight() { if ( 0 == mRowHeight ) { Uint32 FontSize = 12; - if ( NULL != UIThemeManager::instance()->defaultFont() ) - FontSize = UIThemeManager::instance()->defaultFont()->getFontHeight(); + if ( NULL != UIThemeManager::instance()->getDefaultFont() ) + FontSize = UIThemeManager::instance()->getDefaultFont()->getFontHeight(); - if ( NULL != mSkinState && NULL != mSkinState->getSkin() && NULL != mSkinState->getSkin()->theme() && NULL != mSkinState->getSkin()->theme()->font() ) - FontSize = mSkinState->getSkin()->theme()->font()->getFontHeight(); + if ( NULL != mSkinState && NULL != mSkinState->getSkin() && NULL != mSkinState->getSkin()->getTheme() && NULL != mSkinState->getSkin()->getTheme()->getFont() ) + FontSize = mSkinState->getSkin()->getTheme()->getFont()->getFontHeight(); if ( NULL != mFont ) FontSize = mFont->getFontHeight(); @@ -442,7 +442,7 @@ void UIListBox::updateScroll( bool FromScrollChange ) { else ScrollH = mMaxTextWidth - mContainer->getSize().getWidth(); - Int32 HScrolleable = (Uint32)( mHScrollBar->value() * ScrollH ); + Int32 HScrolleable = (Uint32)( mHScrollBar->getValue() * ScrollH ); mHScrollInit = -HScrolleable; } else { @@ -466,7 +466,7 @@ void UIListBox::updateScroll( bool FromScrollChange ) { if ( Clipped && mSmoothScroll ) { if ( Scrolleable >= 0 ) - RelPos = (Uint32)( mVScrollBar->value() * Scrolleable ); + RelPos = (Uint32)( mVScrollBar->getValue() * Scrolleable ); else RelPos = 0; @@ -512,7 +512,7 @@ void UIListBox::updateScroll( bool FromScrollChange ) { RelPosMax = (Uint32)mItems.size(); if ( mItemsNotVisible > 0 ) { - RelPos = (Uint32)( mVScrollBar->value() * mItemsNotVisible ); + RelPos = (Uint32)( mVScrollBar->getValue() * mItemsNotVisible ); RelPosMax = RelPos + VisibleItems; } @@ -796,7 +796,7 @@ void UIListBox::selectPrev() { createItemIndex( SelIndex ); if ( mItems[ SelIndex ]->getPosition().y < 0 ) { - mVScrollBar->value( (Float)( SelIndex * mRowHeight ) / (Float)( ( mItems.size() - 1 ) * mRowHeight ) ); + mVScrollBar->setValue( (Float)( SelIndex * mRowHeight ) / (Float)( ( mItems.size() - 1 ) * mRowHeight ) ); mItems[ SelIndex ]->setFocus(); } @@ -818,7 +818,7 @@ void UIListBox::selectNext() { createItemIndex( SelIndex ); if ( mItems[ SelIndex ]->getPosition().y + (Int32)rowHeight() > mContainer->getSize().getHeight() ) { - mVScrollBar->value( (Float)( SelIndex * mRowHeight ) / (Float)( ( mItems.size() - 1 ) * mRowHeight ) ); + mVScrollBar->setValue( (Float)( SelIndex * mRowHeight ) / (Float)( ( mItems.size() - 1 ) * mRowHeight ) ); mItems[ SelIndex ]->setFocus(); } @@ -847,7 +847,7 @@ Uint32 UIListBox::onKeyDown( const UIEventKey &Event ) { mLastTickMove = Sys::getTicks(); if ( mSelected.front() != 0 ) { - mVScrollBar->value( 0 ); + mVScrollBar->setValue( 0 ); mItems[ 0 ]->setFocus(); @@ -857,7 +857,7 @@ Uint32 UIListBox::onKeyDown( const UIEventKey &Event ) { mLastTickMove = Sys::getTicks(); if ( mSelected.front() != count() - 1 ) { - mVScrollBar->value( 1 ); + mVScrollBar->setValue( 1 ); mItems[ count() - 1 ]->setFocus(); @@ -971,7 +971,7 @@ void UIListBox::update() { if ( mTouchDragPoint != Pos ) { Vector2i diff = -( mTouchDragPoint - Pos ); - mVScrollBar->value( mVScrollBar->value() + ( -diff.y / (Float)( ( mItems.size() - 1 ) * mRowHeight ) ) ); + mVScrollBar->setValue( mVScrollBar->getValue() + ( -diff.y / (Float)( ( mItems.size() - 1 ) * mRowHeight ) ) ); mTouchDragAcceleration += elapsed().asMilliseconds() * diff.y * mTouchDragDeceleration; @@ -1000,7 +1000,7 @@ void UIListBox::update() { // Deaccelerate if ( mTouchDragAcceleration > 0.01f || mTouchDragAcceleration < -0.01f ) { - mVScrollBar->value( mVScrollBar->value() + ( -mTouchDragAcceleration / (Float)( ( mItems.size() - 1 ) * mRowHeight ) ) ); + mVScrollBar->setValue( mVScrollBar->getValue() + ( -mTouchDragAcceleration / (Float)( ( mItems.size() - 1 ) * mRowHeight ) ) ); mTouchDragAcceleration -= mTouchDragAcceleration * mTouchDragDeceleration * elapsed().asMilliseconds(); } diff --git a/src/eepp/ui/uimenu.cpp b/src/eepp/ui/uimenu.cpp index 5c4df555c..cbc3da7aa 100644 --- a/src/eepp/ui/uimenu.cpp +++ b/src/eepp/ui/uimenu.cpp @@ -46,12 +46,12 @@ void UIMenu::setTheme( UITheme * Theme ) { } void UIMenu::doAftersetTheme() { - AutoPadding(); + autoPadding(); onSizeChange(); } -UIMenuItem * UIMenu::CreateMenuItem( const String& Text, SubTexture * Icon ) { +UIMenuItem * UIMenu::createMenuItem( const String& Text, SubTexture * Icon ) { UIMenuItem::CreateParams Params; Params.setParent( this ); Params.Font = mFont; @@ -73,18 +73,18 @@ UIMenuItem * UIMenu::CreateMenuItem( const String& Text, SubTexture * Icon ) { UIMenuItem * tCtrl = eeNew( UIMenuItem, ( Params ) ); - tCtrl->text( Text ); + tCtrl->setText( Text ); tCtrl->setVisible( true ); tCtrl->setEnabled( true ); return tCtrl; } -Uint32 UIMenu::Add( const String& Text, SubTexture * Icon ) { - return Add( CreateMenuItem( Text, Icon ) ); +Uint32 UIMenu::add( const String& Text, SubTexture * Icon ) { + return add( createMenuItem( Text, Icon ) ); } -UIMenuCheckBox * UIMenu::CreateMenuCheckBox( const String& Text, const bool &Active ) { +UIMenuCheckBox * UIMenu::createMenuCheckBox( const String& Text, const bool &Active ) { UIMenuCheckBox::CreateParams Params; Params.setParent( this ); Params.Font = mFont; @@ -106,21 +106,21 @@ UIMenuCheckBox * UIMenu::CreateMenuCheckBox( const String& Text, const bool &Act UIMenuCheckBox * tCtrl = eeNew( UIMenuCheckBox, ( Params ) ); - tCtrl->text( Text ); + tCtrl->setText( Text ); tCtrl->setVisible( true ); tCtrl->setEnabled( true ); if ( Active ) - tCtrl->active( Active ); + tCtrl->setActive( Active ); return tCtrl; } -Uint32 UIMenu::AddCheckBox( const String& Text, const bool& Active ) { - return Add( CreateMenuCheckBox( Text, Active ) ); +Uint32 UIMenu::addCheckBox( const String& Text, const bool& Active ) { + return add( createMenuCheckBox( Text, Active ) ); } -UIMenuSubMenu * UIMenu::CreateSubMenu( const String& Text, SubTexture * Icon, UIMenu * SubMenu ) { +UIMenuSubMenu * UIMenu::createSubMenu( const String& Text, SubTexture * Icon, UIMenu * SubMenu ) { UIMenuSubMenu::CreateParams Params; Params.setParent( this ); Params.Font = mFont; @@ -143,23 +143,23 @@ UIMenuSubMenu * UIMenu::CreateSubMenu( const String& Text, SubTexture * Icon, UI UIMenuSubMenu * tCtrl = eeNew( UIMenuSubMenu, ( Params ) ); - tCtrl->text( Text ); + tCtrl->setText( Text ); tCtrl->setVisible( true ); tCtrl->setEnabled( true ); return tCtrl; } -Uint32 UIMenu::AddSubMenu( const String& Text, SubTexture * Icon, UIMenu * SubMenu ) { - return Add( CreateSubMenu( Text, Icon, SubMenu ) ); +Uint32 UIMenu::addSubMenu( const String& Text, SubTexture * Icon, UIMenu * SubMenu ) { + return add( createSubMenu( Text, Icon, SubMenu ) ); } -bool UIMenu::CheckControlSize( UIControl * Control, const bool& Resize ) { +bool UIMenu::checkControlSize( UIControl * Control, const bool& Resize ) { if ( Control->isType( UI_TYPE_MENUITEM ) ) { UIMenuItem * tItem = reinterpret_cast ( Control ); - if ( NULL != tItem->icon() && tItem->iconHorizontalMargin() + tItem->icon()->getSize().getWidth() > (Int32)mBiggestIcon ) { - mBiggestIcon = tItem->iconHorizontalMargin() + tItem->icon()->getSize().getWidth(); + if ( NULL != tItem->getIcon() && tItem->getIconHorizontalMargin() + tItem->getIcon()->getSize().getWidth() > (Int32)mBiggestIcon ) { + mBiggestIcon = tItem->getIconHorizontalMargin() + tItem->getIcon()->getSize().getWidth(); } if ( mFlags & UI_AUTO_SIZE ) { @@ -170,7 +170,7 @@ bool UIMenu::CheckControlSize( UIControl * Control, const bool& Resize ) { mMaxWidth = tMenu->getTextBox()->getTextWidth() + mBiggestIcon + mPadding.Left + mPadding.Right + tMenu->getArrow()->getSize().getWidth() + mMinRightMargin; if ( Resize ) { - ResizeControls(); + resizeControls(); return true; } @@ -181,7 +181,7 @@ bool UIMenu::CheckControlSize( UIControl * Control, const bool& Resize ) { mMaxWidth = tItem->getTextBox()->getTextWidth() + mBiggestIcon + mPadding.Left + mPadding.Right + mMinRightMargin; if ( Resize ) { - ResizeControls(); + resizeControls(); return true; } @@ -193,13 +193,13 @@ bool UIMenu::CheckControlSize( UIControl * Control, const bool& Resize ) { return false; } -Uint32 UIMenu::Add( UIControl * Control ) { +Uint32 UIMenu::add( UIControl * Control ) { if ( this != Control->getParent() ) Control->setParent( this ); - CheckControlSize( Control ); + checkControlSize( Control ); - SetControlSize( Control, Count() ); + setControlSize( Control, getCount() ); Control->setPosition( mPadding.Left, mPadding.Top + mNextPosY ); @@ -207,12 +207,12 @@ Uint32 UIMenu::Add( UIControl * Control ) { mItems.push_back( Control ); - ResizeMe(); + resizeMe(); return mItems.size() - 1; } -void UIMenu::SetControlSize( UIControl * Control, const Uint32& Pos ) { +void UIMenu::setControlSize( UIControl * Control, const Uint32& Pos ) { if ( Control->isType( UI_TYPE_MENUITEM ) ) { Control->setSize( mSize.getWidth() - mPadding.Left - mPadding.Right, mRowHeight ); } else { @@ -220,7 +220,7 @@ void UIMenu::SetControlSize( UIControl * Control, const Uint32& Pos ) { } } -Uint32 UIMenu::AddSeparator() { +Uint32 UIMenu::addSeparator() { UISeparator::CreateParams Params; Params.setParent( this ); Params.setPosition( mPadding.Left, mPadding.Top + mNextPosY ); @@ -235,22 +235,22 @@ Uint32 UIMenu::AddSeparator() { mItems.push_back( Control ); - ResizeMe(); + resizeMe(); return mItems.size() - 1; } -UIControl * UIMenu::GetItem( const Uint32& Index ) { +UIControl * UIMenu::getItem( const Uint32& Index ) { eeASSERT( Index < mItems.size() ); return mItems[ Index ]; } -UIControl * UIMenu::GetItem( const String& Text ) { +UIControl * UIMenu::getItem( const String& Text ) { for ( Uint32 i = 0; i < mItems.size(); i++ ) { if ( mItems[i]->isType( UI_TYPE_MENUITEM ) ) { UIMenuItem * tMenuItem = reinterpret_cast( mItems[i] ); - if ( tMenuItem->text() == Text ) + if ( tMenuItem->getText() == Text ) return tMenuItem; } } @@ -258,7 +258,7 @@ UIControl * UIMenu::GetItem( const String& Text ) { return NULL; } -Uint32 UIMenu::GetItemIndex( UIControl * Item ) { +Uint32 UIMenu::getItemIndex( UIControl * Item ) { for ( Uint32 i = 0; i < mItems.size(); i++ ) { if ( mItems[i] == Item ) return i; @@ -267,31 +267,31 @@ Uint32 UIMenu::GetItemIndex( UIControl * Item ) { return eeINDEX_NOT_FOUND; } -Uint32 UIMenu::Count() const { +Uint32 UIMenu::getCount() const { return mItems.size(); } -void UIMenu::Remove( const Uint32& Index ) { +void UIMenu::remove( const Uint32& Index ) { eeASSERT( Index < mItems.size() ); eeSAFE_DELETE( mItems[ Index ] ); mItems.erase( mItems.begin() + Index ); - ReposControls(); - ResizeControls(); + rePosControls(); + resizeControls(); } -void UIMenu::Remove( UIControl * Ctrl ) { +void UIMenu::remove( UIControl * Ctrl ) { for ( Uint32 i = 0; i < mItems.size(); i++ ) { if ( mItems[i] == Ctrl ) { - Remove( i ); + remove( i ); break; } } } -void UIMenu::RemoveAll() { +void UIMenu::removeAll() { for ( Uint32 i = 0; i < mItems.size(); i++ ) { eeSAFE_DELETE( mItems[ i ] ); } @@ -300,28 +300,28 @@ void UIMenu::RemoveAll() { mNextPosY = 0; mMaxWidth = 0; - ResizeMe(); + resizeMe(); } -void UIMenu::Insert( const String& Text, SubTexture * Icon, const Uint32& Index ) { - Insert( CreateMenuItem( Text, Icon ), Index ); +void UIMenu::insert( const String& Text, SubTexture * Icon, const Uint32& Index ) { + insert( createMenuItem( Text, Icon ), Index ); } -void UIMenu::Insert( UIControl * Control, const Uint32& Index ) { +void UIMenu::insert( UIControl * Control, const Uint32& Index ) { mItems.insert( mItems.begin() + Index, Control ); childAddAt( Control, Index ); - ReposControls(); - ResizeControls(); + rePosControls(); + resizeControls(); } -bool UIMenu::IsSubMenu( UIControl * Ctrl ) { +bool UIMenu::isSubMenu( UIControl * Ctrl ) { for ( Uint32 i = 0; i < mItems.size(); i++ ) { if ( mItems[i]->isType( UI_TYPE_MENUSUBMENU ) ) { UIMenuSubMenu * tMenu = reinterpret_cast ( mItems[i] ); - if ( tMenu->subMenu() == Ctrl ) + if ( tMenu->getSubMenu() == Ctrl ) return true; } } @@ -344,7 +344,7 @@ Uint32 UIMenu::onMessage( const UIMessage * Msg ) { { UIControl * FocusCtrl = UIManager::instance()->focusControl(); - if ( this != FocusCtrl && !isParentOf( FocusCtrl ) && !IsSubMenu( FocusCtrl ) ) { + if ( this != FocusCtrl && !isParentOf( FocusCtrl ) && !isSubMenu( FocusCtrl ) ) { onComplexControlFocusLoss(); } @@ -365,21 +365,21 @@ void UIMenu::onSizeChange() { } } -void UIMenu::AutoPadding() { +void UIMenu::autoPadding() { if ( mFlags & UI_AUTO_PADDING ) { mPadding = makePadding(); } } -void UIMenu::ResizeControls() { - ResizeMe(); +void UIMenu::resizeControls() { + resizeMe(); for ( Uint32 i = 0; i < mItems.size(); i++ ) { - SetControlSize( mItems[i], i ); + setControlSize( mItems[i], i ); } } -void UIMenu::ReposControls() { +void UIMenu::rePosControls() { Uint32 i; mNextPosY = 0; mBiggestIcon = mMinSpaceForIcons; @@ -388,7 +388,7 @@ void UIMenu::ReposControls() { mMaxWidth = 0; for ( i = 0; i < mItems.size(); i++ ) { - CheckControlSize( mItems[i], false ); + checkControlSize( mItems[i], false ); } } @@ -398,10 +398,10 @@ void UIMenu::ReposControls() { mNextPosY += mItems[i]->getSize().getHeight(); } - ResizeMe(); + resizeMe(); } -void UIMenu::ResizeMe() { +void UIMenu::resizeMe() { if ( mFlags & UI_AUTO_SIZE ) { setSize( mMaxWidth, mNextPosY + mPadding.Top + mPadding.Bottom ); } else { @@ -428,13 +428,13 @@ bool UIMenu::hide() { return true; } -void UIMenu::SetItemSelected( UIControl * Item ) { +void UIMenu::setItemSelected( UIControl * Item ) { if ( NULL != mItemSelected ) { if ( mItemSelected->isType( UI_TYPE_MENUSUBMENU ) ) { UIMenuSubMenu * tMenu = reinterpret_cast ( mItemSelected ); - if ( NULL != tMenu->subMenu() ) - tMenu->subMenu()->hide(); + if ( NULL != tMenu->getSubMenu() ) + tMenu->getSubMenu()->hide(); } mItemSelected->setSkinState( UISkinState::StateNormal ); @@ -445,68 +445,68 @@ void UIMenu::SetItemSelected( UIControl * Item ) { if ( mItemSelected != Item ) { mItemSelected = Item; - mItemSelectedIndex = GetItemIndex( mItemSelected ); + mItemSelectedIndex = getItemIndex( mItemSelected ); } } -void UIMenu::TrySelect( UIControl * Ctrl, bool Up ) { +void UIMenu::trySelect( UIControl * Ctrl, bool Up ) { if ( mItems.size() ) { if ( !Ctrl->isType( UI_TYPE_SEPARATOR ) ) { - SetItemSelected( Ctrl ); + setItemSelected( Ctrl ); } else { - Uint32 Index = GetItemIndex( Ctrl ); + Uint32 Index = getItemIndex( Ctrl ); if ( Index != eeINDEX_NOT_FOUND ) { if ( Up ) { if ( Index > 0 ) { for ( Int32 i = (Int32)Index - 1; i >= 0; i-- ) { if ( !mItems[i]->isType( UI_TYPE_SEPARATOR ) ) { - SetItemSelected( mItems[i] ); + setItemSelected( mItems[i] ); return; } } } - SetItemSelected( mItems[ mItems.size() ] ); + setItemSelected( mItems[ mItems.size() ] ); } else { for ( Uint32 i = Index + 1; i < mItems.size(); i++ ) { if ( !mItems[i]->isType( UI_TYPE_SEPARATOR ) ) { - SetItemSelected( mItems[i] ); + setItemSelected( mItems[i] ); return; } } - SetItemSelected( mItems[0] ); + setItemSelected( mItems[0] ); } } } } } -void UIMenu::NextSel() { +void UIMenu::nextSel() { if ( mItems.size() ) { if ( mItemSelectedIndex != eeINDEX_NOT_FOUND ) { if ( mItemSelectedIndex + 1 < mItems.size() ) { - TrySelect( mItems[ mItemSelectedIndex + 1 ], false ); + trySelect( mItems[ mItemSelectedIndex + 1 ], false ); } else { - TrySelect( mItems[0], false ); + trySelect( mItems[0], false ); } } else { - TrySelect( mItems[0], false ); + trySelect( mItems[0], false ); } } } -void UIMenu::PrevSel() { +void UIMenu::prevSel() { if ( mItems.size() ) { if ( mItemSelectedIndex != eeINDEX_NOT_FOUND ) { if ( mItemSelectedIndex >= 1 ) { - TrySelect( mItems[ mItemSelectedIndex - 1 ], true ); + trySelect( mItems[ mItemSelectedIndex - 1 ], true ); } else { - TrySelect( mItems[ mItems.size() - 1 ], true ); + trySelect( mItems[ mItems.size() - 1 ], true ); } } else { - TrySelect( mItems[0], true ); + trySelect( mItems[0], true ); } } } @@ -516,12 +516,12 @@ Uint32 UIMenu::onKeyDown( const UIEventKey& Event ) { switch ( Event.getKeyCode() ) { case KEY_DOWN: mLastTickMove = Sys::getTicks(); - NextSel(); + nextSel(); break; case KEY_UP: mLastTickMove = Sys::getTicks(); - PrevSel(); + prevSel(); break; case KEY_RIGHT: @@ -555,11 +555,11 @@ Uint32 UIMenu::onKeyDown( const UIEventKey& Event ) { return UIComplexControl::onKeyDown( Event ); } -const Recti& UIMenu::Padding() const { +const Recti& UIMenu::getPadding() const { return mPadding; } -void UIMenu::FixMenuPos( Vector2i& Pos, UIMenu * Menu, UIMenu * Parent, UIMenuSubMenu * SubMenu ) { +void UIMenu::fixMenuPos( Vector2i& Pos, UIMenu * Menu, UIMenu * Parent, UIMenuSubMenu * SubMenu ) { eeAABB qScreen( 0.f, 0.f, UIManager::instance()->mainControl()->getSize().getWidth(), UIManager::instance()->mainControl()->getSize().getHeight() ); eeAABB qPos( Pos.x, Pos.y, Pos.x + Menu->getSize().getWidth(), Pos.y + Menu->getSize().getHeight() ); diff --git a/src/eepp/ui/uimenucheckbox.cpp b/src/eepp/ui/uimenucheckbox.cpp index eea0aa4ef..d2a708b7c 100644 --- a/src/eepp/ui/uimenucheckbox.cpp +++ b/src/eepp/ui/uimenucheckbox.cpp @@ -26,40 +26,36 @@ bool UIMenuCheckBox::isType( const Uint32& type ) const { void UIMenuCheckBox::setTheme( UITheme * Theme ) { UIControl::setThemeControl( Theme, "menuitem" ); - mSkinActive = Theme->getByName( Theme->abbr() + "_" + "menucheckbox_active" ); - mSkinInactive = Theme->getByName( Theme->abbr() + "_" + "menucheckbox_inactive" ); + mSkinActive = Theme->getByName( Theme->getAbbr() + "_" + "menucheckbox_active" ); + mSkinInactive = Theme->getByName( Theme->getAbbr() + "_" + "menucheckbox_inactive" ); - active( mActive ); + setActive( mActive ); doAftersetTheme(); } -const bool& UIMenuCheckBox::active() const { +const bool& UIMenuCheckBox::isActive() const { return mActive; } -const bool& UIMenuCheckBox::isActive() const { - return active(); -} - -void UIMenuCheckBox::active( const bool& active ) { +void UIMenuCheckBox::setActive( const bool& active ) { bool oActive = mActive; mActive = active; if ( mActive ) { if ( NULL != mSkinActive ) { if ( mSkinState->getState() == UISkinState::StateSelected ) - icon( mSkinActive->getSubTexture( UISkinState::StateMouseEnter ) ); + setIcon( mSkinActive->getSubTexture( UISkinState::StateMouseEnter ) ); else - icon( mSkinActive->getSubTexture( UISkinState::StateNormal ) ); + setIcon( mSkinActive->getSubTexture( UISkinState::StateNormal ) ); } else mIcon->subTexture( NULL ); } else { if ( NULL != mSkinInactive ) if ( mSkinState->getState() == UISkinState::StateSelected ) - icon( mSkinInactive->getSubTexture( UISkinState::StateMouseEnter ) ); + setIcon( mSkinInactive->getSubTexture( UISkinState::StateMouseEnter ) ); else - icon( mSkinInactive->getSubTexture( UISkinState::StateNormal ) ); + setIcon( mSkinInactive->getSubTexture( UISkinState::StateNormal ) ); else mIcon->subTexture( NULL ); } @@ -67,9 +63,9 @@ void UIMenuCheckBox::active( const bool& active ) { if ( oActive != active ) { UIMenu * Menu = reinterpret_cast ( getParent() ); - if ( !Menu->CheckControlSize( this ) ) { - if ( NULL != icon()->subTexture() ) { - padding( Recti( 0, 0, 0, 0 ) ); + if ( !Menu->checkControlSize( this ) ) { + if ( NULL != getIcon()->subTexture() ) { + setPadding( Recti( 0, 0, 0, 0 ) ); } } @@ -78,7 +74,7 @@ void UIMenuCheckBox::active( const bool& active ) { } void UIMenuCheckBox::switchActive() { - active( !mActive ); + setActive( !mActive ); } Uint32 UIMenuCheckBox::onMouseUp( const Vector2i &Pos, const Uint32 Flags ) { @@ -93,7 +89,7 @@ Uint32 UIMenuCheckBox::onMouseUp( const Vector2i &Pos, const Uint32 Flags ) { void UIMenuCheckBox::onStateChange() { UIMenuItem::onStateChange(); - active( mActive ); + setActive( mActive ); } bool UIMenuCheckBox::inheritsFrom( const Uint32 Type ) { diff --git a/src/eepp/ui/uimenuitem.cpp b/src/eepp/ui/uimenuitem.cpp index 02314b85f..15d3f003f 100644 --- a/src/eepp/ui/uimenuitem.cpp +++ b/src/eepp/ui/uimenuitem.cpp @@ -28,7 +28,7 @@ void UIMenuItem::setTheme( UITheme * Theme ) { Uint32 UIMenuItem::onMouseEnter( const Vector2i &Pos, const Uint32 Flags ) { UIPushButton::onMouseEnter( Pos, Flags ); - reinterpret_cast ( getParent() )->SetItemSelected( this ); + reinterpret_cast ( getParent() )->setItemSelected( this ); return 1; } diff --git a/src/eepp/ui/uimenusubmenu.cpp b/src/eepp/ui/uimenusubmenu.cpp index a89993132..5fdff726c 100644 --- a/src/eepp/ui/uimenusubmenu.cpp +++ b/src/eepp/ui/uimenusubmenu.cpp @@ -22,7 +22,7 @@ UIMenuSubMenu::UIMenuSubMenu( UIMenuSubMenu::CreateParams& Params ) : mArrow->setVisible( true ); mArrow->setEnabled( false ); - subMenu( Params.SubMenu ); + setSubMenu( Params.SubMenu ); applyDefaultTheme(); } @@ -41,7 +41,7 @@ bool UIMenuSubMenu::isType( const Uint32& type ) const { void UIMenuSubMenu::setTheme( UITheme * Theme ) { UIMenuItem::setTheme( Theme ); - mSkinArrow = Theme->getByName( Theme->abbr() + "_" + "menuarrow" ); + mSkinArrow = Theme->getByName( Theme->getAbbr() + "_" + "menuarrow" ); onStateChange(); } @@ -66,7 +66,7 @@ void UIMenuSubMenu::onStateChange() { } } -void UIMenuSubMenu::subMenu( UIMenu * SubMenu ) { +void UIMenuSubMenu::setSubMenu( UIMenu * SubMenu ) { if ( NULL != mSubMenu && mSubMenu != SubMenu ) { mSubMenu->removeEventListener( mCbId ); mSubMenu->removeEventListener( mCbId2 ); @@ -80,7 +80,7 @@ void UIMenuSubMenu::subMenu( UIMenu * SubMenu ) { } } -UIMenu * UIMenuSubMenu::subMenu() const { +UIMenu * UIMenuSubMenu::getSubMenu() const { return mSubMenu; } @@ -103,9 +103,9 @@ void UIMenuSubMenu::showSubMenu() { Vector2i Pos = this->getPosition(); controlToScreen( Pos ); - Pos.x += mSize.getWidth() + reinterpret_cast ( getParent() )->Padding().Right; + Pos.x += mSize.getWidth() + reinterpret_cast ( getParent() )->getPadding().Right; - UIMenu::FixMenuPos( Pos, mSubMenu, reinterpret_cast ( getParent() ), this ); + UIMenu::fixMenuPos( Pos, mSubMenu, reinterpret_cast ( getParent() ), this ); mSubMenu->getParent()->worldToControl( Pos ); mSubMenu->setPosition( Pos ); diff --git a/src/eepp/ui/uimessagebox.cpp b/src/eepp/ui/uimessagebox.cpp index 3a62b4cc0..79f5e5e20 100644 --- a/src/eepp/ui/uimessagebox.cpp +++ b/src/eepp/ui/uimessagebox.cpp @@ -8,7 +8,7 @@ UIMessageBox::UIMessageBox( const UIMessageBox::CreateParams& Params ) : mMsgBoxType( Params.Type ), mCloseWithKey( Params.CloseWithKey ) { - UITheme * Theme = UIThemeManager::instance()->defaultTheme(); + UITheme * Theme = UIThemeManager::instance()->getDefaultTheme(); if ( NULL == Theme ) { @@ -52,25 +52,25 @@ UIMessageBox::UIMessageBox( const UIMessageBox::CreateParams& Params ) : switch ( mMsgBoxType ) { case MSGBOX_OKCANCEL: { - mButtonOK->text( "OK" ); - mButtonCancel->text( "Cancel" ); + mButtonOK->setText( "OK" ); + mButtonCancel->setText( "Cancel" ); break; } case MSGBOX_YESNO: { - mButtonOK->text( "Yes" ); - mButtonCancel->text( "No" ); + mButtonOK->setText( "Yes" ); + mButtonCancel->setText( "No" ); break; } case MSGBOX_RETRYCANCEL: { - mButtonOK->text( "Retry" ); - mButtonCancel->text( "Cancel" ); + mButtonOK->setText( "Retry" ); + mButtonCancel->setText( "Cancel" ); break; } case MSGBOX_OK: { - mButtonOK->text( "OK" ); + mButtonOK->setText( "OK" ); mButtonCancel->setVisible( false ); mButtonCancel->setEnabled( false ); break; @@ -91,16 +91,16 @@ UIMessageBox::~UIMessageBox() { void UIMessageBox::setTheme( UITheme * Theme ) { UIWindow::setTheme( Theme ); - if ( "Retry" != mButtonOK->text() ) { + if ( "Retry" != mButtonOK->getText() ) { SubTexture * OKIcon = Theme->getIconByName( "ok" ); SubTexture * CancelIcon = Theme->getIconByName( "cancel" ); if ( NULL != OKIcon ) { - mButtonOK->icon( OKIcon ); + mButtonOK->setIcon( OKIcon ); } if ( NULL != CancelIcon ) { - mButtonCancel->icon( CancelIcon ); + mButtonCancel->setIcon( CancelIcon ); } } diff --git a/src/eepp/ui/uipopupmenu.cpp b/src/eepp/ui/uipopupmenu.cpp index 4da052307..8b7f4ed27 100644 --- a/src/eepp/ui/uipopupmenu.cpp +++ b/src/eepp/ui/uipopupmenu.cpp @@ -37,8 +37,8 @@ bool UIPopUpMenu::show() { toFront(); - if ( UIThemeManager::instance()->defaultEffectsEnabled() ) { - startAlphaAnim( 255.f == mAlpha ? 0.f : mAlpha, 255.f, UIThemeManager::instance()->controlsFadeInTime() ); + if ( UIThemeManager::instance()->getDefaultEffectsEnabled() ) { + startAlphaAnim( 255.f == mAlpha ? 0.f : mAlpha, 255.f, UIThemeManager::instance()->getControlsFadeInTime() ); } setFocus(); @@ -58,8 +58,8 @@ bool UIPopUpMenu::hide() { mItemSelected = NULL; mItemSelectedIndex = eeINDEX_NOT_FOUND; - if ( UIThemeManager::instance()->defaultEffectsEnabled() ) { - disableFadeOut( UIThemeManager::instance()->controlsFadeOutTime() ); + if ( UIThemeManager::instance()->getDefaultEffectsEnabled() ) { + disableFadeOut( UIThemeManager::instance()->getControlsFadeOutTime() ); } else { setEnabled( false ); setVisible( false ); diff --git a/src/eepp/ui/uiprogressbar.cpp b/src/eepp/ui/uiprogressbar.cpp index d3d8d3cd0..08a2e82d1 100644 --- a/src/eepp/ui/uiprogressbar.cpp +++ b/src/eepp/ui/uiprogressbar.cpp @@ -58,7 +58,7 @@ void UIProgressBar::setTheme( UITheme * Theme ) { setSize( mSize.x, getSkinSize().getHeight() ); } - UISkin * tSkin = Theme->getByName( Theme->abbr() + "_progressbar_filler" ); + UISkin * tSkin = Theme->getByName( Theme->getAbbr() + "_progressbar_filler" ); if ( tSkin ) { SubTexture * tSubTexture = tSkin->getSubTexture( UISkinState::StateNormal ); @@ -103,40 +103,40 @@ void UIProgressBar::onSizeChange() { updateTextBox(); } -void UIProgressBar::progress( Float Val ) { +void UIProgressBar::setProgress( Float Val ) { mProgress = Val; onValueChange(); updateTextBox(); } -const Float& UIProgressBar::progress() const { +const Float& UIProgressBar::getProgress() const { return mProgress; } -void UIProgressBar::totalSteps( const Float& Steps ) { +void UIProgressBar::setTotalSteps( const Float& Steps ) { mTotalSteps = Steps; onSizeChange(); updateTextBox(); } -const Float& UIProgressBar::totalSteps() const { +const Float& UIProgressBar::getTotalSteps() const { return mTotalSteps; } -void UIProgressBar::movementSpeed( const Vector2f& Speed ) { +void UIProgressBar::setMovementSpeed( const Vector2f& Speed ) { mSpeed = Speed; if ( NULL != mParallax ) mParallax->setSpeed( mSpeed ); } -const Vector2f& UIProgressBar::movementSpeed() const { +const Vector2f& UIProgressBar::getMovementSpeed() const { return mSpeed; } -void UIProgressBar::verticalExpand( const bool& VerticalExpand ) { +void UIProgressBar::setVerticalExpand( const bool& VerticalExpand ) { if ( VerticalExpand != mVerticalExpand ) { mVerticalExpand = VerticalExpand; @@ -144,28 +144,28 @@ void UIProgressBar::verticalExpand( const bool& VerticalExpand ) { } } -const bool& UIProgressBar::verticalExpand() const { +const bool& UIProgressBar::getVerticalExpand() const { return mVerticalExpand; } -void UIProgressBar::fillerMargin( const Rectf& margin ) { +void UIProgressBar::setFillerMargin( const Rectf& margin ) { mFillerMargin = margin; onPositionChange(); onSizeChange(); } -const Rectf& UIProgressBar::fillerMargin() const { +const Rectf& UIProgressBar::getFillerMargin() const { return mFillerMargin; } -void UIProgressBar::displayPercent( const bool& DisplayPercent ) { +void UIProgressBar::setDisplayPercent( const bool& DisplayPercent ) { mDisplayPercent = DisplayPercent; updateTextBox(); } -const bool& UIProgressBar::displayPercent() const { +const bool& UIProgressBar::getDisplayPercent() const { return mDisplayPercent; } diff --git a/src/eepp/ui/uipushbutton.cpp b/src/eepp/ui/uipushbutton.cpp index 2ab69b3ab..516c8757f 100644 --- a/src/eepp/ui/uipushbutton.cpp +++ b/src/eepp/ui/uipushbutton.cpp @@ -29,7 +29,7 @@ UIPushButton::UIPushButton( const UIPushButton::CreateParams& Params ) : mIcon->setVisible( true ); mIcon->setEnabled( false ); - icon( Params.Icon ); + setIcon( Params.Icon ); UITextBox::CreateParams TxtParams = Params; TxtParams.setParent( this ); @@ -128,8 +128,8 @@ void UIPushButton::setTheme( UITheme * Theme ) { } void UIPushButton::doAftersetTheme() { - if ( NULL != mTextBox && NULL == mTextBox->getFont() && NULL != mSkinState && NULL != mSkinState->getSkin() && NULL != mSkinState->getSkin()->theme() && NULL != mSkinState->getSkin()->theme()->font() ) - mTextBox->setFont( mSkinState->getSkin()->theme()->font() ); + if ( NULL != mTextBox && NULL == mTextBox->getFont() && NULL != mSkinState && NULL != mSkinState->getSkin() && NULL != mSkinState->getSkin()->getTheme() && NULL != mSkinState->getSkin()->getTheme()->getFont() ) + mTextBox->setFont( mSkinState->getSkin()->getTheme()->getFont() ); if ( mControlFlags & UI_CTRL_FLAG_FREE_USE ) { Recti RMargin = makePadding( true, false, false, false, true ); @@ -147,42 +147,42 @@ void UIPushButton::doAftersetTheme() { void UIPushButton::autoPadding() { if ( mFlags & UI_AUTO_PADDING ) { - padding( makePadding( true, false, true, false ) ); + setPadding( makePadding( true, false, true, false ) ); } } -void UIPushButton::icon( SubTexture * Icon ) { +void UIPushButton::setIcon( SubTexture * Icon ) { mIcon->subTexture( Icon ); onSizeChange(); } -UIGfx * UIPushButton::icon() const { +UIGfx * UIPushButton::getIcon() const { return mIcon; } -void UIPushButton::text( const String& text ) { +void UIPushButton::setText( const String& text ) { mTextBox->setText( text ); onSizeChange(); } -const String& UIPushButton::text() { +const String& UIPushButton::getText() { return mTextBox->getText(); } -void UIPushButton::padding( const Recti& padding ) { +void UIPushButton::setPadding( const Recti& padding ) { mTextBox->setPadding( padding ); } -const Recti& UIPushButton::padding() const { +const Recti& UIPushButton::getPadding() const { return mTextBox->getPadding(); } -void UIPushButton::iconHorizontalMargin( Int32 margin ) { +void UIPushButton::setIconHorizontalMargin( Int32 margin ) { mIconSpace = margin; onSizeChange(); } -const Int32& UIPushButton::iconHorizontalMargin() const { +const Int32& UIPushButton::getIconHorizontalMargin() const { return mIconSpace; } @@ -226,20 +226,20 @@ Uint32 UIPushButton::onKeyUp( const UIEventKey& Event ) { return UIComplexControl::onKeyUp( Event ); } -const ColorA& UIPushButton::fontColor() const { +const ColorA& UIPushButton::getFontColor() const { return mFontColor; } -void UIPushButton::fontColor( const ColorA& color ) { +void UIPushButton::setFontColor( const ColorA& color ) { mFontColor = color; onStateChange(); } -const ColorA& UIPushButton::fontOverColor() const { +const ColorA& UIPushButton::getFontOverColor() const { return mFontOverColor; } -void UIPushButton::fontOverColor( const ColorA& color ) { +void UIPushButton::setFontOverColor( const ColorA& color ) { mFontOverColor = color; onStateChange(); } diff --git a/src/eepp/ui/uiradiobutton.cpp b/src/eepp/ui/uiradiobutton.cpp index f310bb4af..d9c4f5452 100644 --- a/src/eepp/ui/uiradiobutton.cpp +++ b/src/eepp/ui/uiradiobutton.cpp @@ -112,10 +112,10 @@ Uint32 UIRadioButton::onMessage( const UIMessage * Msg ) { } void UIRadioButton::switchState() { - active( !mActive ); + setActive( !mActive ); } -void UIRadioButton::active( const bool& active ) { +void UIRadioButton::setActive( const bool& active ) { if ( !active ) { if ( checkActives() ) { mActiveButton->setVisible( false ); @@ -142,8 +142,8 @@ void UIRadioButton::active( const bool& active ) { if ( tChild != this ) { UIRadioButton * tRB = reinterpret_cast ( tChild ); - if ( tRB->active() ) - tRB->active( false ); + if ( tRB->isActive() ) + tRB->setActive( false ); } } @@ -161,7 +161,7 @@ bool UIRadioButton::checkActives() { if ( tChild != this ) { UIRadioButton * tRB = reinterpret_cast ( tChild ); - if ( tRB->active() ) + if ( tRB->isActive() ) return true; } } @@ -184,7 +184,7 @@ void UIRadioButton::autoActivate() { if ( tChild != this ) { UIRadioButton * tRB = reinterpret_cast ( tChild ); - if ( tRB->active() ) { + if ( tRB->isActive() ) { return; } } @@ -194,15 +194,11 @@ void UIRadioButton::autoActivate() { } } - active( true ); -} - -const bool& UIRadioButton::active() const { - return mActive; + setActive( true ); } const bool& UIRadioButton::isActive() const { - return active(); + return mActive; } void UIRadioButton::setPadding( const Recti& padding ) { @@ -210,11 +206,11 @@ void UIRadioButton::setPadding( const Recti& padding ) { mPadding.Left = mPadding.Left + mActiveButton->getSize().getWidth(); } -UIControlAnim * UIRadioButton::activeButton() const { +UIControlAnim * UIRadioButton::getActiveButton() const { return mActiveButton; } -UIControlAnim * UIRadioButton::inactiveButton() const { +UIControlAnim * UIRadioButton::getInactiveButton() const { return mInactiveButton; } @@ -223,7 +219,7 @@ Uint32 UIRadioButton::onKeyDown( const UIEventKey& Event ) { if ( Sys::getTicks() - mLastTick > 250 ) { mLastTick = Sys::getTicks(); - active( true ); + setActive( true ); } } diff --git a/src/eepp/ui/uiscrollbar.cpp b/src/eepp/ui/uiscrollbar.cpp index e226ef438..3c0334449 100644 --- a/src/eepp/ui/uiscrollbar.cpp +++ b/src/eepp/ui/uiscrollbar.cpp @@ -157,9 +157,9 @@ void UIScrollBar::update() { void UIScrollBar::manageClick( const Uint32& Flags ) { if ( Flags & EE_BUTTONS_WUWD ) { if ( Flags & EE_BUTTON_WUMASK ) - mSlider->value( value() + clickStep() ); + mSlider->setValue( getValue() + getClickStep() ); else - mSlider->value( value() - clickStep() ); + mSlider->setValue( getValue() - getClickStep() ); } } @@ -169,9 +169,9 @@ Uint32 UIScrollBar::onMessage( const UIMessage * Msg ) { { if ( Msg->getFlags() & EE_BUTTON_LMASK ) { if ( Msg->getSender() == mBtnUp ) { - mSlider->value( value() - clickStep() ); + mSlider->setValue( getValue() - getClickStep() ); } else if ( Msg->getSender() == mBtnDown ) { - mSlider->value( value() + clickStep() ); + mSlider->setValue( getValue() + getClickStep() ); } } @@ -182,36 +182,36 @@ Uint32 UIScrollBar::onMessage( const UIMessage * Msg ) { return 0; } -void UIScrollBar::value( Float Val ) { - mSlider->value( Val ); +void UIScrollBar::setValue( Float Val ) { + mSlider->setValue( Val ); } -const Float& UIScrollBar::value() const { - return mSlider->value(); +const Float& UIScrollBar::getValue() const { + return mSlider->getValue(); } -void UIScrollBar::minValue( const Float& MinVal ) { - mSlider->minValue( MinVal ); +void UIScrollBar::setMinValue( const Float& MinVal ) { + mSlider->setMinValue( MinVal ); } -const Float& UIScrollBar::minValue() const { - return mSlider->minValue(); +const Float& UIScrollBar::getMinValue() const { + return mSlider->getMinValue(); } -void UIScrollBar::maxValue( const Float& MaxVal ) { - mSlider->maxValue( MaxVal ); +void UIScrollBar::setMaxValue( const Float& MaxVal ) { + mSlider->setMaxValue( MaxVal ); } -const Float& UIScrollBar::maxValue() const { - return mSlider->maxValue(); +const Float& UIScrollBar::getMaxValue() const { + return mSlider->getMaxValue(); } -void UIScrollBar::clickStep( const Float& step ) { - mSlider->clickStep( step ); +void UIScrollBar::setClickStep( const Float& step ) { + mSlider->setClickStep( step ); } -const Float& UIScrollBar::clickStep() const { - return mSlider->clickStep(); +const Float& UIScrollBar::getClickStep() const { + return mSlider->getClickStep(); } const bool& UIScrollBar::isVertical() const { diff --git a/src/eepp/ui/uiselectbutton.cpp b/src/eepp/ui/uiselectbutton.cpp index b3ee348a7..ac7788620 100644 --- a/src/eepp/ui/uiselectbutton.cpp +++ b/src/eepp/ui/uiselectbutton.cpp @@ -54,11 +54,11 @@ void UISelectButton::onStateChange() { UIWinMenu * Menu = reinterpret_cast ( getParent() ); if ( mSkinState->getState() == UISkinState::StateSelected ) { - getTextBox()->setColor( Menu->fontSelectedColor() ); + getTextBox()->setColor( Menu->getFontSelectedColor() ); } else if ( mSkinState->getState() == UISkinState::StateMouseEnter ) { - getTextBox()->setColor( Menu->fontOverColor() ); + getTextBox()->setColor( Menu->getFontOverColor() ); } else { - getTextBox()->setColor( Menu->fontColor() ); + getTextBox()->setColor( Menu->getFontColor() ); } } } diff --git a/src/eepp/ui/uiskin.cpp b/src/eepp/ui/uiskin.cpp index 3ec86d3db..4467e035c 100644 --- a/src/eepp/ui/uiskin.cpp +++ b/src/eepp/ui/uiskin.cpp @@ -66,11 +66,11 @@ void UISkin::setSkins() { setSkin( i ); } -UITheme * UISkin::theme() const { +UITheme * UISkin::getTheme() const { return mTheme; } -void UISkin::theme( UITheme * theme ) { +void UISkin::setTheme( UITheme * theme ) { mTheme = theme; } diff --git a/src/eepp/ui/uiskincomplex.cpp b/src/eepp/ui/uiskincomplex.cpp index df0b8fb2a..135d2c3ff 100644 --- a/src/eepp/ui/uiskincomplex.cpp +++ b/src/eepp/ui/uiskincomplex.cpp @@ -174,7 +174,7 @@ void UISkinComplex::stateNormalToState( const Uint32& State ) { } } -UISkinComplex * UISkinComplex::copy( const std::string& NewName, const bool& CopyColorsState ) { +UISkinComplex * UISkinComplex::clone( const std::string& NewName, const bool& CopyColorsState ) { UISkinComplex * SkinC = eeNew( UISkinComplex, ( NewName ) ); if ( CopyColorsState ) { @@ -188,8 +188,8 @@ UISkinComplex * UISkinComplex::copy( const std::string& NewName, const bool& Cop return SkinC; } -UISkin * UISkinComplex::copy() { - return copy( mName, true ); +UISkin * UISkinComplex::clone() { + return clone( mName, true ); } }} diff --git a/src/eepp/ui/uiskinsimple.cpp b/src/eepp/ui/uiskinsimple.cpp index 2537a9b14..f4608370b 100644 --- a/src/eepp/ui/uiskinsimple.cpp +++ b/src/eepp/ui/uiskinsimple.cpp @@ -54,7 +54,7 @@ void UISkinSimple::stateNormalToState( const Uint32& State ) { mSubTexture[ State ] = mSubTexture[ UISkinState::StateNormal ]; } -UISkinSimple * UISkinSimple::copy( const std::string& NewName, const bool& CopyColorsState ) { +UISkinSimple * UISkinSimple::clone( const std::string& NewName, const bool& CopyColorsState ) { UISkinSimple * SkinS = eeNew( UISkinSimple, ( NewName ) ); if ( CopyColorsState ) { @@ -68,8 +68,8 @@ UISkinSimple * UISkinSimple::copy( const std::string& NewName, const bool& CopyC return SkinS; } -UISkin * UISkinSimple::copy() { - return copy( mName, true ); +UISkin * UISkinSimple::clone() { + return clone( mName, true ); } }} diff --git a/src/eepp/ui/uislider.cpp b/src/eepp/ui/uislider.cpp index af43e39d1..63d7f65fb 100644 --- a/src/eepp/ui/uislider.cpp +++ b/src/eepp/ui/uislider.cpp @@ -74,7 +74,7 @@ void UISlider::setTheme( UITheme * Theme ) { adjustChilds(); - value( mValue ); + setValue( mValue ); } void UISlider::onSizeChange() { @@ -159,9 +159,9 @@ void UISlider::fixSliderPos() { mSlider->centerVertical(); if ( mAllowHalfSliderOut ) - value( mMinValue + (Float)mSlider->getPosition().x * ( mMaxValue - mMinValue ) / (Float)mBackSlider->getSize().getWidth() ); + setValue( mMinValue + (Float)mSlider->getPosition().x * ( mMaxValue - mMinValue ) / (Float)mBackSlider->getSize().getWidth() ); else - value( mMinValue + (Float)mSlider->getPosition().x * ( mMaxValue - mMinValue ) / ( (Float)mSize.getWidth() - mSlider->getSize().getWidth() ) ); + setValue( mMinValue + (Float)mSlider->getPosition().x * ( mMaxValue - mMinValue ) / ( (Float)mSize.getWidth() - mSlider->getSize().getWidth() ) ); } else { mSlider->setPosition( 0, mSlider->getPosition().y ); @@ -179,16 +179,16 @@ void UISlider::fixSliderPos() { mSlider->centerHorizontal(); if ( mAllowHalfSliderOut ) - value( mMinValue + (Float)mSlider->getPosition().y * ( mMaxValue - mMinValue ) / (Float)mBackSlider->getSize().getHeight() ); + setValue( mMinValue + (Float)mSlider->getPosition().y * ( mMaxValue - mMinValue ) / (Float)mBackSlider->getSize().getHeight() ); else - value( mMinValue + (Float)mSlider->getPosition().y * ( mMaxValue - mMinValue ) / ( (Float)mSize.getHeight() - mSlider->getSize().getHeight() ) ); + setValue( mMinValue + (Float)mSlider->getPosition().y * ( mMaxValue - mMinValue ) / ( (Float)mSize.getHeight() - mSlider->getSize().getHeight() ) ); } mOnPosChange = false; } } -void UISlider::value( Float Val ) { +void UISlider::setValue( Float Val ) { if ( Val < mMinValue ) Val = mMinValue; if ( Val > mMaxValue ) Val = mMaxValue; @@ -219,11 +219,11 @@ void UISlider::value( Float Val ) { } } -const Float& UISlider::value() const { +const Float& UISlider::getValue() const { return mValue; } -void UISlider::minValue( const Float& MinVal ) { +void UISlider::setMinValue( const Float& MinVal ) { mMinValue = MinVal; if ( mValue < mMinValue ) @@ -232,11 +232,11 @@ void UISlider::minValue( const Float& MinVal ) { fixSliderPos(); } -const Float& UISlider::minValue() const { +const Float& UISlider::getMinValue() const { return mMinValue; } -void UISlider::maxValue( const Float& MaxVal ) { +void UISlider::setMaxValue( const Float& MaxVal ) { mMaxValue = MaxVal; if ( mValue > mMaxValue ) @@ -245,15 +245,15 @@ void UISlider::maxValue( const Float& MaxVal ) { fixSliderPos(); } -const Float& UISlider::maxValue() const { +const Float& UISlider::getMaxValue() const { return mMaxValue; } -void UISlider::clickStep( const Float& step ) { +void UISlider::setClickStep( const Float& step ) { mClickStep = step; } -const Float& UISlider::clickStep() const { +const Float& UISlider::getClickStep() const { return mClickStep; } @@ -274,19 +274,19 @@ Uint32 UISlider::onKeyDown( const UIEventKey &Event ) { if ( Event.getKeyCode() == KEY_DOWN ) { mLastTickMove = Sys::getTicks(); - value( mValue + mClickStep ); + setValue( mValue + mClickStep ); } else if ( Event.getKeyCode() == KEY_UP ) { mLastTickMove = Sys::getTicks(); - value( mValue - mClickStep ); + setValue( mValue - mClickStep ); } else if ( Event.getKeyCode() == KEY_PAGEUP ) { mLastTickMove = Sys::getTicks(); - value( mMinValue ); + setValue( mMinValue ); } else if ( Event.getKeyCode() == KEY_PAGEDOWN ) { mLastTickMove = Sys::getTicks(); - value( mMaxValue ); + setValue( mMaxValue ); } } @@ -301,20 +301,20 @@ void UISlider::manageClick( const Uint32& Flags ) { if ( Flags & EE_BUTTON_LMASK && !mSlider->isMouseOver() ) { if ( !mVertical ) { if ( ControlPos.x < 0 ) - value( mValue - mClickStep ); + setValue( mValue - mClickStep ); else - value( mValue + mClickStep ); + setValue( mValue + mClickStep ); } else { if ( ControlPos.y < 0 ) - value( mValue - mClickStep ); + setValue( mValue - mClickStep ); else - value( mValue + mClickStep ); + setValue( mValue + mClickStep ); } } else if ( Flags & EE_BUTTONS_WUWD ) { if ( Flags & EE_BUTTON_WUMASK ) - value( mValue - mClickStep ); + setValue( mValue - mClickStep ); else - value( mValue + mClickStep ); + setValue( mValue + mClickStep ); } } } @@ -327,11 +327,11 @@ UIDragable * UISlider::getSliderButton() const { return mSlider; } -const bool& UISlider::allowHalfSliderOut() const { +const bool& UISlider::isHalfSliderOutAllowed() const { return mAllowHalfSliderOut; } -const bool& UISlider::expandBackground() const { +const bool& UISlider::isBackgroundExpanded() const { return mExpandBackground; } diff --git a/src/eepp/ui/uispinbox.cpp b/src/eepp/ui/uispinbox.cpp index ad7e90e1c..016c48804 100644 --- a/src/eepp/ui/uispinbox.cpp +++ b/src/eepp/ui/uispinbox.cpp @@ -104,19 +104,19 @@ void UISpinBox::adjustChilds() { mInput->setSize( mSize.getWidth() - mPushUp->getSize().getWidth(), mSize.getHeight() ); } -void UISpinBox::padding( const Recti& padding ) { +void UISpinBox::setPadding( const Recti& padding ) { mInput->setPadding( padding ); } -const Recti& UISpinBox::padding() const { +const Recti& UISpinBox::getPadding() const { return mInput->getPadding(); } -void UISpinBox::clickStep( const Float& step ) { +void UISpinBox::setClickStep( const Float& step ) { mClickStep = step; } -const Float& UISpinBox::clickStep() const { +const Float& UISpinBox::getClickStep() const { return mClickStep; } @@ -148,7 +148,7 @@ void UISpinBox::addValue( const Float& value ) { if ( !mInput->getText().size() ) mInput->setText( String::toStr( static_cast( mMinValue ) ) ); - this->value( mValue + value ); + this->setValue( mValue + value ); } void UISpinBox::internalValue( const Float& Val, const bool& Force ) { @@ -170,33 +170,33 @@ void UISpinBox::internalValue( const Float& Val, const bool& Force ) { } } -void UISpinBox::value( const Float& Val ) { +void UISpinBox::setValue( const Float& Val ) { internalValue( Val, false ); } -const Float& UISpinBox::value() const { +const Float& UISpinBox::getValue() const { return mValue; } -void UISpinBox::minValue( const Float& MinVal ) { +void UISpinBox::setMinValue( const Float& MinVal ) { mMinValue = MinVal; if ( mValue < mMinValue ) mValue = mMinValue; } -const Float& UISpinBox::minValue() const { +const Float& UISpinBox::getMinValue() const { return mMinValue; } -void UISpinBox::maxValue( const Float& MaxVal ) { +void UISpinBox::setMaxValue( const Float& MaxVal ) { mMaxValue = MaxVal; if ( mValue > mMaxValue ) mValue = mMaxValue; } -const Float& UISpinBox::maxValue() const { +const Float& UISpinBox::getMaxValue() const { return mMaxValue; } @@ -207,7 +207,7 @@ void UISpinBox::update() { if ( Changed ) { if ( !mInput->getText().size() ) { - value( 0 ); + setValue( 0 ); } else { Float Val = mValue; @@ -220,7 +220,7 @@ void UISpinBox::update() { bool Res = String::fromString( Val, mInput->getText() ); if ( Res ) - value( Val ); + setValue( Val ); } } } diff --git a/src/eepp/ui/uisprite.cpp b/src/eepp/ui/uisprite.cpp index bdeef885b..cfd844e05 100644 --- a/src/eepp/ui/uisprite.cpp +++ b/src/eepp/ui/uisprite.cpp @@ -37,7 +37,7 @@ Uint32 UISprite::deallocSprite() { return mControlFlags & UI_CTRL_FLAG_FREE_USE; } -void UISprite::sprite( Graphics::Sprite * sprite ) { +void UISprite::setSprite( Graphics::Sprite * sprite ) { if ( deallocSprite() ) eeSAFE_DELETE( mSprite ); @@ -73,29 +73,29 @@ void UISprite::setAlpha( const Float& alpha ) { mSprite->setAlpha( alpha ); } -Graphics::Sprite * UISprite::sprite() const { +Graphics::Sprite * UISprite::getSprite() const { return mSprite; } -ColorA UISprite::color() const { +ColorA UISprite::getColor() const { if ( NULL != mSprite ) return mSprite->getColor(); return ColorA(); } -void UISprite::color( const ColorA& color ) { +void UISprite::setColor( const ColorA& color ) { if ( NULL != mSprite ) mSprite->setColor( color ); setAlpha( color.a() ); } -const EE_RENDER_MODE& UISprite::renderMode() const { +const EE_RENDER_MODE& UISprite::getRenderMode() const { return mRender; } -void UISprite::renderMode( const EE_RENDER_MODE& render ) { +void UISprite::setRenderMode( const EE_RENDER_MODE& render ) { mRender = render; } @@ -131,7 +131,7 @@ void UISprite::autoAlign() { } } -const Vector2i& UISprite::alignOffset() const { +const Vector2i& UISprite::getAlignOffset() const { return mAlignOffset; } diff --git a/src/eepp/ui/uitab.cpp b/src/eepp/ui/uitab.cpp index 7b006f8be..9c42bfc9f 100644 --- a/src/eepp/ui/uitab.cpp +++ b/src/eepp/ui/uitab.cpp @@ -39,7 +39,7 @@ void UITab::setTheme( UITheme * Theme ) { if ( tTabW->mSpecialBorderTabs ) { if ( 0 == tTabW->getTabIndex( this ) ) { tabPos = "tab_left"; - } else if ( tTabW->count() > 0 && ( tTabW->count() - 1 ) == tTabW->getTabIndex( this ) ) { + } else if ( tTabW->getCount() > 0 && ( tTabW->getCount() - 1 ) == tTabW->getTabIndex( this ) ) { tabPos = "tab_right"; } } @@ -82,16 +82,16 @@ void UITab::onStateChange() { } } -const String& UITab::text() { - return UIPushButton::text(); +const String& UITab::getText() { + return UIPushButton::getText(); } -void UITab::text( const String &text ) { +void UITab::setText( const String &text ) { UITabWidget * tTabW = getTabWidget(); if ( NULL != tTabW ) { if ( text.size() > tTabW->mMaxTextLength ) { - UIPushButton::text( text.substr( 0, tTabW->mMaxTextLength ) ); + UIPushButton::setText( text.substr( 0, tTabW->mMaxTextLength ) ); setRealSize(); @@ -99,7 +99,7 @@ void UITab::text( const String &text ) { } } - UIPushButton::text( text ); + UIPushButton::setText( text ); setRealSize(); } diff --git a/src/eepp/ui/uitabwidget.cpp b/src/eepp/ui/uitabwidget.cpp index 80e41b8b7..3fc054c6e 100644 --- a/src/eepp/ui/uitabwidget.cpp +++ b/src/eepp/ui/uitabwidget.cpp @@ -67,7 +67,7 @@ void UITabWidget::setTheme( UITheme * Theme ) { mCtrlContainer->setThemeControl( Theme, "tabcontainer" ); if ( 0 == mTabWidgetHeight ) { - UISkin * tSkin = Theme->getByName( Theme->abbr() + "_" + "tab" ); + UISkin * tSkin = Theme->getByName( Theme->getAbbr() + "_" + "tab" ); Sizei tSize1 = getSkinSize( tSkin ); Sizei tSize2 = getSkinSize( tSkin, UISkinState::StateSelected ); @@ -203,7 +203,7 @@ UITab * UITabWidget::createTab( const String& Text, UIControl * CtrlOwned, SubTe UITab * tCtrl = eeNew( UITab, ( Params, CtrlOwned ) ); - tCtrl->text( Text ); + tCtrl->setText( Text ); tCtrl->setVisible( true ); tCtrl->setEnabled( true ); @@ -242,7 +242,7 @@ UITab * UITabWidget::getTab( const String& Text ) { if ( mTabs[i]->isType( UI_TYPE_TAB ) ) { UITab * tTab = reinterpret_cast( mTabs[i] ); - if ( tTab->text() == Text ) + if ( tTab->getText() == Text ) return tTab; } } @@ -259,7 +259,7 @@ Uint32 UITabWidget::getTabIndex( UITab * Tab ) { return eeINDEX_NOT_FOUND; } -Uint32 UITabWidget::count() const { +Uint32 UITabWidget::getCount() const { return mTabs.size(); } diff --git a/src/eepp/ui/uitextbox.cpp b/src/eepp/ui/uitextbox.cpp index 4d8c4d2f6..fdc674311 100644 --- a/src/eepp/ui/uitextbox.cpp +++ b/src/eepp/ui/uitextbox.cpp @@ -23,8 +23,8 @@ UITextBox::UITextBox( const UITextBox::CreateParams& Params ) : mTextCache->setShadowColor( mFontShadowColor ); if ( NULL == Params.Font ) { - if ( NULL != UIThemeManager::instance()->defaultFont() ) - mTextCache->setFont( UIThemeManager::instance()->defaultFont() ); + if ( NULL != UIThemeManager::instance()->getDefaultFont() ) + mTextCache->setFont( UIThemeManager::instance()->getDefaultFont() ); else eePRINTL( "UITextBox::UITextBox : Created a UI TextBox without a defined font." ); } @@ -224,8 +224,8 @@ const Recti& UITextBox::getPadding() const { void UITextBox::setTheme( UITheme * Theme ) { UIControlAnim::setTheme( Theme ); - if ( NULL == mTextCache->getFont() && NULL != Theme->font() ) { - mTextCache->setFont( Theme->font() ); + if ( NULL == mTextCache->getFont() && NULL != Theme->getFont() ) { + mTextCache->setFont( Theme->getFont() ); } } diff --git a/src/eepp/ui/uitextedit.cpp b/src/eepp/ui/uitextedit.cpp index 282b1e91f..c500b106e 100644 --- a/src/eepp/ui/uitextedit.cpp +++ b/src/eepp/ui/uitextedit.cpp @@ -56,7 +56,7 @@ UITextEdit::UITextEdit( UITextEdit::CreateParams& Params ) : ScrollBarP.Flags = UI_AUTO_SIZE; ScrollBarP.VerticalScrollBar = true; mVScrollBar = eeNew( UIScrollBar, ( ScrollBarP ) ); - mVScrollBar->value( 1 ); + mVScrollBar->setValue( 1 ); ScrollBarP.setPosition( 0, mSize.getHeight() - 15 ); ScrollBarP.Size = Sizei( mSize.getWidth() - mVScrollBar->getSize().getWidth(), 15 ); @@ -137,7 +137,7 @@ void UITextEdit::fixScroll() { if ( mTextInput->getSize().getHeight() - Height >= 0 ) { diff = mTextInput->getSize().getHeight() - Height; - pos = diff * mVScrollBar->value(); + pos = diff * mVScrollBar->getValue(); mTextInput->setPosition( mTextInput->getPosition().x, mPadding.Top - pos ); } @@ -145,7 +145,7 @@ void UITextEdit::fixScroll() { if ( mTextInput->getSize().getWidth() - Width >= 0 ) { diff = mTextInput->getSize().getWidth() - Width; - pos = diff * mHScrollBar->value(); + pos = diff * mHScrollBar->getValue(); mTextInput->setPosition( mPadding.Left - pos, mTextInput->getPosition().y ); } @@ -256,11 +256,11 @@ UIScrollBar * UITextEdit::getVScrollBar() const { return mVScrollBar; } -const String& UITextEdit::text() const { +const String& UITextEdit::getText() const { return mTextInput->getText(); } -void UITextEdit::text( const String& Txt ) { +void UITextEdit::setText( const String& Txt ) { mTextInput->setText( Txt ); onInputSizeChange(); @@ -274,7 +274,7 @@ void UITextEdit::onInputSizeChange( const UIEvent * Event ) { if ( NULL != Event ) { if ( Event->getEventType() == UIEvent::EventOnPressEnter ) { - mHScrollBar->value( 0 ); + mHScrollBar->setValue( 0 ); } } @@ -364,8 +364,8 @@ void UITextEdit::fixScrollToCursor() { mTextInput->setPosition( mTextInput->getPosition().x, mPadding.Top ); } - mHScrollBar->value( tW / mTextInput->getSize().getWidth() ); - mVScrollBar->value( tH / mTextInput->getSize().getHeight() ); + mHScrollBar->setValue( tW / mTextInput->getSize().getWidth() ); + mVScrollBar->setValue( tH / mTextInput->getSize().getHeight() ); mSkipValueChange = false; } @@ -388,12 +388,12 @@ void UITextEdit::update() { } } -void UITextEdit::allowEditing( const bool& allow ) { - mTextInput->allowEditing( allow ); +void UITextEdit::setAllowEditing( const bool& allow ) { + mTextInput->setAllowEditing( allow ); } -const bool& UITextEdit::allowEditing() const { - return mTextInput->allowEditing(); +const bool& UITextEdit::getAllowEditing() const { + return mTextInput->getAllowEditing(); } }} diff --git a/src/eepp/ui/uitextinput.cpp b/src/eepp/ui/uitextinput.cpp index 1b07b6976..973b5f77e 100644 --- a/src/eepp/ui/uitextinput.cpp +++ b/src/eepp/ui/uitextinput.cpp @@ -191,14 +191,14 @@ InputTextBuffer * UITextInput::getInputTextBuffer() { return &mTextBuffer; } -void UITextInput::allowEditing( const bool& allow ) { +void UITextInput::setAllowEditing( const bool& allow ) { mAllowEditing = allow; if ( !mAllowEditing && mTextBuffer.isActive() ) mTextBuffer.setActive( false ); } -const bool& UITextInput::allowEditing() const { +const bool& UITextInput::getAllowEditing() const { return mAllowEditing; } diff --git a/src/eepp/ui/uitextinputpassword.cpp b/src/eepp/ui/uitextinputpassword.cpp index 8f400dfab..767452ac6 100644 --- a/src/eepp/ui/uitextinputpassword.cpp +++ b/src/eepp/ui/uitextinputpassword.cpp @@ -15,8 +15,8 @@ UITextInputPassword::UITextInputPassword( const UITextInput::CreateParams& Param mPassCache->setShadowColor( mFontShadowColor ); if ( NULL == Params.Font ) { - if ( NULL != UIThemeManager::instance()->defaultFont() ) - mPassCache->setFont( UIThemeManager::instance()->defaultFont() ); + if ( NULL != UIThemeManager::instance()->getDefaultFont() ) + mPassCache->setFont( UIThemeManager::instance()->getDefaultFont() ); else eePRINTL( "UITextInputPassword::UITextInputPassword : Created a UI TextInputPassword without a defined font." ); } diff --git a/src/eepp/ui/uitheme.cpp b/src/eepp/ui/uitheme.cpp index bea37de3e..bc308f27a 100644 --- a/src/eepp/ui/uitheme.cpp +++ b/src/eepp/ui/uitheme.cpp @@ -145,7 +145,7 @@ UITheme * UITheme::loadFromTextureAtlas( UITheme * tTheme, Graphics::TextureAtla for ( std::list::iterator it = tTheme->mUIElements.begin() ; it != tTheme->mUIElements.end(); it++ ) { Uint32 IsComplex = 0; - Element = std::string( tTheme->abbr() + "_" + *it ); + Element = std::string( tTheme->getAbbr() + "_" + *it ); Found = searchFilesInAtlas( TextureAtlas, Element, IsComplex ); @@ -186,14 +186,14 @@ UITheme * UITheme::loadFromPath( UITheme * tTheme, const std::string& Path, cons std::vector ElemFound; std::vector ElemType; - Graphics::TextureAtlas * tSG = eeNew( Graphics::TextureAtlas, ( tTheme->abbr() ) ); + Graphics::TextureAtlas * tSG = eeNew( Graphics::TextureAtlas, ( tTheme->getAbbr() ) ); tTheme->getTextureAtlas( tSG ); for ( std::list::iterator it = tTheme->mUIElements.begin() ; it != tTheme->mUIElements.end(); it++ ) { Uint32 IsComplex = 0; - Element = tTheme->abbr() + "_" + *it; + Element = tTheme->getAbbr() + "_" + *it; Found = searchFilesOfElement( tSG, RPath, Element, IsComplex, ImgExt ); @@ -205,7 +205,7 @@ UITheme * UITheme::loadFromPath( UITheme * tTheme, const std::string& Path, cons // Load the icons from path. for ( std::list::iterator it = tTheme->mUIIcons.begin() ; it != tTheme->mUIIcons.end(); it++ ) { - ElemName = tTheme->abbr() + "_icon_" + *it; + ElemName = tTheme->getAbbr() + "_icon_" + *it; Element = RPath + ElemName + "." + ImgExt; if ( FileSystem::fileExists( Element ) ) { @@ -351,61 +351,61 @@ const Uint32& UITheme::getId() const { return mNameHash; } -const std::string& UITheme::abbr() const { +const std::string& UITheme::getAbbr() const { return mAbbr; } UISkin * UITheme::add( UISkin * Resource ) { - Resource->theme( this ); + Resource->setTheme( this ); return ResourceManager::add( Resource ); } -void UITheme::font( Graphics::Font * Font ) { +void UITheme::setFont( Graphics::Font * Font ) { mFont = Font; } -Graphics::Font * UITheme::font() const { +Graphics::Font * UITheme::getFont() const { return mFont; } -const ColorA& UITheme::fontColor() const { +const ColorA& UITheme::getFontColor() const { return mFontColor; } -const ColorA& UITheme::fontShadowColor() const { +const ColorA& UITheme::getFontShadowColor() const { return mFontShadowColor; } -const ColorA& UITheme::fontOverColor() const { +const ColorA& UITheme::getFontOverColor() const { return mFontOverColor; } -const ColorA& UITheme::fontSelectedColor() const { +const ColorA& UITheme::getFontSelectedColor() const { return mFontSelectedColor; } -void UITheme::fontColor( const ColorA& Color ) { +void UITheme::setFontColor( const ColorA& Color ) { mFontColor = Color; } -void UITheme::fontShadowColor( const ColorA& Color ) { +void UITheme::setFontShadowColor( const ColorA& Color ) { mFontShadowColor = Color; } -void UITheme::fontOverColor( const ColorA& Color ) { +void UITheme::setFontOverColor( const ColorA& Color ) { mFontOverColor = Color; } -void UITheme::fontSelectedColor( const ColorA& Color ) { +void UITheme::setFontSelectedColor( const ColorA& Color ) { mFontSelectedColor = Color; } -void UITheme::useDefaultThemeValues( const bool& Use ) { +void UITheme::setUseDefaultThemeValues( const bool& Use ) { mUsedefaultThemeValues = Use; } -const bool& UITheme::useDefaultThemeValues() const { +const bool& UITheme::getUseDefaultThemeValues() const { return mUsedefaultThemeValues; } @@ -695,7 +695,7 @@ UIPushButton * UITheme::createPushButton( UIControl * Parent, const Sizei& Size, ButtonParams.IconAutoMargin = IconAutoMargin; if ( NULL != Icon ) - ButtonParams.SetIcon( Icon ); + ButtonParams.setIcon( Icon ); UIPushButton * Ctrl = eeNew( UIPushButton, ( ButtonParams ) ); Ctrl->setVisible( true ); @@ -714,7 +714,7 @@ UISelectButton * UITheme::createSelectButton( UIControl * Parent, const Sizei& S ButtonParams.IconAutoMargin = IconAutoMargin; if ( NULL != Icon ) - ButtonParams.SetIcon( Icon ); + ButtonParams.setIcon( Icon ); UISelectButton * Ctrl = eeNew( UISelectButton, ( ButtonParams ) ); Ctrl->setVisible( true ); diff --git a/src/eepp/ui/uithememanager.cpp b/src/eepp/ui/uithememanager.cpp index 6d4d9b0d1..dd39fe7eb 100644 --- a/src/eepp/ui/uithememanager.cpp +++ b/src/eepp/ui/uithememanager.cpp @@ -23,11 +23,11 @@ UIThemeManager::UIThemeManager() : UIThemeManager::~UIThemeManager() { } -void UIThemeManager::defaultFont( Font * Font ) { +void UIThemeManager::setDefaultFont( Font * Font ) { mFont = Font; } -Font * UIThemeManager::defaultFont() const { +Font * UIThemeManager::getDefaultFont() const { return mFont; } @@ -44,15 +44,15 @@ void UIThemeManager::setTheme( UITheme * Theme ) { } } -void UIThemeManager::defaultTheme( UITheme * Theme ) { +void UIThemeManager::setDefaultTheme( UITheme * Theme ) { mThemeDefault = Theme; } -void UIThemeManager::defaultTheme( const std::string& Theme ) { - defaultTheme( UIThemeManager::instance()->getByName( Theme ) ); +void UIThemeManager::setDefaultTheme( const std::string& Theme ) { + setDefaultTheme( UIThemeManager::instance()->getByName( Theme ) ); } -UITheme * UIThemeManager::defaultTheme() const { +UITheme * UIThemeManager::getDefaultTheme() const { return mThemeDefault; } @@ -61,59 +61,59 @@ void UIThemeManager::applyDefaultTheme( UIControl * Control ) { Control->setTheme( mThemeDefault ); } -void UIThemeManager::autoApplyDefaultTheme( const bool& apply ) { +void UIThemeManager::setAutoApplyDefaultTheme( const bool& apply ) { mautoApplyDefaultTheme = apply; } -const bool& UIThemeManager::autoApplyDefaultTheme() const { +const bool& UIThemeManager::getAutoApplyDefaultTheme() const { return mautoApplyDefaultTheme; } -void UIThemeManager::defaultEffectsEnabled( const bool& Enabled ) { +void UIThemeManager::setDefaultEffectsEnabled( const bool& Enabled ) { mEnableDefaultEffects = Enabled; } -const bool& UIThemeManager::defaultEffectsEnabled() const { +const bool& UIThemeManager::getDefaultEffectsEnabled() const { return mEnableDefaultEffects; } -const Time& UIThemeManager::controlsFadeInTime() const { +const Time& UIThemeManager::getControlsFadeInTime() const { return mFadeInTime; } -void UIThemeManager::controlsFadeInTime( const Time& Time ) { +void UIThemeManager::setControlsFadeInTime( const Time& Time ) { mFadeInTime = Time; } -const Time& UIThemeManager::controlsFadeOutTime() const { +const Time& UIThemeManager::getControlsFadeOutTime() const { return mFadeOutTime; } -void UIThemeManager::controlsFadeOutTime( const Time& Time ) { +void UIThemeManager::setControlsFadeOutTime( const Time& Time ) { mFadeOutTime = Time; } -void UIThemeManager::tooltipTimeToShow( const Time& Time ) { +void UIThemeManager::setTooltipTimeToShow( const Time& Time ) { mtooltipTimeToShow = Time; } -const Time& UIThemeManager::tooltipTimeToShow() const { +const Time& UIThemeManager::getTooltipTimeToShow() const { return mtooltipTimeToShow; } -void UIThemeManager::tooltipFollowMouse( const bool& Follow ) { +void UIThemeManager::setTooltipFollowMouse( const bool& Follow ) { mtooltipFollowMouse = Follow; } -const bool& UIThemeManager::tooltipFollowMouse() const { +const bool& UIThemeManager::getTooltipFollowMouse() const { return mtooltipFollowMouse; } -void UIThemeManager::cursorSize( const Sizei& Size ) { +void UIThemeManager::setCursorSize( const Sizei& Size ) { mcursorSize = Size; } -const Sizei& UIThemeManager::cursorSize() const { +const Sizei& UIThemeManager::getCursorSize() const { return mcursorSize; } diff --git a/src/eepp/ui/uitooltip.cpp b/src/eepp/ui/uitooltip.cpp index 2d59854d4..00f0f392c 100644 --- a/src/eepp/ui/uitooltip.cpp +++ b/src/eepp/ui/uitooltip.cpp @@ -20,8 +20,8 @@ UITooltip::UITooltip( UITooltip::CreateParams& Params, UIControl * TooltipOf ) : mTextCache->setShadowColor( mFontShadowColor ); if ( NULL == Params.Font ) { - if ( NULL != UIThemeManager::instance()->defaultFont() ) - mTextCache->setFont( UIThemeManager::instance()->defaultFont() ); + if ( NULL != UIThemeManager::instance()->getDefaultFont() ) + mTextCache->setFont( UIThemeManager::instance()->getDefaultFont() ); else eePRINTL( "UITooltip::UITextBox : Created a UI TextBox without a defined font." ); } @@ -55,8 +55,8 @@ void UITooltip::setTheme( UITheme * Theme ) { autoPadding(); - if ( NULL == mTextCache->getFont() && NULL != Theme->font() ) { - mTextCache->setFont( Theme->font() ); + if ( NULL == mTextCache->getFont() && NULL != Theme->getFont() ) { + mTextCache->setFont( Theme->getFont() ); } } @@ -72,16 +72,16 @@ void UITooltip::show() { setVisible( true ); - if ( UIThemeManager::instance()->defaultEffectsEnabled() ) { - startAlphaAnim( 255.f == mAlpha ? 0.f : mAlpha, 255.f, UIThemeManager::instance()->controlsFadeInTime() ); + if ( UIThemeManager::instance()->getDefaultEffectsEnabled() ) { + startAlphaAnim( 255.f == mAlpha ? 0.f : mAlpha, 255.f, UIThemeManager::instance()->getControlsFadeInTime() ); } } } void UITooltip::hide() { if ( isVisible() ) { - if ( UIThemeManager::instance()->defaultEffectsEnabled() ) { - disableFadeOut( UIThemeManager::instance()->controlsFadeOutTime() ); + if ( UIThemeManager::instance()->getDefaultEffectsEnabled() ) { + disableFadeOut( UIThemeManager::instance()->getControlsFadeOutTime() ); } else { setVisible( false ); } @@ -99,11 +99,11 @@ void UITooltip::draw() { } } -Graphics::Font * UITooltip::font() const { +Graphics::Font * UITooltip::getFont() const { return mTextCache->getFont(); } -void UITooltip::font( Graphics::Font * font ) { +void UITooltip::setFont( Graphics::Font * font ) { if ( mTextCache->getFont() != font ) { mTextCache->setFont( font ); autoPadding(); @@ -113,11 +113,11 @@ void UITooltip::font( Graphics::Font * font ) { } } -const String& UITooltip::text() { +const String& UITooltip::getText() { return mTextCache->getText(); } -void UITooltip::text( const String& text ) { +void UITooltip::setText( const String& text ) { mTextCache->setText( text ); autoPadding(); autoSize(); @@ -125,20 +125,20 @@ void UITooltip::text( const String& text ) { onTextChanged(); } -const ColorA& UITooltip::color() const { +const ColorA& UITooltip::getColor() const { return mFontColor; } -void UITooltip::color( const ColorA& color ) { +void UITooltip::setColor( const ColorA& color ) { mFontColor = color; setAlpha( color.a() ); } -const ColorA& UITooltip::shadowColor() const { +const ColorA& UITooltip::getShadowColor() const { return mFontShadowColor; } -void UITooltip::shadowColor( const ColorA& color ) { +void UITooltip::setShadowColor( const ColorA& color ) { mFontShadowColor = color; setAlpha( color.a() ); mTextCache->setShadowColor( mFontColor ); @@ -206,11 +206,11 @@ void UITooltip::onFontChanged() { sendCommonEvent( UIEvent::EventOnFontChanged ); } -void UITooltip::padding( const Recti& padding ) { +void UITooltip::setPadding( const Recti& padding ) { mPadding = padding; } -const Recti& UITooltip::padding() const { +const Recti& UITooltip::getPadding() const { return mPadding; } @@ -230,19 +230,19 @@ const int& UITooltip::getNumLines() const { return mTextCache->getNumLines(); } -const Vector2f& UITooltip::alignOffset() const { +const Vector2f& UITooltip::getAlignOffset() const { return mAlignOffset; } -void UITooltip::tooltipTime( const Time& Time ) { +void UITooltip::setTooltipTime( const Time& Time ) { mTooltipTime = Time; } -void UITooltip::tooltipTimeAdd( const Time& Time ) { +void UITooltip::addTooltipTime( const Time& Time ) { mTooltipTime += Time; } -const Time& UITooltip::tooltipTime() const { +const Time& UITooltip::getTooltipTime() const { return mTooltipTime; } diff --git a/src/eepp/ui/uiwindow.cpp b/src/eepp/ui/uiwindow.cpp index c8c65612e..225c89ff3 100644 --- a/src/eepp/ui/uiwindow.cpp +++ b/src/eepp/ui/uiwindow.cpp @@ -35,7 +35,7 @@ UIWindow::UIWindow( const UIWindow::CreateParams& Params ) : mContainer->setEnabled( true ); mContainer->setVisible( true ); mContainer->setSize( mSize ); - mContainer->addEventListener( UIEvent::EventOnPosChange, cb::Make1( this, &UIWindow::containerPosChange ) ); + mContainer->addEventListener( UIEvent::EventOnPosChange, cb::Make1( this, &UIWindow::onContainerPosChange ) ); if ( !( mWinFlags & UI_WIN_NO_BORDER ) ) { UIControlAnim::CreateParams tParams; @@ -69,7 +69,7 @@ UIWindow::UIWindow( const UIWindow::CreateParams& Params ) : mButtonClose->setEnabled( true ); if ( mWinFlags & UI_WIN_USE_DEFAULT_BUTTONS_ACTIONS ) { - mButtonClose->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &UIWindow::buttonCloseClick ) ); + mButtonClose->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &UIWindow::onButtonCloseClick ) ); } } @@ -79,7 +79,7 @@ UIWindow::UIWindow( const UIWindow::CreateParams& Params ) : mButtonMaximize->setEnabled( true ); if ( mWinFlags & UI_WIN_USE_DEFAULT_BUTTONS_ACTIONS ) { - mButtonMaximize->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &UIWindow::buttonMaximizeClick ) ); + mButtonMaximize->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &UIWindow::onButtonMaximizeClick ) ); } } @@ -89,7 +89,7 @@ UIWindow::UIWindow( const UIWindow::CreateParams& Params ) : mButtonMinimize->setEnabled( true ); if ( mWinFlags & UI_WIN_USE_DEFAULT_BUTTONS_ACTIONS ) { - mButtonMinimize->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &UIWindow::buttonMinimizeClick ) ); + mButtonMinimize->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &UIWindow::onButtonMinimizeClick ) ); } } @@ -172,7 +172,7 @@ bool UIWindow::isType( const Uint32& type ) const { return UIWindow::getType() == type ? true : UIComplexControl::isType( type ); } -void UIWindow::containerPosChange( const UIEvent * Event ) { +void UIWindow::onContainerPosChange( const UIEvent * Event ) { Vector2i PosDiff = mContainer->getPosition() - Vector2i( mBorderLeft->getSize().getWidth(), mWindowDecoration->getSize().getHeight() ); if ( PosDiff.x != 0 || PosDiff.y != 0 ) { @@ -182,7 +182,7 @@ void UIWindow::containerPosChange( const UIEvent * Event ) { } } -void UIWindow::buttonCloseClick( const UIEvent * Event ) { +void UIWindow::onButtonCloseClick( const UIEvent * Event ) { CloseWindow(); sendCommonEvent( UIEvent::EventOnWindowCloseClick ); @@ -203,8 +203,8 @@ void UIWindow::CloseWindow() { mModalCtrl = NULL; } - if ( Time::Zero != UIThemeManager::instance()->controlsFadeOutTime() ) - closeFadeOut( UIThemeManager::instance()->controlsFadeOutTime() ); + if ( Time::Zero != UIThemeManager::instance()->getControlsFadeOutTime() ) + closeFadeOut( UIThemeManager::instance()->getControlsFadeOutTime() ); else close(); } @@ -215,13 +215,13 @@ void UIWindow::close() { enableByModal(); } -void UIWindow::buttonMaximizeClick( const UIEvent * Event ) { +void UIWindow::onButtonMaximizeClick( const UIEvent * Event ) { maximize(); sendCommonEvent( UIEvent::EventOnWindowMaximizeClick ); } -void UIWindow::buttonMinimizeClick( const UIEvent * Event ) { +void UIWindow::onButtonMinimizeClick( const UIEvent * Event ) { Hide(); sendCommonEvent( UIEvent::EventOnWindowMinimizeClick ); @@ -715,7 +715,7 @@ bool UIWindow::show() { setFocus(); - startAlphaAnim( mBaseAlpha == getAlpha() ? 0.f : mAlpha, mBaseAlpha, UIThemeManager::instance()->controlsFadeInTime() ); + startAlphaAnim( mBaseAlpha == getAlpha() ? 0.f : mAlpha, mBaseAlpha, UIThemeManager::instance()->getControlsFadeInTime() ); if ( isModal() ) { createModalControl(); @@ -735,8 +735,8 @@ bool UIWindow::show() { bool UIWindow::Hide() { if ( isVisible() ) { - if ( UIThemeManager::instance()->defaultEffectsEnabled() ) { - disableFadeOut( UIThemeManager::instance()->controlsFadeOutTime() ); + if ( UIThemeManager::instance()->getDefaultEffectsEnabled() ) { + disableFadeOut( UIThemeManager::instance()->getControlsFadeOutTime() ); } else { setEnabled( false ); setVisible( false ); @@ -843,7 +843,7 @@ void UIWindow::maximize() { Uint32 UIWindow::onMouseDoubleClick( const Vector2i &Pos, const Uint32 Flags ) { if ( ( mWinFlags & UI_WIN_RESIZEABLE ) && ( NULL != mButtonMaximize ) && ( Flags & EE_BUTTON_LMASK ) ) { - buttonMaximizeClick( NULL ); + onButtonMaximizeClick( NULL ); } return 1; diff --git a/src/eepp/ui/uiwinmenu.cpp b/src/eepp/ui/uiwinmenu.cpp index a746dbbd0..cd881d93d 100644 --- a/src/eepp/ui/uiwinmenu.cpp +++ b/src/eepp/ui/uiwinmenu.cpp @@ -55,10 +55,10 @@ void UIWinMenu::addMenuButton( const String& ButtonText, UIPopUpMenu * Menu ) { ButtonParams.FontOverColor = mFontOverColor; UISelectButton * Button = eeNew( UISelectButton, ( ButtonParams ) ); - Button->text( ButtonText ); + Button->setText( ButtonText ); Button->setVisible( true ); Button->setEnabled( true ); - Button->setThemeControl( mSkinState->getSkin()->theme(), "winmenubutton" ); + Button->setThemeControl( mSkinState->getSkin()->getTheme(), "winmenubutton" ); Menu->setVisible( false ); Menu->setEnabled( false ); @@ -88,7 +88,7 @@ void UIWinMenu::setTheme( UITheme * Theme ) { void UIWinMenu::removeMenuButton( const String& ButtonText ) { for ( WinMenuList::iterator it = mButtons.begin(); it != mButtons.end(); it++ ) { - if ( it->first->text() == ButtonText ) { + if ( it->first->getText() == ButtonText ) { it->second->close(); mButtons.erase( it ); @@ -100,7 +100,7 @@ void UIWinMenu::removeMenuButton( const String& ButtonText ) { UISelectButton * UIWinMenu::getButton( const String& ButtonText ) { for ( WinMenuList::iterator it = mButtons.begin(); it != mButtons.end(); it++ ) { - if ( it->first->text() == ButtonText ) { + if ( it->first->getText() == ButtonText ) { return it->first; } } @@ -110,7 +110,7 @@ UISelectButton * UIWinMenu::getButton( const String& ButtonText ) { UIPopUpMenu * UIWinMenu::getPopUpMenu( const String& ButtonText ) { for ( WinMenuList::iterator it = mButtons.begin(); it != mButtons.end(); it++ ) { - if ( it->first->text() == ButtonText ) { + if ( it->first->getText() == ButtonText ) { return it->second; } } @@ -270,31 +270,31 @@ void UIWinMenu::onComplexControlFocusLoss() { } -void UIWinMenu::fontColor( const ColorA& Color ) { +void UIWinMenu::setFontColor( const ColorA& Color ) { mFontColor = Color; } -const ColorA& UIWinMenu::fontColor() const { +const ColorA& UIWinMenu::getFontColor() const { return mFontColor; } -void UIWinMenu::fontOverColor( const ColorA& Color ) { +void UIWinMenu::setFontOverColor( const ColorA& Color ) { mFontOverColor = Color; } -const ColorA& UIWinMenu::fontOverColor() const { +const ColorA& UIWinMenu::getFontOverColor() const { return mFontOverColor; } -void UIWinMenu::fontSelectedColor( const ColorA& Color ) { +void UIWinMenu::setFontSelectedColor( const ColorA& Color ) { mFontSelectedColor = Color; } -const ColorA& UIWinMenu::fontSelectedColor() const { +const ColorA& UIWinMenu::getFontSelectedColor() const { return mFontSelectedColor; } -Graphics::Font * UIWinMenu::font() const { +Graphics::Font * UIWinMenu::getFont() const { return mFont; } diff --git a/src/test/eetest.cpp b/src/test/eetest.cpp index 3fe8ef7ba..830602261 100644 --- a/src/test/eetest.cpp +++ b/src/test/eetest.cpp @@ -3,12 +3,12 @@ Demo_Test::EETest * TestInstance = NULL; static void MainLoop() { - TestInstance->Update(); + TestInstance->update(); } namespace Demo_Test { -void EETest::Init() { +void EETest::init() { EE = Engine::instance(); Log::instance()->setLiveWrite( true ); @@ -58,10 +58,10 @@ void EETest::Init() { mWindow = EE->createWindow( WinSettings, ConSettings ); if ( NULL != mWindow && mWindow->isOpen() ) { - SetScreen( StartScreen ); + setScreen( StartScreen ); mWindow->setCaption( "eepp - Test Application" ); - mWindow->pushResizeCallback( cb::Make1( this, &EETest::OnWindowResize ) ); + mWindow->pushResizeCallback( cb::Make1( this, &EETest::onWindowResize ) ); TF = TextureFactory::instance(); TF->allocate(40); @@ -72,23 +72,23 @@ void EETest::Init() { PS.resize(5); - Scenes[0] = cb::Make0( this, &EETest::PhysicsUpdate ); - Scenes[1] = cb::Make0( this, &EETest::Screen1 ); - Scenes[2] = cb::Make0( this, &EETest::Screen2 ); - Scenes[3] = cb::Make0( this, &EETest::Screen3 ); - Scenes[4] = cb::Make0( this, &EETest::Screen4 ); - Scenes[5] = cb::Make0( this, &EETest::Screen5 ); + Scenes[0] = cb::Make0( this, &EETest::physicsUpdate ); + Scenes[1] = cb::Make0( this, &EETest::screen1 ); + Scenes[2] = cb::Make0( this, &EETest::screen2 ); + Scenes[3] = cb::Make0( this, &EETest::screen3 ); + Scenes[4] = cb::Make0( this, &EETest::screen4 ); + Scenes[5] = cb::Make0( this, &EETest::screen5 ); //InBuf.Start(); InBuf.isNewLineEnabled( true ); setRandomSeed( static_cast( Sys::getSystemTime() * 1000 ) ); - LoadTextures(); + loadTextures(); - LoadFonts(); + loadFonts(); - CreateShaders(); + createShaders(); if ( mMusEnabled ) { Mus = eeNew( Music, () ); @@ -132,7 +132,7 @@ void EETest::Init() { mVBO->compile(); } - PhysicsCreate(); + physicsCreate(); #if EE_PLATFORM != EE_PLATFORM_EMSCRIPTEN launch(); @@ -145,7 +145,7 @@ void EETest::Init() { } } -void EETest::CreateUIThemeTextureAtlas() { +void EETest::createUIThemeTextureAtlas() { #if !defined( EE_DEBUG ) || defined( EE_GLES ) return; #endif @@ -164,7 +164,7 @@ void EETest::CreateUIThemeTextureAtlas() { } } -void EETest::LoadFonts() { +void EETest::loadFonts() { mFTE.restart(); TextureLoader * tl = eeNew( TextureLoader, ( MyPath + "fonts/conchars.png" ) ); @@ -175,10 +175,10 @@ void EETest::LoadFonts() { mFontLoader.add( eeNew( TTFFontLoader, ( "arial", MyPath + "fonts/arial.ttf", 12, TTF_STYLE_NORMAL, 256, RGB(255,255,255) ) ) ); mFontLoader.add( eeNew( TTFFontLoader, ( "arialb", MyPath + "fonts/arial.ttf", 12, TTF_STYLE_NORMAL, 256, RGB(255,255,255), 1, RGB(0,0,0), true ) ) ); - mFontLoader.load( cb::Make1( this, &EETest::OnFontLoaded ) ); + mFontLoader.load( cb::Make1( this, &EETest::onFontLoaded ) ); } -void EETest::OnFontLoaded( ResourceLoader * ObjLoaded ) { +void EETest::onFontLoaded( ResourceLoader * ObjLoaded ) { FF = FontManager::instance()->getByName( "conchars" ); FF2 = FontManager::instance()->getByName( "ProggySquareSZ" ); TTF = FontManager::instance()->getByName( "arial" ); @@ -194,7 +194,7 @@ void EETest::OnFontLoaded( ResourceLoader * ObjLoaded ) { mBuda = String::fromUtf8( "El mono ve el pez en el agua y sufre. Piensa que su mundo es el único que existe, el mejor, el real. Sufre porque es bueno y tiene compasión, lo ve y piensa: \"Pobre se está ahogando no puede respirar\". Y lo saca, lo saca y se queda tranquilo, por fin lo salvé. Pero el pez se retuerce de dolor y muere. Por eso te mostré el sueño, es imposible meter el mar en tu cabeza, que es un balde." ); - CreateUI(); + createUI(); mEEText.create( TTFB, "Entropia Engine++\nCTRL + Number to change Demo Screen\nRight click to see the PopUp Menu" ); mFBOText.create( TTFB, "This is a VBO\nInside of a FBO" ); @@ -204,7 +204,7 @@ void EETest::OnFontLoaded( ResourceLoader * ObjLoaded ) { mInfoText.create( FF, "", ColorA(255,255,255,150) ); } -void EETest::CreateShaders() { +void EETest::createShaders() { mUseShaders = mUseShaders && GLi->shadersSupported(); mShaderProgram = NULL; @@ -215,7 +215,7 @@ void EETest::CreateShaders() { } } -void EETest::OnWinMouseUp( const UIEvent * Event ) { +void EETest::onWinMouseUp( const UIEvent * Event ) { const UIEventMouse * MEvent = reinterpret_cast ( Event ); UIControlAnim * CtrlAnim; @@ -233,24 +233,24 @@ void EETest::OnWinMouseUp( const UIEvent * Event ) { } } -void EETest::OnShowMenu( const UIEvent * Event ) { +void EETest::onShowMenu( const UIEvent * Event ) { UIPushButton * PB = static_cast( Event->getControl() ); if ( Menu->show() ) { Vector2i Pos = Vector2i( (Int32)PB->getPolygon()[0].x, (Int32)PB->getPolygon()[0].y - 2 ); - UIMenu::FixMenuPos( Pos , Menu ); + UIMenu::fixMenuPos( Pos , Menu ); Menu->setPosition( Pos ); } } -void EETest::OnWindowResize(EE::Window::Window * win) { +void EETest::onWindowResize(EE::Window::Window * win) { Map.ViewSize( win->getSize() ); } -void EETest::CreateUI() { +void EETest::createUI() { Clock TE; - CreateUIThemeTextureAtlas(); + createUIThemeTextureAtlas(); eePRINTL( "Texture Atlas Loading Time: %4.3f ms.", TE.getElapsed().asMilliseconds() ); @@ -263,9 +263,9 @@ void EETest::CreateUI() { mTheme = UITheme::loadFromTextureAtlas( eeNew( UIdefaultTheme, ( "uitheme", "uitheme" ) ), TextureAtlasManager::instance()->getByName( "uitheme" ) ); UIThemeManager::instance()->add( mTheme ); - UIThemeManager::instance()->defaultEffectsEnabled( true ); - UIThemeManager::instance()->defaultFont( TTF ); - UIThemeManager::instance()->defaultTheme( "uitheme" ); + UIThemeManager::instance()->setDefaultEffectsEnabled( true ); + UIThemeManager::instance()->setDefaultFont( TTF ); + UIThemeManager::instance()->setDefaultTheme( "uitheme" ); UIControl::CreateParams Params( UIManager::instance()->mainControl(), Vector2i(0,0), Sizei( 530, 380 ), UI_FILL_BACKGROUND | UI_CLIP_ENABLE | UI_BORDER ); @@ -278,8 +278,8 @@ void EETest::CreateUI() { tWin->setTitle( "Controls Test" ); - tWin->addEventListener( UIEvent::EventMouseUp, cb::Make1( this, &EETest::OnWinMouseUp ) ); - C->addEventListener( UIEvent::EventMouseUp, cb::Make1( this, &EETest::OnWinMouseUp ) ); + tWin->addEventListener( UIEvent::EventMouseUp, cb::Make1( this, &EETest::onWinMouseUp ) ); + C->addEventListener( UIEvent::EventMouseUp, cb::Make1( this, &EETest::onWinMouseUp ) ); Params.Flags &= ~UI_CLIP_ENABLE; Params.Background.setCorners(0); @@ -329,12 +329,12 @@ void EETest::CreateUI() { ButtonParams.Flags = UI_VALIGN_CENTER | UI_HALIGN_CENTER | UI_AUTO_SIZE; ButtonParams.setPosition( 225, 216 ); ButtonParams.Size = Sizei( 90, 0 ); - ButtonParams.SetIcon( mTheme->getIconByName( "ok" ) ); + ButtonParams.setIcon( mTheme->getIconByName( "ok" ) ); UIPushButton * Button = eeNew( UIPushButton, ( ButtonParams ) ); Button->setVisible( true ); Button->setEnabled( true ); - Button->text( "Click Me" ); - Button->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &EETest::ButtonClick ) ); + Button->setText( "Click Me" ); + Button->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &EETest::onButtonClick ) ); Button->setTooltipText( "Click and see what happens..." ); TextParams.setPosition( 130, 20 ); @@ -364,7 +364,7 @@ void EETest::CreateUI() { mSlider = eeNew( UISlider, ( SliderParams ) ); mSlider->setVisible( true ); mSlider->setEnabled( true ); - mSlider->addEventListener( UIEvent::EventOnValueChange, cb::Make1( this, &EETest::OnSliderValueChange ) ); + mSlider->addEventListener( UIEvent::EventOnValueChange, cb::Make1( this, &EETest::onSliderValueChange ) ); SliderParams.setPosition( 40, 110 ); SliderParams.Size = Sizei( 24, 80 ); @@ -397,14 +397,14 @@ void EETest::CreateUI() { mScrollBar = eeNew( UIScrollBar, ( ScrollBarP ) ); mScrollBar->setVisible( true ); mScrollBar->setEnabled( true ); - mScrollBar->addEventListener( UIEvent::EventOnValueChange, cb::Make1( this, &EETest::OnValueChange ) ); + mScrollBar->addEventListener( UIEvent::EventOnValueChange, cb::Make1( this, &EETest::onValueChange ) ); mProgressBar = mTheme->createProgressBar( C, Sizei( 200, 20 ), Vector2i( 20, 190 ) ); TextParams.setPosition( 20, 5 ); mTextBoxValue = eeNew( UITextBox, ( TextParams ) ); mTextBoxValue->setVisible( true ); - OnValueChange( NULL ); + onValueChange( NULL ); UIListBox::CreateParams LBParams; LBParams.setParent( C ); @@ -461,48 +461,48 @@ void EETest::CreateUI() { mComboBox->getListBox()->setSelected( 0 ); Menu = mTheme->createPopUpMenu(); - Menu->Add( "New", mTheme->getIconByName( "document-new" ) ); + Menu->add( "New", mTheme->getIconByName( "document-new" ) ); - Menu->Add( "Open...", mTheme->getIconByName( "document-open" ) ); - Menu->AddSeparator(); - Menu->Add( "Map Editor" ); - Menu->Add( "Texture Atlas Editor" ); - Menu->AddSeparator(); - Menu->Add( "Show Screen 1" ); - Menu->Add( "Show Screen 2" ); - Menu->Add( "Show Screen 3" ); - Menu->Add( "Show Screen 4" ); - Menu->Add( "Show Screen 5" ); - Menu->Add( "Show Screen 6" ); - Menu->AddSeparator(); - Menu->Add( "Show Console" ); - Menu->AddSeparator(); - Menu->AddCheckBox( "Show Window" ); - Menu->Add( "Show Window 2" ); - Menu->AddCheckBox( "Multi Viewport" ); + Menu->add( "Open...", mTheme->getIconByName( "document-open" ) ); + Menu->addSeparator(); + Menu->add( "Map Editor" ); + Menu->add( "Texture Atlas Editor" ); + Menu->addSeparator(); + Menu->add( "Show Screen 1" ); + Menu->add( "Show Screen 2" ); + Menu->add( "Show Screen 3" ); + Menu->add( "Show Screen 4" ); + Menu->add( "Show Screen 5" ); + Menu->add( "Show Screen 6" ); + Menu->addSeparator(); + Menu->add( "Show Console" ); + Menu->addSeparator(); + Menu->addCheckBox( "Show Window" ); + Menu->add( "Show Window 2" ); + Menu->addCheckBox( "Multi Viewport" ); UIPopUpMenu * Menu3 = mTheme->createPopUpMenu(); - Menu3->Add( "Hello World 1" ); - Menu3->Add( "Hello World 2" ); - Menu3->Add( "Hello World 3" ); - Menu3->Add( "Hello World 4" ); + Menu3->add( "Hello World 1" ); + Menu3->add( "Hello World 2" ); + Menu3->add( "Hello World 3" ); + Menu3->add( "Hello World 4" ); UIPopUpMenu * Menu2 = mTheme->createPopUpMenu(); - Menu2->Add( "Test 1" ); - Menu2->Add( "Test 2" ); - Menu2->Add( "Test 3" ); - Menu2->Add( "Test 4" ); - Menu2->AddSubMenu( "Hello World", NULL, Menu3 ); + Menu2->add( "Test 1" ); + Menu2->add( "Test 2" ); + Menu2->add( "Test 3" ); + Menu2->add( "Test 4" ); + Menu2->addSubMenu( "Hello World", NULL, Menu3 ); - Menu->AddSeparator(); - Menu->AddSubMenu( "Sub-Menu", NULL, Menu2 ) ; + Menu->addSeparator(); + Menu->addSubMenu( "Sub-Menu", NULL, Menu2 ) ; - Menu->AddSeparator(); - Menu->Add( "Quit" ); + Menu->addSeparator(); + Menu->add( "Quit" ); - Menu->addEventListener( UIEvent::EventOnItemClicked, cb::Make1( this, &EETest::ItemClick ) ); - Menu->GetItem( "Quit" )->addEventListener( UIEvent::EventMouseUp, cb::Make1( this, &EETest::QuitClick ) ); - UIManager::instance()->mainControl()->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &EETest::MainClick ) ); + Menu->addEventListener( UIEvent::EventOnItemClicked, cb::Make1( this, &EETest::onItemClick ) ); + Menu->getItem( "Quit" )->addEventListener( UIEvent::EventMouseUp, cb::Make1( this, &EETest::onQuitClick ) ); + UIManager::instance()->mainControl()->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &EETest::onMainClick ) ); UITextEdit::CreateParams TEParams; TEParams.setParent( C ); @@ -512,7 +512,7 @@ void EETest::CreateUI() { UITextEdit * TextEdit = eeNew( UITextEdit, ( TEParams ) ); TextEdit->setVisible( true ); TextEdit->setEnabled( true ); - TextEdit->text( mBuda ); + TextEdit->setText( mBuda ); UIGenericGrid::CreateParams GridParams; GridParams.setParent( C ); @@ -576,74 +576,74 @@ void EETest::CreateUI() { eePRINTL( "CreateUI time: %4.3f ms.", TE.getElapsed().asMilliseconds() ); } -void EETest::CreateMapEditor() { +void EETest::createMapEditor() { if ( NULL != mMapEditor ) return; UIWindow * tWin = mTheme->createWindow( NULL, Sizei( 1024, 768 ), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON | UI_WIN_DRAGABLE_CONTAINER, Sizei( 1024, 768 ) ); - mMapEditor = eeNew( MapEditor, ( tWin, cb::Make0( this, &EETest::OnMapEditorClose ) ) ); + mMapEditor = eeNew( MapEditor, ( tWin, cb::Make0( this, &EETest::onMapEditorClose ) ) ); tWin->center(); tWin->show(); } -void EETest::OnMapEditorClose() { +void EETest::onMapEditorClose() { mMapEditor = NULL; } -void EETest::CreateETGEditor() { +void EETest::createETGEditor() { UIWindow * tWin = mTheme->createWindow( NULL, Sizei( 1024, 768 ), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON | UI_WIN_DRAGABLE_CONTAINER, Sizei( 1024, 768 ) ); - mETGEditor = eeNew ( Tools::TextureAtlasEditor, ( tWin, cb::Make0( this, &EETest::OnETGEditorClose ) ) ); + mETGEditor = eeNew ( Tools::TextureAtlasEditor, ( tWin, cb::Make0( this, &EETest::onETGEditorClose ) ) ); tWin->center(); tWin->show(); } -void EETest::OnETGEditorClose() { +void EETest::onETGEditorClose() { mETGEditor = NULL; } -void EETest::CreateCommonDialog() { +void EETest::createCommonDialog() { UICommonDialog * CDialog = mTheme->createCommonDialog( NULL, Sizei(), Vector2i(), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON ); CDialog->addFilePattern( "*.hpp;*.cpp", true ); CDialog->center(); CDialog->show(); } -void EETest::CreateWinMenu() { +void EETest::createWinMenu() { UIWinMenu * WinMenu = mTheme->createWinMenu( mUIWindow->getContainer() ); UIPopUpMenu * PopMenu = mTheme->createPopUpMenu(); - PopMenu->Add( "File" ); - PopMenu->Add( "Open" ); - PopMenu->Add( "Close" ); - PopMenu->Add( "Quit" ); + PopMenu->add( "File" ); + PopMenu->add( "Open" ); + PopMenu->add( "Close" ); + PopMenu->add( "Quit" ); UIPopUpMenu * PopMenu2 = mTheme->createPopUpMenu(); - PopMenu2->Add( "Bla" ); - PopMenu2->Add( "Bla 2" ); - PopMenu2->Add( "Bla 3" ); - PopMenu2->Add( "Bla 4" ); + PopMenu2->add( "Bla" ); + PopMenu2->add( "Bla 2" ); + PopMenu2->add( "Bla 3" ); + PopMenu2->add( "Bla 4" ); WinMenu->addMenuButton( "File", PopMenu ); WinMenu->addMenuButton( "Edit", PopMenu2 ); } -void EETest::CreateDecoratedWindow() { +void EETest::createDecoratedWindow() { mUIWindow = mTheme->createWindow( NULL, Sizei( 530, 350 ), Vector2i( 200, 50 ), UI_CONTROL_DEFAULT_FLAGS_CENTERED, UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON, Sizei( 100, 200 ) ); - mUIWindow->addEventListener( UIEvent::EventOnWindowCloseClick, cb::Make1( this, &EETest::CloseClick ) ); + mUIWindow->addEventListener( UIEvent::EventOnWindowCloseClick, cb::Make1( this, &EETest::onCloseClick ) ); mUIWindow->setTitle( "Test Window" ); mUIWindow->toBack(); UIPushButton * Button = mTheme->createPushButton( mUIWindow->getContainer(), Sizei( 510, 22 ), Vector2i( 10, 28 ), UI_CONTROL_DEFAULT_FLAGS_CENTERED | UI_ANCHOR_RIGHT ); - Button->text( "Click Me" ); - Button->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &EETest::ButtonClick ) ); + Button->setText( "Click Me" ); + Button->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &EETest::onButtonClick ) ); mUIWindow->addShortcut( KEY_C, KEYMOD_ALT, Button ); UITabWidget * TabWidget = mTheme->createTabWidget( mUIWindow->getContainer(), Sizei( 510, 250 ), Vector2i( 10, 55 ), UI_HALIGN_CENTER | UI_VALIGN_CENTER | UI_ANCHOR_RIGHT | UI_ANCHOR_BOTTOM | UI_ANCHOR_LEFT | UI_ANCHOR_TOP ); UITextEdit * TEdit = mTheme->createTextEdit( TabWidget, Sizei(), Vector2i() ); - TEdit->text( mBuda ); + TEdit->setText( mBuda ); TabWidget->add( "TextEdit", TEdit ); UITextInput * Txt = mTheme->createTextInput( TabWidget, Sizei(), Vector2i(), UI_AUTO_PADDING | UI_AUTO_SHRINK_TEXT | UI_TEXT_SELECTION_ENABLED ); @@ -652,31 +652,31 @@ void EETest::CreateDecoratedWindow() { TabWidget->add( "TextBox", mTheme->createTextBox( mBuda, TabWidget, Sizei(), Vector2i(), UI_AUTO_PADDING | UI_AUTO_SHRINK_TEXT | UI_TEXT_SELECTION_ENABLED ) ); - CreateWinMenu(); + createWinMenu(); } -void EETest::CloseClick( const UIEvent * Event ) { +void EETest::onCloseClick( const UIEvent * Event ) { mUIWindow = NULL; } -void EETest::ItemClick( const UIEvent * Event ) { +void EETest::onItemClick( const UIEvent * Event ) { if ( !Event->getControl()->isType( UI_TYPE_MENUITEM ) ) return; - const String& txt = reinterpret_cast ( Event->getControl() )->text(); + const String& txt = reinterpret_cast ( Event->getControl() )->getText(); if ( "Show Screen 1" == txt ) { - SetScreen( 0 ); + setScreen( 0 ); } else if ( "Show Screen 2" == txt ) { - SetScreen( 1 ); + setScreen( 1 ); } else if ( "Show Screen 3" == txt ) { - SetScreen( 2 ); + setScreen( 2 ); } else if ( "Show Screen 4" == txt ) { - SetScreen( 3 ); + setScreen( 3 ); } else if ( "Show Screen 5" == txt ) { - SetScreen( 4 ); + setScreen( 4 ); } else if ( "Show Screen 6" == txt ) { - SetScreen( 5 ); + setScreen( 5 ); } else if ( "Show Console" == txt ) { Con.toggle(); InBuf.setActive( !Con.isActive() ); @@ -692,7 +692,7 @@ void EETest::ItemClick( const UIEvent * Event ) { C->setVisible( true ); C->setEnabled( true ); - if ( Chk->active() ) { + if ( Chk->isActive() ) { if ( C->getScale() == 1.f ) C->setScale( 0.f ); C->startScaleAnim( C->getScale(), Vector2f::One, Milliseconds( 500.f ), Ease::SineOut ); C->startAlphaAnim( C->getAlpha(), 255.f, Milliseconds( 500.f ) ); @@ -704,38 +704,38 @@ void EETest::ItemClick( const UIEvent * Event ) { } } else if ( "Show Window 2" == txt ) { if ( NULL == mUIWindow ) { - CreateDecoratedWindow(); + createDecoratedWindow(); } mUIWindow->show(); } else if ( "Map Editor" == txt ) { - CreateMapEditor(); + createMapEditor(); } else if ( "Texture Atlas Editor" == txt ) { - CreateETGEditor(); + createETGEditor(); } else if ( "Multi Viewport" == txt ) { MultiViewportMode = !MultiViewportMode; } else if ( "Open..." == txt ) { - CreateCommonDialog(); + createCommonDialog(); } else if ( "New" == txt ) { if ( 0 == Screen ) { - ChangeDemo( 0 ); + changeDemo( 0 ); } } } -void EETest::OnValueChange( const UIEvent * Event ) { - mTextBoxValue->setText( "Scroll Value:\n" + String::toStr( mScrollBar->value() ) ); +void EETest::onValueChange( const UIEvent * Event ) { + mTextBoxValue->setText( "Scroll Value:\n" + String::toStr( mScrollBar->getValue() ) ); - mProgressBar->progress( mScrollBar->value() * 100.f ); + mProgressBar->setProgress( mScrollBar->getValue() * 100.f ); } -void EETest::OnSliderValueChange( const UIEvent * Event ) { +void EETest::onSliderValueChange( const UIEvent * Event ) { UISlider * slider = static_cast( Event->getControl() ); - C->setRotation( slider->value() * 90.f ); + C->setRotation( slider->getValue() * 90.f ); } -void EETest::QuitClick( const UIEvent * Event ) { +void EETest::onQuitClick( const UIEvent * Event ) { const UIEventMouse * MouseEvent = reinterpret_cast ( Event ); if ( MouseEvent->getFlags() & EE_BUTTON_LMASK ) { @@ -743,23 +743,23 @@ void EETest::QuitClick( const UIEvent * Event ) { } } -void EETest::ShowMenu() { +void EETest::showMenu() { if ( Menu->show() ) { Vector2i Pos = mWindow->getInput()->getMousePos(); - UIMenu::FixMenuPos( Pos , Menu ); + UIMenu::fixMenuPos( Pos , Menu ); Menu->setPosition( Pos ); } } -void EETest::MainClick( const UIEvent * Event ) { +void EETest::onMainClick( const UIEvent * Event ) { const UIEventMouse * MouseEvent = reinterpret_cast ( Event ); if ( MouseEvent->getFlags() & EE_BUTTON_RMASK ) { - ShowMenu(); + showMenu(); } } -void EETest::ButtonClick( const UIEvent * Event ) { +void EETest::onButtonClick( const UIEvent * Event ) { const UIEventMouse * MouseEvent = reinterpret_cast ( Event ); if ( MouseEvent->getFlags() & EE_BUTTONS_LRM ) { @@ -778,7 +778,7 @@ void EETest::ButtonClick( const UIEvent * Event ) { } } -void EETest::SetScreen( Uint32 num ) { +void EETest::setScreen( Uint32 num ) { if ( NULL != mTerrainBut ) mTerrainBut->setVisible( 1 == num ); if ( 0 == num || 5 == num ) @@ -790,7 +790,7 @@ void EETest::SetScreen( Uint32 num ) { Screen = num; } -void EETest::CmdSetPartsNum ( const std::vector < String >& params ) { +void EETest::cmdSetPartsNum ( const std::vector < String >& params ) { if ( params.size() >= 2 ) { Int32 tInt = 0; @@ -804,11 +804,11 @@ void EETest::CmdSetPartsNum ( const std::vector < String >& params ) { } } -void EETest::OnTextureLoaded( ResourceLoader * ResLoaded ) { +void EETest::onTextureLoaded( ResourceLoader * ResLoaded ) { SndMng.play( "mysound" ); } -void EETest::LoadTextures() { +void EETest::loadTextures() { Clock TE; Uint32 i; @@ -836,7 +836,7 @@ void EETest::LoadTextures() { mResLoad.add( eeNew( SoundLoader, ( &SndMng, "mysound", MyPath + "sounds/sound.ogg" ) ) ); - mResLoad.load( cb::Make1( this, &EETest::OnTextureLoaded ) ); + mResLoad.load( cb::Make1( this, &EETest::onTextureLoaded ) ); TN.resize(12); TNP.resize(12); @@ -874,14 +874,14 @@ void EETest::LoadTextures() { for( Int32 mx = 0; mx < 8; mx++ ) SP.addFrame( TN[4], Sizef( 0, 0 ), Vector2i( 0, 0 ), Recti( mx * 64, my * 64, mx * 64 + 64, my * 64 + 64 ) ); - PS[0].setCallbackReset( cb::Make2( this, &EETest::ParticlesCallback ) ); + PS[0].setCallbackReset( cb::Make2( this, &EETest::particlesCallback ) ); PS[0].create( PSE_Callback, 500, TN[5], Vector2f( 0, 0 ), 16, true ); PS[1].create( PSE_Heal, 250, TN[5], Vector2f( mWindow->getWidth() * 0.5f, mWindow->getHeight() * 0.5f ), 16, true ); PS[2].create( PSE_WormHole, PartsNum, TN[5], Vector2f( mWindow->getWidth() * 0.5f, mWindow->getHeight() * 0.5f ), 32, true ); PS[3].create( PSE_Fire, 350, TN[5], Vector2f( -50.f, -50.f ), 32, true ); PS[4].create( PSE_Fire, 350, TN[5], Vector2f( -50.f, -50.f ), 32, true ); - Con.addCommand( "setparticlesnum", cb::Make1( this, &EETest::CmdSetPartsNum ) ); + Con.addCommand( "setparticlesnum", cb::Make1( this, &EETest::cmdSetPartsNum ) ); Texture * Tex = TNP[2]; @@ -940,17 +940,17 @@ void EETest::LoadTextures() { } void EETest::run() { - ParticlesThread(); + particlesThread(); } -void EETest::ParticlesThread() { +void EETest::particlesThread() { while ( mWindow->isRunning() ) { - UpdateParticles(); + updateParticles(); Sys::sleep(10); } } -void EETest::UpdateParticles() { +void EETest::updateParticles() { if ( MultiViewportMode || Screen == 2 ) { PSElapsed = cElapsed.getElapsed(); @@ -959,12 +959,12 @@ void EETest::UpdateParticles() { } } -void EETest::Screen1() { +void EETest::screen1() { Map.Update(); Map.Draw(); } -void EETest::Screen2() { +void EETest::screen2() { if ( mResLoad.isLoaded() ) { Texture * TexLoaded = TF->getByName( "1.jpg" ); @@ -1088,7 +1088,7 @@ void EETest::Screen2() { if (Ang > 360.f) Ang = 1.f; if ( ShowParticles ) - Particles(); + particles(); PR.setColor( ColorA(0, 255, 0, 50) ); @@ -1133,7 +1133,7 @@ void EETest::Screen2() { PR.drawPoint( WP.getPos(), 10.f ); } -void EETest::Screen3() { +void EETest::screen3() { if (AnimVal>=300.0f) { AnimVal = 300.0f; AnimSide = true; @@ -1151,7 +1151,7 @@ void EETest::Screen3() { Batch.draw(); } -void EETest::Screen4() { +void EETest::screen4() { if ( NULL != mFBO ) { mFBO->bind(); mFBO->clear(); @@ -1179,11 +1179,11 @@ void EETest::Screen4() { } } -void EETest::Screen5() { +void EETest::screen5() { } -void EETest::Render() { +void EETest::render() { HWidth = mWindow->getWidth() * 0.5f; HHeight = mWindow->getHeight() * 0.5f; @@ -1221,16 +1221,16 @@ void EETest::Render() { mWindow->setView( Views[1] ); Mouse = KM->getMousePosFromView( Views[1] ); Mousef = Vector2f( (Float)Mouse.x, (Float)Mouse.y ); - Screen2(); + screen2(); mWindow->setView( Views[0] ); Mouse = KM->getMousePosFromView( Views[0] ); Mousef = Vector2f( (Float)Mouse.x, (Float)Mouse.y ); - Screen1(); + screen1(); mWindow->setView( mWindow->getDefaultView() ); mWindow->clipEnable( (Int32)HWidth - 320, (Int32)HHeight - 240, 640, 480 ); - Screen3(); + screen3(); mWindow->clipDisable(); } @@ -1285,7 +1285,7 @@ void EETest::Render() { Con.draw(); } -void EETest::Input() { +void EETest::input() { KM->update(); JM->update(); @@ -1363,22 +1363,22 @@ void EETest::Input() { } if ( KM->isKeyUp(KEY_1) && KM->isControlPressed() ) - SetScreen( 0 ); + setScreen( 0 ); if ( KM->isKeyUp(KEY_2) && KM->isControlPressed() ) - SetScreen( 1 ); + setScreen( 1 ); if ( KM->isKeyUp(KEY_3) && KM->isControlPressed() ) - SetScreen( 2 ); + setScreen( 2 ); if ( KM->isKeyUp(KEY_4) && KM->isControlPressed() ) - SetScreen( 3 ); + setScreen( 3 ); if ( KM->isKeyUp(KEY_5) && KM->isControlPressed() ) - SetScreen( 4 ); + setScreen( 4 ); if ( KM->isKeyUp(KEY_6) && KM->isControlPressed() ) - SetScreen( 5 ); + setScreen( 5 ); Joystick * Joy = JM->getJoystick(0); @@ -1391,9 +1391,9 @@ void EETest::Input() { if ( Joy->isButtonUp(2) ) KM->injectButtonRelease(EE_BUTTON_MIDDLE); if ( Joy->isButtonUp(3) ) KM->injectButtonRelease(EE_BUTTON_WHEELUP); if ( Joy->isButtonUp(7) ) KM->injectButtonRelease(EE_BUTTON_WHEELDOWN); - if ( Joy->isButtonUp(4) ) SetScreen( 0 ); - if ( Joy->isButtonUp(5) ) SetScreen( 1 ); - if ( Joy->isButtonUp(6) ) SetScreen( 2 ); + if ( Joy->isButtonUp(4) ) setScreen( 0 ); + if ( Joy->isButtonUp(5) ) setScreen( 1 ); + if ( Joy->isButtonUp(6) ) setScreen( 2 ); Float aX = Joy->getAxis( AXIS_X ); Float aY = Joy->getAxis( AXIS_Y ); @@ -1426,15 +1426,15 @@ void EETest::Input() { switch (Screen) { case 0: if ( KM->isKeyUp( KEY_R ) ) { - PhysicsDestroy(); - PhysicsCreate(); + physicsDestroy(); + physicsCreate(); } if ( KM->isKeyUp( KEY_1 ) ) - ChangeDemo( 0 ); + changeDemo( 0 ); if ( KM->isKeyUp( KEY_2 ) ) - ChangeDemo( 1 ); + changeDemo( 1 ); case 1: if ( NULL != Joy ) { Uint8 hat = Joy->getHat(); @@ -1498,17 +1498,17 @@ void EETest::Input() { } } -void EETest::Update() { +void EETest::update() { mWindow->clear(); et = mWindow->getElapsed(); - Input(); + input(); mResLoad.update(); if ( mFontLoader.isLoaded() ) { - Render(); + render(); } else { mFontLoader.update(); } @@ -1522,8 +1522,8 @@ void EETest::Update() { mWindow->display(false); } -void EETest::Process() { - Init(); +void EETest::process() { + init(); if ( NULL != mWindow && mWindow->isOpen() ) { TestInstance = this; @@ -1531,10 +1531,10 @@ void EETest::Process() { mWindow->runMainLoop( &MainLoop ); } - End(); + end(); } -void EETest::ParticlesCallback( Particle * P, ParticleSystem * Me ) { +void EETest::particlesCallback( Particle * P, ParticleSystem * Me ) { Float x, y, radio; Vector2f MePos( Me->getPosition() ); @@ -1545,7 +1545,7 @@ void EETest::ParticlesCallback( Particle * P, ParticleSystem * Me ) { P->setColor( ColorAf(1.f, 0.6f, 0.3f, 1.f), 0.02f + Math::randf() * 0.3f ); } -void EETest::Particles() { +void EETest::particles() { PS[0].setPosition( Mousef ); if ( DrawBack ) @@ -1562,7 +1562,7 @@ void EETest::Particles() { #define GRABABLE_MASK_BIT (1<<31) #define NOT_GRABABLE_MASK (~GRABABLE_MASK_BIT) -void EETest::CreateJointAndBody() { +void EETest::createJointAndBody() { #ifndef EE_PLATFORM_TOUCH mMouseJoint = NULL; mMouseBody = Body::New( INFINITY, INFINITY ); @@ -1574,8 +1574,8 @@ void EETest::CreateJointAndBody() { #endif } -void EETest::Demo1Create() { - CreateJointAndBody(); +void EETest::demo1Create() { + createJointAndBody(); Shape::resetShapeIdCounter(); @@ -1631,11 +1631,11 @@ void EETest::Demo1Create() { shape->u( 0.9f ); } -void EETest::Demo1Update() { +void EETest::demo1Update() { } -void EETest::DestroyBody() { +void EETest::destroyBody() { #ifndef EE_PLATFORM_TOUCH eeSAFE_DELETE( mMouseBody ); #else @@ -1645,8 +1645,8 @@ void EETest::DestroyBody() { #endif } -void EETest::Demo1Destroy() { - DestroyBody(); +void EETest::demo1Destroy() { + destroyBody(); eeSAFE_DELETE( mSpace ); } @@ -1706,8 +1706,8 @@ cpBool EETest::catcherBarBegin(Arbiter *arb, Physics::Space *space, void *unused return cpFalse; } -void EETest::Demo2Create() { - CreateJointAndBody(); +void EETest::demo2Create() { + createJointAndBody(); Shape::resetShapeIdCounter(); @@ -1748,7 +1748,7 @@ void EETest::Demo2Create() { mSpace->addCollisionHandler( handler ); } -void EETest::Demo2Update() { +void EETest::demo2Update() { if( !emitterInstance.blocked && emitterInstance.queue ){ emitterInstance.queue--; @@ -1761,12 +1761,12 @@ void EETest::Demo2Update() { } } -void EETest::Demo2Destroy() { - DestroyBody(); +void EETest::demo2Destroy() { + destroyBody(); eeSAFE_DELETE( mSpace ); } -void EETest::ChangeDemo( Uint32 num ) { +void EETest::changeDemo( Uint32 num ) { if ( num < mDemo.size() ) { if ( eeINDEX_NOT_FOUND != mCurDemo ) mDemo[ mCurDemo ].destroy(); @@ -1777,7 +1777,7 @@ void EETest::ChangeDemo( Uint32 num ) { } } -void EETest::PhysicsCreate() { +void EETest::physicsCreate() { PhysicsManager::createSingleton(); PhysicsManager * PM = PhysicsManager::instance(); PhysicsManager::DrawSpaceOptions * DSO = PM->getDrawOptions(); @@ -1792,20 +1792,20 @@ void EETest::PhysicsCreate() { physicDemo demo; - demo.init = cb::Make0( this, &EETest::Demo1Create ); - demo.update = cb::Make0( this, &EETest::Demo1Update ); - demo.destroy = cb::Make0( this, &EETest::Demo1Destroy ); + demo.init = cb::Make0( this, &EETest::demo1Create ); + demo.update = cb::Make0( this, &EETest::demo1Update ); + demo.destroy = cb::Make0( this, &EETest::demo1Destroy ); mDemo.push_back( demo ); - demo.init = cb::Make0( this, &EETest::Demo2Create ); - demo.update = cb::Make0( this, &EETest::Demo2Update ); - demo.destroy = cb::Make0( this, &EETest::Demo2Destroy ); + demo.init = cb::Make0( this, &EETest::demo2Create ); + demo.update = cb::Make0( this, &EETest::demo2Update ); + demo.destroy = cb::Make0( this, &EETest::demo2Destroy ); mDemo.push_back( demo ); - ChangeDemo( 0 ); + changeDemo( 0 ); } -void EETest::PhysicsUpdate() { +void EETest::physicsUpdate() { #ifndef EE_PLATFORM_TOUCH mMousePoint = cVectNew( KM->getMousePosf().x, KM->getMousePosf().y ); cVect newPoint = tovect( cpvlerp( tocpv( mMousePoint_last ), tocpv( mMousePoint ), 0.25 ) ); @@ -1864,14 +1864,14 @@ void EETest::PhysicsUpdate() { mSpace->draw(); } -void EETest::PhysicsDestroy() { +void EETest::physicsDestroy() { mDemo[ mCurDemo ].destroy(); } -void EETest::End() { +void EETest::end() { wait(); - PhysicsDestroy(); + physicsDestroy(); eeSAFE_DELETE( Mus ); eeSAFE_DELETE( mTGL ); @@ -1891,7 +1891,7 @@ void EETest::End() { EE_MAIN_FUNC int main (int argc, char * argv []) { Demo_Test::EETest * Test = eeNew( Demo_Test::EETest, () ); - Test->Process(); + Test->process(); eeDelete( Test ); diff --git a/src/test/eetest.hpp b/src/test/eetest.hpp index ede7aae79..c086ff4b3 100644 --- a/src/test/eetest.hpp +++ b/src/test/eetest.hpp @@ -71,19 +71,19 @@ class EETest : private Thread { public: typedef cb::Callback0 SceneCb; - void Init(); - void Update(); - void End(); - void Process(); - void Render(); - void Input(); - void ParticlesCallback(Particle* P, ParticleSystem* Me); + void init(); + void update(); + void end(); + void process(); + void render(); + void input(); + void particlesCallback(Particle* P, ParticleSystem* Me); - void ParticlesThread(); - void Particles(); - void UpdateParticles(); - void LoadTextures(); - void CmdSetPartsNum ( const std::vector < String >& params ); + void particlesThread(); + void particles(); + void updateParticles(); + void loadTextures(); + void cmdSetPartsNum ( const std::vector < String >& params ); Clock cElapsed; Time PSElapsed; @@ -138,11 +138,11 @@ class EETest : private Thread { Uint8 Screen; SceneCb Scenes[6]; - void Screen1(); - void Screen2(); - void Screen3(); - void Screen4(); - void Screen5(); + void screen1(); + void screen2(); + void screen3(); + void screen4(); + void screen5(); Zip * PakTest; @@ -176,15 +176,15 @@ class EETest : private Thread { String mBuda; ResourceLoader mResLoad; - void OnTextureLoaded( ResourceLoader * ObjLoaded ); + void onTextureLoaded( ResourceLoader * ObjLoaded ); - void CreateUI(); - void CreateShaders(); + void createUI(); + void createShaders(); - void LoadFonts(); + void loadFonts(); ResourceLoader mFontLoader; - void OnFontLoaded( ResourceLoader * ObjLoaded ); + void onFontLoaded( ResourceLoader * ObjLoaded ); JoystickManager * JM; Float mAxisX; @@ -198,18 +198,18 @@ class EETest : private Thread { Clock mFTE; - void CreateCommonDialog(); - void ItemClick( const UIEvent * Event ); - void MainClick( const UIEvent * Event ); - void QuitClick( const UIEvent * Event ); - void CloseClick( const UIEvent * Event ); - void ButtonClick( const UIEvent * Event ); - void OnValueChange( const UIEvent * Event ); - void OnSliderValueChange( const UIEvent * Event ); - void OnWinMouseUp( const UIEvent * Event ); - void CreateDecoratedWindow(); - void CreateWinMenu(); - void CreateUIThemeTextureAtlas(); + void createCommonDialog(); + void onItemClick( const UIEvent * Event ); + void onMainClick( const UIEvent * Event ); + void onQuitClick( const UIEvent * Event ); + void onCloseClick( const UIEvent * Event ); + void onButtonClick( const UIEvent * Event ); + void onValueChange( const UIEvent * Event ); + void onSliderValueChange( const UIEvent * Event ); + void onWinMouseUp( const UIEvent * Event ); + void createDecoratedWindow(); + void createWinMenu(); + void createUIThemeTextureAtlas(); UIControlAnim * C; UIScrollBar * mScrollBar; @@ -240,30 +240,30 @@ class EETest : private Thread { Constraint * mMouseJoint[ EE_MAX_FINGERS ]; #endif - void PhysicsCreate(); - void PhysicsUpdate(); - void PhysicsDestroy(); + void physicsCreate(); + void physicsUpdate(); + void physicsDestroy(); - void SetScreen( Uint32 num ); + void setScreen( Uint32 num ); cpBool blockerBegin( Arbiter *arb, Space *space, void *unused ); void blockerSeparate( Arbiter *arb, Space *space, void *unused ); void postStepRemove( Space *space, void * tshape, void *unused ); cpBool catcherBarBegin( Arbiter *arb, Space *space, void *unused ); - void Demo1Create(); - void Demo1Update(); - void Demo1Destroy(); + void demo1Create(); + void demo1Update(); + void demo1Destroy(); - void Demo2Create(); - void Demo2Update(); - void Demo2Destroy(); + void demo2Create(); + void demo2Update(); + void demo2Destroy(); - void ShowMenu(); + void showMenu(); Emitter emitterInstance; - void ChangeDemo( Uint32 num ); + void changeDemo( Uint32 num ); struct physicDemo { SceneCb init; @@ -282,21 +282,21 @@ class EETest : private Thread { UIPushButton * mShowMenu; UIPushButton * mTerrainBut; - void CreateMapEditor(); + void createMapEditor(); - void OnMapEditorClose(); + void onMapEditorClose(); - void OnETGEditorClose(); + void onETGEditorClose(); - void CreateETGEditor(); + void createETGEditor(); - void CreateJointAndBody(); + void createJointAndBody(); - void DestroyBody(); + void destroyBody(); - void OnShowMenu( const UIEvent * Event ); + void onShowMenu( const UIEvent * Event ); - void OnWindowResize( EE::Window::Window * win ); + void onWindowResize( EE::Window::Window * win ); }; }