This Trac instance is not used for development anymore!

We migrated our development workflow to git and Gitea.
To test the future redirection, replace trac by ariadne in the page URL.

Changeset 377 for ps


Ignore:
Timestamp:
06/03/04 03:42:40 (21 years ago)
Author:
janwas
Message:

tiny bit of dox

Location:
ps/trunk/source/ps
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ps/trunk/source/ps/CConsole.cpp

    r374 r377  
    1010    m_bVisible = false;
    1111
    12     m_VisibleFrac = 0.0f;
     12    m_fVisibleFrac = 0.0f;
    1313
    1414    m_szBuffer = (char*)malloc(sizeof(char) * BUFFER_SIZE);
     
    115115        if(m_bVisible)
    116116        {
    117             m_VisibleFrac += Delta;
    118             if(m_VisibleFrac > 1.0f)
     117            m_fVisibleFrac += Delta;
     118            if(m_fVisibleFrac > 1.0f)
    119119            {
    120                 m_VisibleFrac = 1.0f;
     120                m_fVisibleFrac = 1.0f;
    121121                m_bToggle = false;
    122122            }
     
    124124        else
    125125        {
    126             m_VisibleFrac -= Delta;
    127             if(m_VisibleFrac < 0.0f)
     126            m_fVisibleFrac -= Delta;
     127            if(m_fVisibleFrac < 0.0f)
    128128            {
    129                 m_VisibleFrac = 0.0f;
     129                m_fVisibleFrac = 0.0f;
    130130                m_bToggle = false;
    131131            }
     
    141141    // animation: slide in from top of screen
    142142    const float MaxY = m_fHeight;
    143     const float DeltaY = (1.0f - m_VisibleFrac) * MaxY;
     143    const float DeltaY = (1.0f - m_fVisibleFrac) * MaxY;
    144144
    145145    glTranslatef(m_fX, m_fY + DeltaY, 0.0f); //Move to window position
  • ps/trunk/source/ps/CConsole.h

    r374 r377  
    2727    float m_fWidth;
    2828
    29     // show / hide animation
    30     float m_VisibleFrac;
     29    // "position" in show/hide animation, how visible the console is (0..1).
     30    // allows implementing other animations than sliding, e.g. fading in/out.
     31    float m_fVisibleFrac;
    3132
    3233    std::map<std::string, fptr> m_mapFuncList;
     
    4243
    4344    bool m_bFocus;
    44     bool m_bVisible;
    45     bool m_bToggle;
     45    bool m_bVisible;    // console is to be drawn
     46    bool m_bToggle;     // show/hide animation is currently active
    4647
    4748    char* ToLower(const char* szMessage, uint iSize = 0);
Note: See TracChangeset for help on using the changeset viewer.