Ignore:
Timestamp:
07/23/15 21:16:01 (10 years ago)
Author:
epyon
Message:
  • massive std::string removal
  • no header depends on std::string anymore (or any other STL header)
  • still some code files do (WIP)
  • massive refactoring where std::string was used
  • lua still messy (grep for string128 - used everywhere)
  • string_twine added
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gui/gui_gfx_renderer.cc

    r437 r440  
    243243                int border = 0;
    244244                vec4 color;
    245                 std::string path;
    246                 std::string text;
    247                 const char* stext[] = { nullptr, "selected", "hover" };
     245                string128 path;
     246                const char* stext[] = { "", "selected", "hover" };
    248247                const char* selector = stext[border];
    249248                if ( e->m_flags[HOVER] )    selector = stext[2];
     
    252251                if ( m_style.get( e, "skin", selector, path ) )
    253252                {
    254                         size_t image_id = load_image( string_view( path.c_str(), path.size() ) );
     253                        size_t image_id = load_image( path );
    255254                        const image_info* image = get_image( image_id );
    256255                        if ( image )
     
    312311                }
    313312
    314                 text = e->m_text;
    315                 if ( !text.empty() )
     313                e->m_text;
     314                if ( !e->m_text.empty() )
    316315                {
    317316                        if ( m_style.get( e, "text_color", selector, color ) && m_style.get( e, "text_font", selector, path ) && m_style.get( e, "text_size", selector, border ) )
    318317                        {
    319                                 size_t font_id = load_font( string_view( path.c_str(), path.size() ), size_t( border ) );
     318                                size_t font_id = load_font( path, size_t( border ) );
    320319                                texture_font* font = get_font( font_id );
    321320                                position p = abs.ul + position( 0, border );
    322                                 for ( char c : text )
     321                                for ( char c : e->m_text )
    323322                                {
    324323                                        const texture_glyph* g = font->get_glyph( static_cast<uint16>( c ) );
Note: See TracChangeset for help on using the changeset viewer.