mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-18 06:55:48 +03:00
A couple of minor changes.
This commit is contained in:
@@ -56,8 +56,10 @@ UIApplication::UIApplication( const WindowSettings& windowSettings, const Settin
|
||||
? appSettings.monospaceFont
|
||||
: FontTrueType::New( "monospace", "assets/fonts/DejaVuSansMono.ttf" );
|
||||
|
||||
if ( monospaceFont && monospaceFont->getType() == FontType::TTF )
|
||||
if ( monospaceFont && monospaceFont->getType() == FontType::TTF ) {
|
||||
static_cast<FontTrueType*>( monospaceFont )->setEnableDynamicMonospace( true );
|
||||
FontFamily::loadFromRegular( static_cast<FontTrueType*>( monospaceFont ) );
|
||||
}
|
||||
|
||||
if ( appSettings.emojiFont == nullptr )
|
||||
FontTrueType::New( "NotoEmoji-Regular", "assets/fonts/NotoEmoji-Regular.ttf" );
|
||||
|
||||
@@ -59,7 +59,7 @@ UIListBox::UIListBox( const std::string& tag ) :
|
||||
mVScrollBar->setEnabled( false )->setVisible( false );
|
||||
mVScrollBar->addEventListener( Event::OnSizeChange, cb );
|
||||
mVScrollBar->addEventListener( Event::OnValueChange,
|
||||
[this] ( auto event ) { onScrollValueChange( event ); } );
|
||||
[this]( auto event ) { onScrollValueChange( event ); } );
|
||||
|
||||
mHScrollBar = UIScrollBar::NewHorizontal();
|
||||
mHScrollBar->setParent( this );
|
||||
@@ -68,7 +68,7 @@ UIListBox::UIListBox( const std::string& tag ) :
|
||||
mHScrollBar->setEnabled( false )->setVisible( false );
|
||||
mHScrollBar->addEventListener( Event::OnSizeChange, cb );
|
||||
mHScrollBar->addEventListener( Event::OnValueChange,
|
||||
[this] ( auto event ) { onHScrollValueChange( event ); } );
|
||||
[this]( auto event ) { onHScrollValueChange( event ); } );
|
||||
|
||||
mDummyItem = createListBoxItem( "" );
|
||||
mDummyItem->setSize( 0, 0 );
|
||||
@@ -699,6 +699,12 @@ UIListBoxItem* UIListBox::getItem( const Uint32& Index ) const {
|
||||
return mItems[Index];
|
||||
}
|
||||
|
||||
const String& UIListBox::getItemText( const Uint32& Index ) const {
|
||||
eeASSERT( Index < mItems.size() );
|
||||
|
||||
return mTexts[Index];
|
||||
}
|
||||
|
||||
UIListBoxItem* UIListBox::getItemSelected() {
|
||||
if ( mSelected.size() ) {
|
||||
if ( NULL == mItems[mSelected.front()] )
|
||||
|
||||
Reference in New Issue
Block a user