summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1bc1b83)
* builder.cpp: don't build a subbitmap or a fontbitmap if it already
exists (so if the xml contains elements with the same id, the first
valid one is kept)
void Builder::addSubBitmap( const BuilderData::SubBitmap &rData )
{
void Builder::addSubBitmap( const BuilderData::SubBitmap &rData )
{
+ if( m_pTheme->m_bitmaps.find( rData.m_id ) != m_pTheme->m_bitmaps.end() )
+ {
+ msg_Dbg( getIntf(), "Bitmap %s already exists", rData.m_id.c_str() );
+ return;
+ }
+
// Get the parent bitmap
GenericBitmap *pParentBmp = NULL;
GET_BMP( pParentBmp, rData.m_parent );
// Get the parent bitmap
GenericBitmap *pParentBmp = NULL;
GET_BMP( pParentBmp, rData.m_parent );
void Builder::addBitmapFont( const BuilderData::BitmapFont &rData )
{
void Builder::addBitmapFont( const BuilderData::BitmapFont &rData )
{
+ if( m_pTheme->m_fonts.find( rData.m_id ) != m_pTheme->m_fonts.end() )
+ {
+ msg_Dbg( getIntf(), "Font %s already exists", rData.m_id.c_str() );
+ return;
+ }
+
GenericBitmap *pBmp =
new FileBitmap( getIntf(), m_pImageHandler,
getFilePath( rData.m_file ), 0 );
GenericBitmap *pBmp =
new FileBitmap( getIntf(), m_pImageHandler,
getFilePath( rData.m_file ), 0 );
RequireDefault( "width" );
RequireDefault( "height" );
RequireDefault( "width" );
RequireDefault( "height" );
- const BuilderData::SubBitmap bitmap( uniqueId( attr["id"] ),
+ const BuilderData::SubBitmap bitmap( attr["id"],
m_curBitmapId, atoi( attr["x"] ), atoi( attr["y"] ),
atoi( attr["width"] ), atoi( attr["height"] ) );
m_pData->m_listSubBitmap.push_back( bitmap );
m_curBitmapId, atoi( attr["x"] ), atoi( attr["y"] ),
atoi( attr["width"] ), atoi( attr["height"] ) );
m_pData->m_listSubBitmap.push_back( bitmap );
</Bitmap>
<Bitmap id="volume" file="volume.bmp" alphacolor="#FF0001">
<SubBitmap id="volume_bg" x="0" y="0" width="68" height="418" />
</Bitmap>
<Bitmap id="volume" file="volume.bmp" alphacolor="#FF0001">
<SubBitmap id="volume_bg" x="0" y="0" width="68" height="418" />
+ <SubBitmap id="volume_bg" x="0" y="0" width="65" height="418" />
<SubBitmap id="volume_up" x="15" y="422" width="14" height="11" />
<SubBitmap id="volume_down" x="0" y="422" width="14" height="11" />
</Bitmap>
<Font id="playlist_font" file="FreeSansBold.ttf" size="11" />
<SubBitmap id="volume_up" x="15" y="422" width="14" height="11" />
<SubBitmap id="volume_down" x="0" y="422" width="14" height="11" />
</Bitmap>
<Font id="playlist_font" file="FreeSansBold.ttf" size="11" />
- <BitmapFont id="digits_font" file="numbers.bmp" type="digits" />
<BitmapFont id="digits_font" file="nums_ex.bmp" type="digits" />
<BitmapFont id="digits_font" file="nums_ex.bmp" type="digits" />
+ <BitmapFont id="digits_font" file="numbers.bmp" type="digits" />
<BitmapFont id="text_font" file="text.bmp" type="text" />
<Window id="main_window" x="100" y="100">
<BitmapFont id="text_font" file="text.bmp" type="text" />
<Window id="main_window" x="100" y="100">