From 8e2828efc6d9c88f39592f4ae1c709937b8b9f46 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sat, 5 Sep 2020 10:11:10 +0300 Subject: Refactor: ListWidget for a general purpose list The sidebar uses a ListWidget now, but the layout needs fixing. --- src/ui/util.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/ui/util.c') diff --git a/src/ui/util.c b/src/ui/util.c index dfe364a5..120be3be 100644 --- a/src/ui/util.c +++ b/src/ui/util.c @@ -36,6 +36,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include +iBool isCommand_SDLEvent(const SDL_Event *d) { + return d->type == SDL_USEREVENT && d->user.code == command_UserEventCode; +} + iBool isCommand_UserEvent(const SDL_Event *d, const char *cmd) { return d->type == SDL_USEREVENT && d->user.code == command_UserEventCode && equal_Command(d->user.data1, cmd); -- cgit v1.2.3