im trying to making a menu base and I cant get my scroller to work. I can scroll through my menu but the GRAPHICS::DRAW_RECT wont follow, if you know what I mean. does anyone know what im doing wrong.
float XSS = 0.0;
float ScrollY = (0.1 / 3) + ((1 * 0.03) + 0.1250);
void Scrolling(char* Option, char* Description = NULL) {
float toPos;
if (MenuVariables::OptionCount > MenuVariables::MaxOptions)
{
if (MenuVariables::CurrentOption > MenuVariables::MaxOptions)
toPos = (0.1 / 3) + ((MenuVariables::MaxOptions * 0.03) + 0.237) - 0.034 + Y;
else
toPos = (0.1 / 3) + ((MenuVariables::CurrentOption * 0.03) + 0.237) - 0.034 + Y;
}
else
{
toPos = (0.1 / 3) + ((MenuVariables::CurrentOption * 0.03) + 0.237) - 0.034 + Y;
}
if (ScrollY > toPos)
ScrollY -= 0.0005;
if (ScrollY < toPos)
ScrollY += 0.0005;
}
/*scroller*/ GRAPHICS::DRAW_RECT(0.4890625, ScrollY, XSS, 0.02361111, scrollerRed, scrollerGreen, scrollerBlue, ScrollOpacity);
float XSS = 0.0;
float ScrollY = (0.1 / 3) + ((1 * 0.03) + 0.1250);
void Scrolling(char* Option, char* Description = NULL) {
float toPos;
if (MenuVariables::OptionCount > MenuVariables::MaxOptions)
{
if (MenuVariables::CurrentOption > MenuVariables::MaxOptions)
toPos = (0.1 / 3) + ((MenuVariables::MaxOptions * 0.03) + 0.237) - 0.034 + Y;
else
toPos = (0.1 / 3) + ((MenuVariables::CurrentOption * 0.03) + 0.237) - 0.034 + Y;
}
else
{
toPos = (0.1 / 3) + ((MenuVariables::CurrentOption * 0.03) + 0.237) - 0.034 + Y;
}
if (ScrollY > toPos)
ScrollY -= 0.0005;
if (ScrollY < toPos)
ScrollY += 0.0005;
}
/*scroller*/ GRAPHICS::DRAW_RECT(0.4890625, ScrollY, XSS, 0.02361111, scrollerRed, scrollerGreen, scrollerBlue, ScrollOpacity);
??????? ????