Created
October 30, 2015 09:59
-
-
Save dougbinks/cec967aefc739b8c0333 to your computer and use it in GitHub Desktop.
ImGui MenuItemCheckbox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment