ISOFX Posted January 16, 2016 Share Posted January 16, 2016 Hey. I wanna add checkboxes to my menu like how it was done in NativeUI. Does anyone have code to flick between checked and unchecked. C++ Thanks Link to comment Share on other sites More sharing options...
alloc8or Posted January 16, 2016 Share Posted January 16, 2016 Here's what I do... void OptionStatus(int status){ if (!HAS_STREAMED_TEXTURE_DICT_LOADED("CommonMenu")) { REQUEST_STREAMED_TEXTURE_DICT("CommonMenu", 0); } if (status == 0) { DRAW_SPRITE("CommonMenu", "shop_box_blank", 0.25 + CurrentMenuPos, Option_Y + 0.0128, 0.033, 0.043, 0.0, 255, 255, 255, 255); } else if (status == 1) { DRAW_SPRITE("CommonMenu", "shop_box_tick", 0.25 + CurrentMenuPos, Option_Y + 0.0128, 0.033, 0.043, 0.0, 255, 255, 255, 255); } if (menu::printingoption == menu::currentoption && status == 0) { DRAW_SPRITE("CommonMenu", "shop_box_blankb", 0.25 + CurrentMenuPos, Option_Y + 0.0128, 0.033, 0.043, 0.0, 255, 255, 255, 255); } else if (menu::printingoption == menu::currentoption && status == 1) { DRAW_SPRITE("CommonMenu", "shop_box_tickb", 0.25 + CurrentMenuPos, Option_Y + 0.0128, 0.033, 0.043, 0.0, 255, 255, 255, 255); }} Inside void AddToggle function ⤵ OptionStatus(static_cast<int>(loopVariable)); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now