Some minor fixes to the UI.

Started working on the PVRTC loader. Nothing commited yet.
This commit is contained in:
Martín Lucas Golini
2013-01-22 02:25:06 -03:00
parent ae8c75d97d
commit fdb7af70d9
12 changed files with 58 additions and 21 deletions

View File

@@ -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.

View File

@@ -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 {

View File

@@ -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();
};
}}

View File

@@ -32,6 +32,7 @@ class EE_API cUITooltip : public cUIControlAnim {
cFont * Font;
eeColorA FontColor;
eeColorA FontShadowColor;
eeRecti Padding;
};
cUITooltip( cUITooltip::CreateParams& Params, cUIControl * TooltipOf );

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by Qt Creator 2.6.1, 2013-01-21T03:15:22. -->
<!-- Written by Qt Creator 2.6.1, 2013-01-22T02:23:40. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>

View File

@@ -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 ) :

View File

@@ -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" ) );
}
}

View File

@@ -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 ) );

View File

@@ -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 );

View File

@@ -163,4 +163,10 @@ void cUIGridCell::AutoSize() {
Size( MyParent->mTotalWidth, MyParent->mRowHeight );
}
void cUIGridCell::OnStateChange() {
if ( Selected() && mSkinState->GetState() != cUISkinState::StateSelected ) {
SetSkinState( cUISkinState::StateSelected );
}
}
}}

View File

@@ -111,6 +111,10 @@ bool cUIListBoxItem::Selected() const {
void cUIListBoxItem::OnStateChange() {
cUIListBox * LBParent = reinterpret_cast<cUIListBox*> ( 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 ) {

View File

@@ -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 )
{