openla/src/dllmain.cpp
// Test hotkeys and find out if we should draw the limits on screen
Test hotkeys and find out if we should draw the limits on screen
Test hotkeys and find out if we should draw the limits on screen
bool TestShouldDraw()
{
    static bool should_draw = false;    
    static bool prevF5 = false;         
    static bool currF5 = false;         
    currF5 = (GetKeyState(vkDebugText) & 0x8000) != 0;
    if(currF5 && !prevF5)   
    {
        if(!should_draw)
        {
            current_limit = 0;
            should_draw = true;
        }
        else
        {
            current_limit += limits_per_page;
            should_draw = current_limit < limits.size();
        }
    }
    prevF5 = currF5;
    return should_draw;
}
bool TestShouldDraw ( ) { static bool should_draw = false ; static bool prevF5 = false ; static bool currF5 = false ; currF5 = ( GetKeyState ( vkDebugText ) & 0x8000 ) != 0 ; if ( currF5 && ! prevF5 ) { if ( ! should_draw ) { current_limit = 0 ; should_draw = true ; } else { current_limit += limits_per_page ; should_draw = current_limit < limits . size ( ) ; } } prevF5 = currF5 ; return should_draw ; }
Test hotkeys and find out if we should draw the limits on screen
Test hotkeys and find out if we should draw the limits on screen
// Should draw flag // Prev state of the debug text key // Curr state of the debug text key // Update key states and find if hot key pressed // Hotkey pressed?!? // So it should draw since this key press // Go to the next page, or stop drawing the limits