Skip to content

Instantly share code, notes, and snippets.

@dougbinks
Created October 30, 2015 09:59
Show Gist options
  • Save dougbinks/cec967aefc739b8c0333 to your computer and use it in GitHub Desktop.
Save dougbinks/cec967aefc739b8c0333 to your computer and use it in GitHub Desktop.

Revisions

  1. dougbinks created this gist Oct 30, 2015.
    18 changes: 18 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    bool MenuItemCheckbox( const char* name_, bool* pB_ )
    {
    bool retval = ImGui::MenuItem( name_ );
    ImGui::SameLine();
    if( *pB_ )
    {
    ImGui::Text(ICON_FA_CHECK_SQUARE_O);
    }
    else
    {
    ImGui::Text(ICON_FA_SQUARE_O);
    }
    if( retval )
    {
    *pB_ = ! *pB_;
    }
    return retval;
    }