Quickmenu without .menu :D
Hey all,
I've had a nice idea and maybe somebody wants to do it:
pseudocode:
PHP Code:
while (isDefined(player))
{
if (player useButtonPressed())
{
createAllQuickMenuHuds();
mouse = getMousePositionFromPlayerAngles();
drawMousePointer(mouse["x"], mouse["y"]);
item = findSelectedItem(mouse);
doSomethingWithItem(item);
} else {
deleteAllQuickMenuHuds();
}
}
The idea is, that if the player is pressing USE, an overlay will appear. To "fake" a mouse-pointer, the player-angles are used. Which item is used, depends on where to release the mouse-pointer on.
That would work with every weapon, though it could be restricted to a "tool gun".
I would like such a system to buy Turrets e.g. in the BaseTDM.
If something is unclear, just ask :)