/**
 * @brief Called when the user wheel the mouse over the node
 */
static qboolean UI_MaterialEditorNodeWheel (uiNode_t *node, int deltaX, int deltaY)
{
	qboolean down = deltaY > 0;
	const int diff = (down) ? 1 : -1;
	if (deltaY == 0)
		return qfalse;
	return UI_AbstractScrollableNodeScrollY(node, diff);
}
Пример #2
0
static void UI_TextListNodeMouseWheel (uiNode_t *node, qboolean down, int x, int y)
{
    UI_AbstractScrollableNodeScrollY(node, (down ? 1 : -1));
    if (node->onWheelUp && !down)
        UI_ExecuteEventActions(node, node->onWheelUp);
    if (node->onWheelDown && down)
        UI_ExecuteEventActions(node, node->onWheelDown);
    if (node->onWheel)
        UI_ExecuteEventActions(node, node->onWheel);
}
Пример #3
0
static void UI_TextListNodeMouseWheel (uiNode_t *node, int deltaX, int deltaY)
{
	qboolean down = deltaY > 0;
	if (deltaY == 0)
		return;
	UI_AbstractScrollableNodeScrollY(node, (down ? 1 : -1));
	if (node->onWheelUp && !down)
		UI_ExecuteEventActions(node, node->onWheelUp);
	if (node->onWheelDown && down)
		UI_ExecuteEventActions(node, node->onWheelDown);
	if (node->onWheel)
		UI_ExecuteEventActions(node, node->onWheel);
}