top gear2134124 Posted July 10, 2018 Share Posted July 10, 2018 i need help making the thing where you can press right or left and the text will change i know it is like int options but i can not figure it out please help Link to comment Share on other sites More sharing options...
CrAzY_-7865 Posted July 10, 2018 Share Posted July 10, 2018 (edited) 2 hours ago, top gear2134124 said: i need help making the thing where you can press right or left and the text will change i know it is like int options but i can not figure it out please help void AddBoolChar(char *option, char *left, char **Default, int *var, int min, int max, bool loopVariable, char* info = NULL) { char buf[100]; if (loopVariable) { snprintf(buf, sizeof(buf), "%s: %s [~c~%i/%i~w~]", option, Default[*var], *var, max); addOption(buf, info); if (currentOption <= maxOptions && optionCount <= maxOptions) //put u on sprite else if ((optionCount > (currentOption - maxOptions)) && optionCount <= currentOption) //put u off sprite } else { snprintf(buf, sizeof(buf), "%s: %s [~c~%i/%i~w~]", option, Default[*var], *var, max); addOption(buf, info); if (currentOption <= maxOptions && optionCount <= maxOptions) //put u on sprite else if ((optionCount > (currentOption - maxOptions)) && optionCount <= currentOption) //put u off sprite } if (currentOption == optionCount) { if (rightPress) { if (*var >= max) *var = min; else *var = *var + 1; } else if (leftPress) { if (*var <= min) *var = max; else *var = *var - 1; } } } bool Example_ = false; int varLeftRight; char* Example[] { "Text here", "Text 2 here" }; //for put on u menu: AddBoolChar("Simple", "Example", Example, &varLeftRight, 0, 1, Example_); This is only for make example Edited July 10, 2018 by CrAzY_-7865 Link to comment Share on other sites More sharing options...
top gear2134124 Posted July 10, 2018 Author Share Posted July 10, 2018 1 hour ago, CrAzY_-7865 said: void AddBoolChar(char *option, char *left, char **Default, int *var, int min, int max, bool loopVariable, char* info = NULL) { char buf[100]; if (loopVariable) { snprintf(buf, sizeof(buf), "%s: %s [~c~%i/%i~w~]", option, Default[*var], *var, max); addOption(buf, info); if (currentOption <= maxOptions && optionCount <= maxOptions) //put u on sprite else if ((optionCount > (currentOption - maxOptions)) && optionCount <= currentOption) //put u off sprite } else { snprintf(buf, sizeof(buf), "%s: %s [~c~%i/%i~w~]", option, Default[*var], *var, max); addOption(buf, info); if (currentOption <= maxOptions && optionCount <= maxOptions) //put u on sprite else if ((optionCount > (currentOption - maxOptions)) && optionCount <= currentOption) //put u off sprite } if (currentOption == optionCount) { if (rightPress) { if (*var >= max) *var = min; else *var = *var + 1; } else if (leftPress) { if (*var <= min) *var = max; else *var = *var - 1; } } } bool Example_ = false; int varLeftRight; char* Example[] { "Text here", "Text 2 here" }; //for put on u menu: AddBoolChar("Simple", "Example", Example, &varLeftRight, 0, 1, Example_); This is only for make example thanks bro Link to comment Share on other sites More sharing options...
CrAzY_-7865 Posted July 10, 2018 Share Posted July 10, 2018 2 hours ago, top gear2134124 said: thanks bro np, u have skype? Link to comment Share on other sites More sharing options...
top gear2134124 Posted July 10, 2018 Author Share Posted July 10, 2018 (edited) nah discord Edited July 10, 2018 by top gear2134124 Link to comment Share on other sites More sharing options...
CrAzY_-7865 Posted July 10, 2018 Share Posted July 10, 2018 3 hours ago, top gear2134124 said: nah discord tell me your name that I'll add Link to comment Share on other sites More sharing options...
top gear2134124 Posted July 11, 2018 Author Share Posted July 11, 2018 14 hours ago, CrAzY_-7865 said: tell me your name that I'll add how do i fix that problem Link to comment Share on other sites More sharing options...