Ignore:
Timestamp:
07/29/15 16:24:01 (10 years ago)
Author:
epyon
Message:
  • slowly fixing up gui
File:
1 edited

Legend:

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

    r440 r444  
    6666                        if ( m_style.get( e, "ascii_border_color", selector, border_color ) )
    6767                                er->border_color = uint32( border_color );
    68                         for ( uint32 i = 0; i < 8 && i < path.length(); )
     68                        for ( uint32 i = 0; i < 8 && i < path.length(); i++ )
    6969                                er->border_chars[i] = static_cast< uchar8 >( path[i] );
    7070                }
     
    8181                for ( int x = 0; x < abs.get_width(); ++x )
    8282                {
    83                         m_terminal->print( position( abs.ul.y, abs.ul.x + x ), er->border_color, er->border_chars[0] );
    84                         m_terminal->print( position( abs.lr.y, abs.ul.x + x ), er->border_color, er->border_chars[1] );
     83                        m_terminal->print( position( abs.ul.x + x, abs.ul.y ), er->border_color, er->border_chars[0] );
     84                        m_terminal->print( position( abs.ul.x + x, abs.lr.y ), er->border_color, er->border_chars[1] );
    8585                }
    8686
    8787                for ( int y = 0; y < abs.get_height(); ++y )
    8888                {
    89                         m_terminal->print( position( abs.ul.y + y, abs.ul.x ), er->border_color, er->border_chars[2] );
    90                         m_terminal->print( position( abs.ul.y + y, abs.lr.x ), er->border_color, er->border_chars[3] );
     89                        m_terminal->print( position( abs.ul.x, abs.ul.y + y ), er->border_color, er->border_chars[2] );
     90                        m_terminal->print( position( abs.lr.x, abs.ul.y + y ), er->border_color, er->border_chars[3] );
    9191                }
    9292
     
    9595                m_terminal->print( abs.ll(), er->border_color, er->border_chars[6] );
    9696                m_terminal->print( abs.lr,   er->border_color, er->border_chars[7] );
     97                m_terminal->update();
    9798        }
    9899        if ( !e->m_text.empty() )
     
    112113}
    113114
    114 void nv::gui::ascii_renderer::on_hover_change( element* e, bool /*hover*/ )
     115void nv::gui::ascii_renderer::on_style_change( element* e )
    115116{
    116         // TODO: FIX
    117         int fix_me;
    118         NV_LOG_DEBUG( "on_hover_change" );
    119         e->m_flags[DIRTY] = true;
     117        m_style.load_flags( e );
    120118}
    121119
    122 void nv::gui::ascii_renderer::on_select_change( element* e, bool /*select*/ )
     120void nv::gui::ascii_renderer::on_hover_change( element* e )
    123121{
    124         // TODO: FIX
    125         int fix_me;
    126         NV_LOG_DEBUG( "on_select_change" );
    127         e->m_flags[DIRTY] = true;
     122        if ( e->m_flags[DIRTY_HOVER] ) e->m_flags[DIRTY] = true;
     123}
     124
     125void nv::gui::ascii_renderer::on_select_change( element* e )
     126{
     127        if ( e->m_flags[DIRTY_SELECT] ) e->m_flags[DIRTY] = true;
    128128}
    129129
Note: See TracChangeset for help on using the changeset viewer.