mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 06:10:56 +00:00
[ui] Return whether events to imui were consumed
Needed for non-ui handling of events (eg, mouse interaction with the main screen).
This commit is contained in:
parent
8068233fb2
commit
bf3d57cdbf
2 changed files with 3 additions and 2 deletions
|
@ -99,7 +99,7 @@ void IMUI_DestroyContext (imui_ctx_t *ctx);
|
|||
|
||||
void IMUI_SetVisible (imui_ctx_t *ctx, bool visible);
|
||||
void IMUI_SetSize (imui_ctx_t *ctx, int xlen, int ylen);
|
||||
void IMUI_ProcessEvent (imui_ctx_t *ctx, const struct IE_event_s *ie_event);
|
||||
bool IMUI_ProcessEvent (imui_ctx_t *ctx, const struct IE_event_s *ie_event);
|
||||
void IMUI_BeginFrame (imui_ctx_t *ctx);
|
||||
void IMUI_Draw (imui_ctx_t *ctx);
|
||||
|
||||
|
|
|
@ -307,7 +307,7 @@ IMUI_SetSize (imui_ctx_t *ctx, int xlen, int ylen)
|
|||
Canvas_SetLen (ctx->csys, ctx->canvas, (view_pos_t) { xlen, ylen });
|
||||
}
|
||||
|
||||
void
|
||||
bool
|
||||
IMUI_ProcessEvent (imui_ctx_t *ctx, const IE_event_t *ie_event)
|
||||
{
|
||||
if (ie_event->type == ie_mouse) {
|
||||
|
@ -326,6 +326,7 @@ IMUI_ProcessEvent (imui_ctx_t *ctx, const IE_event_t *ie_event)
|
|||
ctx->key_code = k->code;
|
||||
ctx->unicode = k->unicode;
|
||||
}
|
||||
return ctx->hot != nullent || ctx->active != nullent;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue