diff --git a/bin/assets/ui/uitheme.eta b/bin/assets/ui/uitheme.eta index 079346180..974e8c842 100644 Binary files a/bin/assets/ui/uitheme.eta and b/bin/assets/ui/uitheme.eta differ diff --git a/bin/assets/ui/uitheme.png b/bin/assets/ui/uitheme.png index 306d771bb..3fd8c0f07 100644 Binary files a/bin/assets/ui/uitheme.png and b/bin/assets/ui/uitheme.png differ diff --git a/bin/assets/ui/uitheme/uitheme_hscrollbar_button_menter.png b/bin/assets/ui/uitheme/uitheme_hscrollbar_button_menter.png deleted file mode 100644 index 46a203eab..000000000 Binary files a/bin/assets/ui/uitheme/uitheme_hscrollbar_button_menter.png and /dev/null differ diff --git a/bin/assets/ui/uitheme/uitheme_hscrollbar_button_menter_m.png b/bin/assets/ui/uitheme/uitheme_hscrollbar_button_menter_m.png new file mode 100644 index 000000000..ea76696a9 Binary files /dev/null and b/bin/assets/ui/uitheme/uitheme_hscrollbar_button_menter_m.png differ diff --git a/bin/assets/ui/uitheme/uitheme_hscrollbar_button_menter_ml.png b/bin/assets/ui/uitheme/uitheme_hscrollbar_button_menter_ml.png new file mode 100644 index 000000000..d9a794f44 Binary files /dev/null and b/bin/assets/ui/uitheme/uitheme_hscrollbar_button_menter_ml.png differ diff --git a/bin/assets/ui/uitheme/uitheme_hscrollbar_button_menter_mr.png b/bin/assets/ui/uitheme/uitheme_hscrollbar_button_menter_mr.png new file mode 100644 index 000000000..32e144037 Binary files /dev/null and b/bin/assets/ui/uitheme/uitheme_hscrollbar_button_menter_mr.png differ diff --git a/bin/assets/ui/uitheme/uitheme_hscrollbar_button_normal.png b/bin/assets/ui/uitheme/uitheme_hscrollbar_button_normal.png deleted file mode 100644 index e5517c1a4..000000000 Binary files a/bin/assets/ui/uitheme/uitheme_hscrollbar_button_normal.png and /dev/null differ diff --git a/bin/assets/ui/uitheme/uitheme_hscrollbar_button_normal_m.png b/bin/assets/ui/uitheme/uitheme_hscrollbar_button_normal_m.png new file mode 100644 index 000000000..dafbfc619 Binary files /dev/null and b/bin/assets/ui/uitheme/uitheme_hscrollbar_button_normal_m.png differ diff --git a/bin/assets/ui/uitheme/uitheme_hscrollbar_button_normal_ml.png b/bin/assets/ui/uitheme/uitheme_hscrollbar_button_normal_ml.png new file mode 100644 index 000000000..1299d4b1f Binary files /dev/null and b/bin/assets/ui/uitheme/uitheme_hscrollbar_button_normal_ml.png differ diff --git a/bin/assets/ui/uitheme/uitheme_hscrollbar_button_normal_mr.png b/bin/assets/ui/uitheme/uitheme_hscrollbar_button_normal_mr.png new file mode 100644 index 000000000..65d45b733 Binary files /dev/null and b/bin/assets/ui/uitheme/uitheme_hscrollbar_button_normal_mr.png differ diff --git a/bin/assets/ui/uitheme/uitheme_vscrollbar_button_menter.png b/bin/assets/ui/uitheme/uitheme_vscrollbar_button_menter.png deleted file mode 100644 index 5bbbebff4..000000000 Binary files a/bin/assets/ui/uitheme/uitheme_vscrollbar_button_menter.png and /dev/null differ diff --git a/bin/assets/ui/uitheme/uitheme_vscrollbar_button_menter_d.png b/bin/assets/ui/uitheme/uitheme_vscrollbar_button_menter_d.png new file mode 100644 index 000000000..2ae4b78b1 Binary files /dev/null and b/bin/assets/ui/uitheme/uitheme_vscrollbar_button_menter_d.png differ diff --git a/bin/assets/ui/uitheme/uitheme_vscrollbar_button_menter_m.png b/bin/assets/ui/uitheme/uitheme_vscrollbar_button_menter_m.png new file mode 100644 index 000000000..b36806bb4 Binary files /dev/null and b/bin/assets/ui/uitheme/uitheme_vscrollbar_button_menter_m.png differ diff --git a/bin/assets/ui/uitheme/uitheme_vscrollbar_button_menter_u.png b/bin/assets/ui/uitheme/uitheme_vscrollbar_button_menter_u.png new file mode 100644 index 000000000..9b0fbad7b Binary files /dev/null and b/bin/assets/ui/uitheme/uitheme_vscrollbar_button_menter_u.png differ diff --git a/bin/assets/ui/uitheme/uitheme_vscrollbar_button_normal.png b/bin/assets/ui/uitheme/uitheme_vscrollbar_button_normal.png deleted file mode 100644 index 616b76b6f..000000000 Binary files a/bin/assets/ui/uitheme/uitheme_vscrollbar_button_normal.png and /dev/null differ diff --git a/bin/assets/ui/uitheme/uitheme_vscrollbar_button_normal_d.png b/bin/assets/ui/uitheme/uitheme_vscrollbar_button_normal_d.png new file mode 100644 index 000000000..d722ed3d5 Binary files /dev/null and b/bin/assets/ui/uitheme/uitheme_vscrollbar_button_normal_d.png differ diff --git a/bin/assets/ui/uitheme/uitheme_vscrollbar_button_normal_m.png b/bin/assets/ui/uitheme/uitheme_vscrollbar_button_normal_m.png new file mode 100644 index 000000000..70f468863 Binary files /dev/null and b/bin/assets/ui/uitheme/uitheme_vscrollbar_button_normal_m.png differ diff --git a/bin/assets/ui/uitheme/uitheme_vscrollbar_button_normal_u.png b/bin/assets/ui/uitheme/uitheme_vscrollbar_button_normal_u.png new file mode 100644 index 000000000..ac1d81187 Binary files /dev/null and b/bin/assets/ui/uitheme/uitheme_vscrollbar_button_normal_u.png differ diff --git a/bin/assets/ui/uitheme2x.eta b/bin/assets/ui/uitheme2x.eta index 543a658f6..600d03658 100644 Binary files a/bin/assets/ui/uitheme2x.eta and b/bin/assets/ui/uitheme2x.eta differ diff --git a/bin/assets/ui/uitheme2x.png b/bin/assets/ui/uitheme2x.png index f664fa1d1..4a3b1c38b 100644 Binary files a/bin/assets/ui/uitheme2x.png and b/bin/assets/ui/uitheme2x.png differ diff --git a/bin/assets/ui/uitheme2x/uitheme2x_hscrollbar_button_menter.png b/bin/assets/ui/uitheme2x/uitheme2x_hscrollbar_button_menter.png deleted file mode 100644 index 1aa89d9c4..000000000 Binary files a/bin/assets/ui/uitheme2x/uitheme2x_hscrollbar_button_menter.png and /dev/null differ diff --git a/bin/assets/ui/uitheme2x/uitheme2x_hscrollbar_button_menter_m.png b/bin/assets/ui/uitheme2x/uitheme2x_hscrollbar_button_menter_m.png new file mode 100644 index 000000000..75b9c32b9 Binary files /dev/null and b/bin/assets/ui/uitheme2x/uitheme2x_hscrollbar_button_menter_m.png differ diff --git a/bin/assets/ui/uitheme2x/uitheme2x_hscrollbar_button_menter_ml.png b/bin/assets/ui/uitheme2x/uitheme2x_hscrollbar_button_menter_ml.png new file mode 100644 index 000000000..5ede509f7 Binary files /dev/null and b/bin/assets/ui/uitheme2x/uitheme2x_hscrollbar_button_menter_ml.png differ diff --git a/bin/assets/ui/uitheme2x/uitheme2x_hscrollbar_button_menter_mr.png b/bin/assets/ui/uitheme2x/uitheme2x_hscrollbar_button_menter_mr.png new file mode 100644 index 000000000..0805de99b Binary files /dev/null and b/bin/assets/ui/uitheme2x/uitheme2x_hscrollbar_button_menter_mr.png differ diff --git a/bin/assets/ui/uitheme2x/uitheme2x_hscrollbar_button_normal.png b/bin/assets/ui/uitheme2x/uitheme2x_hscrollbar_button_normal.png deleted file mode 100644 index 8b41218a6..000000000 Binary files a/bin/assets/ui/uitheme2x/uitheme2x_hscrollbar_button_normal.png and /dev/null differ diff --git a/bin/assets/ui/uitheme2x/uitheme2x_hscrollbar_button_normal_m.png b/bin/assets/ui/uitheme2x/uitheme2x_hscrollbar_button_normal_m.png new file mode 100644 index 000000000..fc5185034 Binary files /dev/null and b/bin/assets/ui/uitheme2x/uitheme2x_hscrollbar_button_normal_m.png differ diff --git a/bin/assets/ui/uitheme2x/uitheme2x_hscrollbar_button_normal_ml.png b/bin/assets/ui/uitheme2x/uitheme2x_hscrollbar_button_normal_ml.png new file mode 100644 index 000000000..ce53145b3 Binary files /dev/null and b/bin/assets/ui/uitheme2x/uitheme2x_hscrollbar_button_normal_ml.png differ diff --git a/bin/assets/ui/uitheme2x/uitheme2x_hscrollbar_button_normal_mr.png b/bin/assets/ui/uitheme2x/uitheme2x_hscrollbar_button_normal_mr.png new file mode 100644 index 000000000..3604b51eb Binary files /dev/null and b/bin/assets/ui/uitheme2x/uitheme2x_hscrollbar_button_normal_mr.png differ diff --git a/bin/assets/ui/uitheme2x/uitheme2x_vscrollbar_button_menter.png b/bin/assets/ui/uitheme2x/uitheme2x_vscrollbar_button_menter.png deleted file mode 100644 index 36f31fe0c..000000000 Binary files a/bin/assets/ui/uitheme2x/uitheme2x_vscrollbar_button_menter.png and /dev/null differ diff --git a/bin/assets/ui/uitheme2x/uitheme2x_vscrollbar_button_menter_d.png b/bin/assets/ui/uitheme2x/uitheme2x_vscrollbar_button_menter_d.png new file mode 100644 index 000000000..8d340e7ca Binary files /dev/null and b/bin/assets/ui/uitheme2x/uitheme2x_vscrollbar_button_menter_d.png differ diff --git a/bin/assets/ui/uitheme2x/uitheme2x_vscrollbar_button_menter_m.png b/bin/assets/ui/uitheme2x/uitheme2x_vscrollbar_button_menter_m.png new file mode 100644 index 000000000..781fc026a Binary files /dev/null and b/bin/assets/ui/uitheme2x/uitheme2x_vscrollbar_button_menter_m.png differ diff --git a/bin/assets/ui/uitheme2x/uitheme2x_vscrollbar_button_menter_u.png b/bin/assets/ui/uitheme2x/uitheme2x_vscrollbar_button_menter_u.png new file mode 100644 index 000000000..87ad0f19f Binary files /dev/null and b/bin/assets/ui/uitheme2x/uitheme2x_vscrollbar_button_menter_u.png differ diff --git a/bin/assets/ui/uitheme2x/uitheme2x_vscrollbar_button_normal.png b/bin/assets/ui/uitheme2x/uitheme2x_vscrollbar_button_normal.png deleted file mode 100644 index c3ac8d5e1..000000000 Binary files a/bin/assets/ui/uitheme2x/uitheme2x_vscrollbar_button_normal.png and /dev/null differ diff --git a/bin/assets/ui/uitheme2x/uitheme2x_vscrollbar_button_normal_d.png b/bin/assets/ui/uitheme2x/uitheme2x_vscrollbar_button_normal_d.png new file mode 100644 index 000000000..6186e8543 Binary files /dev/null and b/bin/assets/ui/uitheme2x/uitheme2x_vscrollbar_button_normal_d.png differ diff --git a/bin/assets/ui/uitheme2x/uitheme2x_vscrollbar_button_normal_m.png b/bin/assets/ui/uitheme2x/uitheme2x_vscrollbar_button_normal_m.png new file mode 100644 index 000000000..ee668c4f8 Binary files /dev/null and b/bin/assets/ui/uitheme2x/uitheme2x_vscrollbar_button_normal_m.png differ diff --git a/bin/assets/ui/uitheme2x/uitheme2x_vscrollbar_button_normal_u.png b/bin/assets/ui/uitheme2x/uitheme2x_vscrollbar_button_normal_u.png new file mode 100644 index 000000000..b5b1abff4 Binary files /dev/null and b/bin/assets/ui/uitheme2x/uitheme2x_vscrollbar_button_normal_u.png differ diff --git a/include/eepp/ui/uigenericgrid.hpp b/include/eepp/ui/uigenericgrid.hpp index 325f8fb69..9cf16ad54 100644 --- a/include/eepp/ui/uigenericgrid.hpp +++ b/include/eepp/ui/uigenericgrid.hpp @@ -157,6 +157,8 @@ class EE_API UIGenericGrid : public UIComplexControl { void updateVScroll(); void updateHScroll(); + + void setHScrollStep(); }; }} diff --git a/include/eepp/ui/uilistbox.hpp b/include/eepp/ui/uilistbox.hpp index 550d2a64b..47c63f422 100644 --- a/include/eepp/ui/uilistbox.hpp +++ b/include/eepp/ui/uilistbox.hpp @@ -236,6 +236,8 @@ class EE_API UIListBox : public UIComplexControl { virtual Uint32 onKeyDown( const UIEventKey &Event ); void itemKeyEvent( const UIEventKey &Event ); + + void setHScrollStep(); }; }} diff --git a/src/eepp/gaming/mapeditor/mapeditor.cpp b/src/eepp/gaming/mapeditor/mapeditor.cpp index cc2b6dfa3..53a47b76b 100644 --- a/src/eepp/gaming/mapeditor/mapeditor.cpp +++ b/src/eepp/gaming/mapeditor/mapeditor.cpp @@ -811,6 +811,8 @@ void MapEditor::OnMapSizeChange( const UIEvent *Event ) { mMapVScroll->setMinValue( 0 ); mMapVScroll->setMaxValue( v.y ); mMapVScroll->setClickStep( mUIMap->Map()->getTileSize().getHeight() * mUIMap->Map()->getScale() ); + mMapHScroll->setPageStep( (Float)mUIMap->Map()->getViewSize().getWidth() ); + mMapVScroll->setPageStep( (Float)mUIMap->Map()->getViewSize().getHeight() ); } void MapEditor::OnScrollMapH( const UIEvent * Event ) { diff --git a/src/eepp/ui/uigenericgrid.cpp b/src/eepp/ui/uigenericgrid.cpp index a45e1eae0..d11ff50a4 100644 --- a/src/eepp/ui/uigenericgrid.cpp +++ b/src/eepp/ui/uigenericgrid.cpp @@ -207,6 +207,27 @@ void UIGenericGrid::updateHScroll() { } } +void UIGenericGrid::setHScrollStep() { + Float width = (Float)mContainer->getRealSize().getWidth(); + + if ( ( mItemsNotVisible > 0 && UI_SCROLLBAR_AUTO == mVScrollMode ) || UI_SCROLLBAR_ALWAYS_ON == mVScrollMode ) + width -= mVScrollBar->getRealSize().getWidth(); + + Float maxWidth = 0; + + if ( mCollumnsCount > 0 ) { + for ( Uint32 i = 0; i < mCollumnsCount; i++ ) { + maxWidth += mCollumnsWidth[i]; + } + } + + Float stepVal = width / (Float)maxWidth; + + mHScrollBar->setPageStep( stepVal ); + + mHScrollBar->setClickStep( stepVal ); +} + void UIGenericGrid::updateScroll( bool FromScrollChange ) { if ( !mItems.size() ) return; @@ -309,6 +330,8 @@ void UIGenericGrid::updateScroll( bool FromScrollChange ) { mHScrollBar->setPosition( 0, mSize.getHeight() - mHScrollBar->getSize().getHeight() ); mHScrollBar->setSize( mSize.getWidth() - mVScrollBar->getSize().getWidth(), mHScrollBar->getSize().getHeight() ); } + + setHScrollStep(); } void UIGenericGrid::updateSize() { @@ -330,6 +353,8 @@ void UIGenericGrid::add( UIGridCell * Cell ) { updateSize(); updateScroll(); + + mVScrollBar->setPageStep( ( (Float)mContainer->getSize().getHeight() /(Float) mRowHeight ) / (Float)mItems.size() ); } void UIGenericGrid::remove( UIGridCell * Cell ) { diff --git a/src/eepp/ui/uilistbox.cpp b/src/eepp/ui/uilistbox.cpp index 7a7ac92d5..3c012fa83 100644 --- a/src/eepp/ui/uilistbox.cpp +++ b/src/eepp/ui/uilistbox.cpp @@ -174,7 +174,7 @@ void UIListBox::setTheme( UITheme * Theme ) { void UIListBox::autoPadding() { if ( mFlags & UI_AUTO_PADDING ) { - mPaddingContainer = makePadding(); + mPaddingContainer = pxToDpI( makePadding() ); } } @@ -227,8 +227,8 @@ Uint32 UIListBox::addListBoxItem( const String& Text ) { if ( NULL != mFont ) { Uint32 twidth = mFont->getTextWidth( Text ); - if ( twidth > (Uint32)dpToPxI( mMaxTextWidth ) ) { - mMaxTextWidth = (Uint32)pxToDpI( twidth ); + if ( twidth > mMaxTextWidth ) { + mMaxTextWidth = twidth; updateListBoxItemsSize(); } @@ -310,8 +310,8 @@ void UIListBox::clear() { mSelected.clear(); mVScrollBar->setValue(0); - updateScroll(); findMaxWidth(); + updateScroll(); updateListBoxItemsSize(); sendCommonEvent( UIEvent::EventOnControlClear ); @@ -361,7 +361,7 @@ void UIListBox::onSizeChange() { mHScrollBar->setSize( mSize.getWidth() - mVScrollBar->getSize().getWidth() + mHScrollPadding.Right, mHScrollBar->getSize().getHeight() + mHScrollPadding.Bottom ); if ( mContainer->isClipped() && UI_SCROLLBAR_AUTO == mHScrollMode ) { - if ( (Int32)mMaxTextWidth <= mContainer->getSize().getWidth() ) { + if ( (Int32)mMaxTextWidth <= mContainer->getRealSize().getWidth() ) { mHScrollBar->setVisible( false ); mHScrollBar->setEnabled( false ); mHScrollInit = 0; @@ -397,6 +397,19 @@ void UIListBox::setRowHeight() { } } +void UIListBox::setHScrollStep() { + Float width = (Float)mContainer->getRealSize().getWidth(); + + if ( ( mItemsNotVisible > 0 && UI_SCROLLBAR_AUTO == mVScrollMode ) || UI_SCROLLBAR_ALWAYS_ON == mVScrollMode ) + width -= mVScrollBar->getRealSize().getWidth(); + + Float stepVal = width / (Float)mMaxTextWidth; + + mHScrollBar->setPageStep( stepVal ); + + mHScrollBar->setClickStep( stepVal ); +} + void UIListBox::findMaxWidth() { Uint32 size = (Uint32)mItems.size(); Int32 width; @@ -409,8 +422,8 @@ void UIListBox::findMaxWidth() { else width = mFont->getTextWidth( mTexts[i] ); - if ( width > dpToPxI( mMaxTextWidth ) ) - mMaxTextWidth = (Uint32)pxToDpI( width ); + if ( width > (Int32)mMaxTextWidth ) + mMaxTextWidth = width; } } @@ -425,8 +438,9 @@ void UIListBox::itemUpdateSize( UIListBoxItem * Item ) { if ( NULL != Item ) { Int32 width = (Int32)Item->getTextWidth(); - if ( width > dpToPxI( mMaxTextWidth ) ) - mMaxTextWidth = (Uint32)pxToDpI( width ); + if ( width > (Int32)mMaxTextWidth ) { + mMaxTextWidth = width; + } if ( !mHScrollBar->isVisible() ) { if ( width < mContainer->getSize().getWidth() ) @@ -503,8 +517,8 @@ void UIListBox::updateScroll( bool FromScrollChange ) { } if ( Clipped && ( UI_SCROLLBAR_AUTO == mHScrollMode || UI_SCROLLBAR_ALWAYS_ON == mHScrollMode ) ) { - if ( ( mVScrollBar->isVisible() && mContainer->getSize().getWidth() - mVScrollBar->getSize().getWidth() < (Int32)mMaxTextWidth ) || - ( !mVScrollBar->isVisible() && mContainer->getSize().getWidth() < (Int32)mMaxTextWidth ) ) { + if ( ( mVScrollBar->isVisible() && mContainer->getRealSize().getWidth() - mVScrollBar->getRealSize().getWidth() < (Int32)mMaxTextWidth ) || + ( !mVScrollBar->isVisible() && mContainer->getRealSize().getWidth() < (Int32)mMaxTextWidth ) ) { mHScrollBar->setVisible( true ); mHScrollBar->setEnabled( true ); @@ -513,9 +527,9 @@ void UIListBox::updateScroll( bool FromScrollChange ) { Int32 ScrollH; if ( mVScrollBar->isVisible() ) - ScrollH = mMaxTextWidth - mContainer->getSize().getWidth() + mVScrollBar->getSize().getWidth(); + ScrollH = pxToDpI( mMaxTextWidth ) - mContainer->getSize().getWidth() + mVScrollBar->getSize().getWidth(); else - ScrollH = mMaxTextWidth - mContainer->getSize().getWidth(); + ScrollH = pxToDpI( mMaxTextWidth ) - mContainer->getSize().getWidth(); Int32 HScrolleable = (Uint32)( mHScrollBar->getValue() * ScrollH ); @@ -640,6 +654,8 @@ void UIListBox::updateScroll( bool FromScrollChange ) { mHScrollBar->setPosition( mHScrollPadding.Left, mSize.getHeight() - mHScrollBar->getSize().getHeight() + mHScrollPadding.Top ); mHScrollBar->setSize( mSize.getWidth() - mVScrollBar->getSize().getWidth() + mHScrollPadding.Right, mHScrollBar->getSize().getHeight() + mHScrollPadding.Bottom ); } + + setHScrollStep(); } void UIListBox::itemKeyEvent( const UIEventKey &Event ) { diff --git a/src/eepp/ui/uiskincomplex.cpp b/src/eepp/ui/uiskincomplex.cpp index 4e8690e84..3e68039ba 100644 --- a/src/eepp/ui/uiskincomplex.cpp +++ b/src/eepp/ui/uiskincomplex.cpp @@ -147,7 +147,6 @@ void UISkinComplex::setSkin( const Uint32& State ) { eeASSERT ( State < UISkinState::StateCount ); for ( Uint32 Side = 0; Side < SideCount; Side++ ) { - SubTexture * SubTexture = TextureAtlasManager::instance()->getSubTextureByName( std::string( mName + "_" + UISkin::getSkinStateName( State ) + "_" + SideSuffix[ Side ] ) ); if ( NULL != SubTexture ) @@ -168,7 +167,7 @@ SubTexture * UISkinComplex::getSubTextureSide( const Uint32& State, const Uint32 } void UISkinComplex::stateNormalToState( const Uint32& State ) { - if ( NULL == mSubTexture[ State ][ 0 ] ) { + if ( NULL == mSubTexture[ State ][ Center ] ) { for ( Uint32 Side = 0; Side < SideCount; Side++ ) { mSubTexture[ State ][ Side ] = mSubTexture[ UISkinState::StateNormal ][ Side ]; } diff --git a/src/eepp/ui/uislider.cpp b/src/eepp/ui/uislider.cpp index f6dfe05ad..1ce9f5293 100644 --- a/src/eepp/ui/uislider.cpp +++ b/src/eepp/ui/uislider.cpp @@ -21,7 +21,7 @@ UISlider::UISlider( const UISlider::CreateParams& Params ) : UIControl::CreateParams BgParams; BgParams.setParent( this ); - if ( !mOrientation ) + if ( UI_HORIZONTAL == mOrientation ) BgParams.Size = Sizei( mSize.getWidth() - 16, 8 ); else BgParams.Size = Sizei( 8, mSize.getHeight() - 16 ); @@ -41,7 +41,7 @@ UISlider::UISlider( const UISlider::CreateParams& Params ) : mSlider->setVisible( true ); mSlider->setDragEnabled( true ); - if ( !mOrientation ) + if ( UI_HORIZONTAL == mOrientation ) mSlider->centerVertical(); else mSlider->centerHorizontal(); diff --git a/src/test/eetest.cpp b/src/test/eetest.cpp index 5169fac2a..9e7e91b06 100644 --- a/src/test/eetest.cpp +++ b/src/test/eetest.cpp @@ -159,7 +159,7 @@ void EETest::createUIThemeTextureAtlas() { std::string Path( MyPath + "ui/" + mThemeName ); if ( !FileSystem::fileExists( tgpath + EE_TEXTURE_ATLAS_EXTENSION ) ) { - TexturePacker tp( 256, 256, true, 2 ); + TexturePacker tp( 512, 512, true, 2 ); tp.addTexturesPath( Path ); tp.packTextures(); tp.save( tgpath + ".png", SAVE_TYPE_PNG ); @@ -286,7 +286,7 @@ void EETest::createUI() { str[i-1] = "Test ListBox " + String::toStr(i) + " testing it right now!"; } - /* + UIControl::CreateParams Params( UIManager::instance()->getMainControl(), Vector2i(0,0), Sizei( 530, 380 ), UI_FILL_BACKGROUND | UI_CLIP_ENABLE | UI_BORDER ); Params.Border.setWidth( 2 ); @@ -547,7 +547,7 @@ void EETest::createUI() { TxtGfxParams.Flags = UI_VALIGN_CENTER | UI_HALIGN_CENTER; TxtGfxParams.SubTexture = mTheme->getIconByName( "ok" ); - for ( Uint32 i = 0; i < 100; i++ ) { + for ( Uint32 i = 0; i < 15; i++ ) { UIGridCell * Cell = eeNew( UIGridCell, ( CellParams ) ); UITextBox * TxtBox = eeNew( UITextBox, ( TxtBoxParams ) ); UITextInput * TxtInput = eeNew( UITextInput, ( TxtInputParams ) ); @@ -587,6 +587,7 @@ void EETest::createUI() { eePRINTL( "CreateUI time: %4.3f ms.", TE.getElapsed().asMilliseconds() ); /**/ + /**/ UIRadioButton * ctrl = eeNew( UIRadioButton, () ); ctrl->setPosition( 100, 100 ); ctrl->setSize( 320, 32 ); @@ -658,7 +659,7 @@ void EETest::createUI() { UIListBox * listBox = eeNew( UIListBox, () ); listBox->setPosition( 50, 320 ); - listBox->setSize( 100, 160 ); + listBox->setSize( 200, 160 ); listBox->setVisible( true ); listBox->setEnabled( true ); listBox->addListBoxItems( str );