diff --git a/include/eepp/ee.hpp b/include/eepp/ee.hpp index a5b603bbc..08feeeee6 100755 --- a/include/eepp/ee.hpp +++ b/include/eepp/ee.hpp @@ -40,24 +40,21 @@ EE::Gaming Not commented at all. @TODO Improve Premake4 support. It should be really easy to compile eepp in Windows and OS X ( Linux is always easy thanks to package managers ). - STATE: Seems to be done, need more testing. + STATE: Seems to be done, needs more testing. @TODO Add more commented examples, showing at least the basic usage of the engine ( 10 or more examples at least ). STATE: 2 examples available. ( 20 % ) @TODO Improve the map editor ( add triggers, tiles selection to copy paste in other zones of the map, undo/redo actions ). - STATE: Features are implemented. - Copy-Paste will be moved for a middle to long plan, + STATE: Needs at least to reoffset tiles and objects for the map resizing. Tile selection i'm not decided yet. + Copy-Paste will be moved for a middle to long term plan. @TODO Add PVRTC and ETC support. STATE: Not started. Middle-term plans: - @TODO Create a default UI Theme for the engine ( get rid off the ugly Aqua Theme ). - STATE: Not started, i need an... artist. - @TODO Add Networking support. STATE: I'll use SFML network adapted to the engine coding style. diff --git a/include/eepp/graphics/glhelper.hpp b/include/eepp/graphics/glhelper.hpp index 708cac4da..21f0b26d0 100644 --- a/include/eepp/graphics/glhelper.hpp +++ b/include/eepp/graphics/glhelper.hpp @@ -23,7 +23,9 @@ enum EEGL_extensions { EEGL_EXT_texture_compression_s3tc, EEGL_ARB_vertex_buffer_object, EEGL_ARB_vertex_array_object, - EEGL_EXT_blend_func_separate + EEGL_EXT_blend_func_separate, + EEGL_IMG_texture_compression_pvrtc, + EEGL_OES_compressed_ETC1_RGB8_texture }; enum EEGL_version { diff --git a/include/eepp/ui/cuigridcell.hpp b/include/eepp/ui/cuigridcell.hpp index 669ea6dd8..268cd7c08 100644 --- a/include/eepp/ui/cuigridcell.hpp +++ b/include/eepp/ui/cuigridcell.hpp @@ -28,7 +28,7 @@ class EE_API cUIGridCell : public cUIComplexControl { void Select(); - Uint32 OnMessage( const cUIMessage * Msg ); + virtual Uint32 OnMessage( const cUIMessage * Msg ); void AutoSize(); protected: @@ -41,7 +41,9 @@ class EE_API cUIGridCell : public cUIComplexControl { void FixCell(); - Uint32 OnMouseExit( const eeVector2i& Pos, const Uint32 Flags ); + virtual Uint32 OnMouseExit( const eeVector2i& Pos, const Uint32 Flags ); + + virtual void OnStateChange(); }; }} diff --git a/include/eepp/ui/cuitooltip.hpp b/include/eepp/ui/cuitooltip.hpp index 50147fc4e..e2e69fd0e 100644 --- a/include/eepp/ui/cuitooltip.hpp +++ b/include/eepp/ui/cuitooltip.hpp @@ -32,6 +32,7 @@ class EE_API cUITooltip : public cUIControlAnim { cFont * Font; eeColorA FontColor; eeColorA FontShadowColor; + eeRecti Padding; }; cUITooltip( cUITooltip::CreateParams& Params, cUIControl * TooltipOf ); diff --git a/projects/linux/ee.creator.user b/projects/linux/ee.creator.user index b438b58e8..7c7e299ca 100644 --- a/projects/linux/ee.creator.user +++ b/projects/linux/ee.creator.user @@ -1,6 +1,6 @@ - + ProjectExplorer.Project.ActiveTarget diff --git a/src/eepp/graphics/cframebufferfbo.cpp b/src/eepp/graphics/cframebufferfbo.cpp index 3a4d7a8f8..981747fdd 100644 --- a/src/eepp/graphics/cframebufferfbo.cpp +++ b/src/eepp/graphics/cframebufferfbo.cpp @@ -6,15 +6,13 @@ namespace EE { namespace Graphics { bool cFrameBufferFBO::IsSupported() { -#ifdef EE_GLES - if ( GLi->Version() == GLv_ES2 ) + #ifdef EE_GLES + if ( GLi->Version() == GLv_ES2 ) { return true; + } + #endif - /// GLES 1 - return false; -#else return 0 != GLi->IsExtension( EEGL_EXT_framebuffer_object ); -#endif } cFrameBufferFBO::cFrameBufferFBO( Window::cWindow * window ) : diff --git a/src/eepp/graphics/renderer/cgl.cpp b/src/eepp/graphics/renderer/cgl.cpp index f98bd9469..aad9f3a22 100644 --- a/src/eepp/graphics/renderer/cgl.cpp +++ b/src/eepp/graphics/renderer/cgl.cpp @@ -140,6 +140,24 @@ void cGL::Init() { WriteExtension( EEGL_ARB_vertex_buffer_object , IsExtension( "GL_ARB_vertex_buffer_object" ) ); WriteExtension( EEGL_ARB_vertex_array_object , IsExtension( "GL_ARB_vertex_array_object" ) ); WriteExtension( EEGL_EXT_blend_func_separate , IsExtension( "GL_EXT_blend_func_separate" ) ); + + } + + WriteExtension( EEGL_IMG_texture_compression_pvrtc , IsExtension( "GL_IMG_texture_compression_pvrtc" ) ); + WriteExtension( EEGL_OES_compressed_ETC1_RGB8_texture , IsExtension( "GL_OES_compressed_ETC1_RGB8_texture" ) ); + + if ( !IsExtension( EEGL_EXT_texture_compression_s3tc ) ) { + WriteExtension( EEGL_EXT_texture_compression_s3tc , IsExtension( "GL_OES_texture_compression_S3TC" ) ); + } + + if ( !IsExtension( EEGL_EXT_framebuffer_object ) ) { + WriteExtension( EEGL_EXT_framebuffer_object , IsExtension( "GL_OES_framebuffer_object" ) ); + } + + if ( !IsExtension( EEGL_ARB_texture_non_power_of_two ) ) { + WriteExtension( EEGL_ARB_texture_non_power_of_two , IsExtension( "GL_IMG_texture_npot" ) || + IsExtension( "GL_OES_texture_npot" ) || + IsExtension( "GL_APPLE_texture_2D_limited_npot" ) ); } } diff --git a/src/eepp/ui/cuidefaulttheme.cpp b/src/eepp/ui/cuidefaulttheme.cpp index 4cb9cd328..982156e83 100644 --- a/src/eepp/ui/cuidefaulttheme.cpp +++ b/src/eepp/ui/cuidefaulttheme.cpp @@ -224,7 +224,9 @@ cUITooltip * cUIDefaultTheme::CreateTooltip( cUIControl * TooltipOf, cUIControl TooltipParams.Flags = Flags; if ( UseDefaultThemeValues() ) { + TooltipParams.Flags &= ~UI_AUTO_PADDING; TooltipParams.FontColor = eeColorA( 0, 0, 0, 255 ); + TooltipParams.Padding = eeRecti( 4, 6, 4, 6 ); } cUITooltip * Ctrl = eeNew( cUITooltip, ( TooltipParams, TooltipOf ) ); diff --git a/src/eepp/ui/cuidropdownlist.cpp b/src/eepp/ui/cuidropdownlist.cpp index b8a4a97ca..46285f02f 100644 --- a/src/eepp/ui/cuidropdownlist.cpp +++ b/src/eepp/ui/cuidropdownlist.cpp @@ -14,11 +14,17 @@ cUIDropDownList::cUIDropDownList( cUIDropDownList::CreateParams& Params ) : ApplyDefaultTheme(); if ( NULL == mListBox ) { - cUIListBox::CreateParams LBParams; - LBParams.Size = eeSize( mSize.Width(), mMinNumVisibleItems * mSize.Height() ); - LBParams.Flags = UI_CLIP_ENABLE | UI_AUTO_PADDING; - LBParams.FontSelectedColor = eeColorA( 255, 255, 255, 255 ); - mListBox = eeNew( cUIListBox, ( LBParams ) ); + cUITheme * Theme = cUIThemeManager::instance()->DefaultTheme(); + + if ( NULL != Theme ) { + mListBox = Theme->CreateListBox( NULL, eeSize( mSize.Width(), mMinNumVisibleItems * mSize.Height() ) ); + } else { + cUIListBox::CreateParams LBParams; + LBParams.Size = eeSize( mSize.Width(), mMinNumVisibleItems * mSize.Height() ); + LBParams.Flags = UI_CLIP_ENABLE | UI_AUTO_PADDING; + LBParams.FontSelectedColor = eeColorA( 255, 255, 255, 255 ); + mListBox = eeNew( cUIListBox, ( LBParams ) ); + } } mListBox->Enabled( false ); diff --git a/src/eepp/ui/cuigridcell.cpp b/src/eepp/ui/cuigridcell.cpp index 1313cb7a4..0bd824ecb 100644 --- a/src/eepp/ui/cuigridcell.cpp +++ b/src/eepp/ui/cuigridcell.cpp @@ -163,4 +163,10 @@ void cUIGridCell::AutoSize() { Size( MyParent->mTotalWidth, MyParent->mRowHeight ); } +void cUIGridCell::OnStateChange() { + if ( Selected() && mSkinState->GetState() != cUISkinState::StateSelected ) { + SetSkinState( cUISkinState::StateSelected ); + } +} + }} diff --git a/src/eepp/ui/cuilistboxitem.cpp b/src/eepp/ui/cuilistboxitem.cpp index 3489076b8..b2aaa19ff 100644 --- a/src/eepp/ui/cuilistboxitem.cpp +++ b/src/eepp/ui/cuilistboxitem.cpp @@ -111,6 +111,10 @@ bool cUIListBoxItem::Selected() const { void cUIListBoxItem::OnStateChange() { cUIListBox * LBParent = reinterpret_cast ( Parent()->Parent() ); + if ( Selected() && mSkinState->GetState() != cUISkinState::StateSelected ) { + SetSkinState( cUISkinState::StateSelected ); + } + if ( mSkinState->GetState() == cUISkinState::StateSelected ) { Color( LBParent->FontSelectedColor() ); } else if ( mSkinState->GetState() == cUISkinState::StateMouseEnter ) { diff --git a/src/eepp/ui/cuitooltip.cpp b/src/eepp/ui/cuitooltip.cpp index 11a3829bd..1d4a67f76 100644 --- a/src/eepp/ui/cuitooltip.cpp +++ b/src/eepp/ui/cuitooltip.cpp @@ -9,6 +9,7 @@ cUITooltip::cUITooltip( cUITooltip::CreateParams& Params, cUIControl * TooltipOf mFontColor( Params.FontColor ), mFontShadowColor( Params.FontShadowColor ), mAlignOffset( 0.f, 0.f ), + mPadding( Params.Padding ), mTooltipTime( 0.f ), mTooltipOf( TooltipOf ) {