Add mobile support
All checks were successful
Build & deploy web version / Build WebAssembly & deploy (push) Successful in 1m1s
All checks were successful
Build & deploy web version / Build WebAssembly & deploy (push) Successful in 1m1s
This commit is contained in:
parent
6e4f0428dc
commit
c4f7565d18
1 changed files with 567 additions and 69 deletions
|
|
@ -59,25 +59,27 @@ void drawOptionsMenu(int deltaTime, int currentOptions[], bool click) {
|
|||
);
|
||||
|
||||
filledCircleColor(screen, (float) screen -> w / 100 * (30 + 0.4 * 100 * (float)(currentOptions[i] - minOptions[i]) / (maxOptions[i] - minOptions[i])),
|
||||
(float) screen -> h / 100 * (optionsStart + i * optionsTav), larger(4, 20 * screen -> h / designHeight), 0xFFFFFFFF
|
||||
(float) screen -> h / 100 * (optionsStart + i * optionsTav), larger(4, (int)(20 * uiScale())), 0xFFFFFFFF
|
||||
);
|
||||
aacircleColor(screen, (float) screen -> w / 100 * (30 + 0.4 * 100 * (float)(currentOptions[i] - minOptions[i]) / (maxOptions[i] - minOptions[i])),
|
||||
(float) screen -> h / 100 * (optionsStart + i * optionsTav), larger(4, 20 * screen -> h / designHeight), 0xFFFFFFFF
|
||||
(float) screen -> h / 100 * (optionsStart + i * optionsTav), larger(4, (int)(20 * uiScale())), 0xFFFFFFFF
|
||||
);
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
if(click)
|
||||
for(i = 0; i < 5; i++)
|
||||
if(click) {
|
||||
for(i = 0; i < 5; i++) {
|
||||
if(isMouseOverRect(50, optionsStart + optionsTav * i, 50, optionsTav / 2)) {
|
||||
//Ezek nem magic számok, csak egy kicsit.
|
||||
currentOptions[i] = minOptions[i] + (int)((maxOptions[i] - minOptions[i]) * (getMousePosition().x - screen -> w * 0.3) / (screen -> w * 0.4) );
|
||||
putInsideInterval(minOptions[i], ¤tOptions[i], maxOptions[i]);
|
||||
//Ezek nem magic számok, csak egy kicsit.
|
||||
currentOptions[i] = minOptions[i] + (int)((maxOptions[i] - minOptions[i]) * (getMousePosition().x - screen -> w * 0.3) / (screen -> w * 0.4) );
|
||||
putInsideInterval(minOptions[i], ¤tOptions[i], maxOptions[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
printBack();
|
||||
drawMenuParticles(deltaTime);
|
||||
printBack();
|
||||
drawMenuParticles(deltaTime);
|
||||
}
|
||||
|
||||
///A játék leírását rajzolja meg.
|
||||
|
|
|
|||
Loading…
Reference in a new issue