Refactored sample code. Separated navmesh test code to a tool class.

This commit is contained in:
Mikko Mononen
2009-12-30 08:49:46 +00:00
parent 5daf3f8157
commit 4934dc2065
15 changed files with 2843 additions and 1648 deletions
+3 -6
View File
@@ -350,11 +350,8 @@ int main(int argc, char *argv[])
pos[0] = rays[0] + (raye[0] - rays[0])*t;
pos[1] = rays[1] + (raye[1] - rays[1])*t;
pos[2] = rays[2] + (raye[2] - rays[2])*t;
if (SDL_GetModState() & KMOD_SHIFT)
sample->setToolStartPos(pos);
else
sample->setToolEndPos(pos);
bool shift = (SDL_GetModState() & KMOD_SHIFT) ? true : false;
sample->handleClick(pos, shift);
}
}
else
@@ -700,7 +697,7 @@ int main(int argc, char *argv[])
// Tools
if (showTools && showMenu && mesh && sample)
{
if (imguiBeginScrollArea("Tools", 10, height - 10 - 200, 150, 200, &toolsScroll))
if (imguiBeginScrollArea("Tools", 10, height - 10 - 250, 200, 250, &toolsScroll))
mouseOverMenu = true;
sample->handleTools();