Changeset 440 for trunk/src/gui/gui_gfx_renderer.cc
- Timestamp:
- 07/23/15 21:16:01 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/gui_gfx_renderer.cc
r437 r440 243 243 int border = 0; 244 244 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" }; 248 247 const char* selector = stext[border]; 249 248 if ( e->m_flags[HOVER] ) selector = stext[2]; … … 252 251 if ( m_style.get( e, "skin", selector, path ) ) 253 252 { 254 size_t image_id = load_image( string_view( path.c_str(), path.size() ));253 size_t image_id = load_image( path ); 255 254 const image_info* image = get_image( image_id ); 256 255 if ( image ) … … 312 311 } 313 312 314 text =e->m_text;315 if ( ! text.empty() )313 e->m_text; 314 if ( !e->m_text.empty() ) 316 315 { 317 316 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 ) ) 318 317 { 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 ) ); 320 319 texture_font* font = get_font( font_id ); 321 320 position p = abs.ul + position( 0, border ); 322 for ( char c : text )321 for ( char c : e->m_text ) 323 322 { 324 323 const texture_glyph* g = font->get_glyph( static_cast<uint16>( c ) );
Note: See TracChangeset
for help on using the changeset viewer.