summaryrefslogtreecommitdiff
path: root/src/ui/util.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-09-05 10:11:10 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-09-05 10:11:10 +0300
commit8e2828efc6d9c88f39592f4ae1c709937b8b9f46 (patch)
tree81594e6be5ae4fe5f55ec6bcb4f1fe9c4c3c4603 /src/ui/util.c
parentaa50c1e0028c6cb08524dcdfb7188906c817e46f (diff)
Refactor: ListWidget for a general purpose list
The sidebar uses a ListWidget now, but the layout needs fixing.
Diffstat (limited to 'src/ui/util.c')
-rw-r--r--src/ui/util.c4
1 files changed, 4 insertions, 0 deletions
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. */
36#include <the_Foundation/math.h> 36#include <the_Foundation/math.h>
37#include <the_Foundation/path.h> 37#include <the_Foundation/path.h>
38 38
39iBool isCommand_SDLEvent(const SDL_Event *d) {
40 return d->type == SDL_USEREVENT && d->user.code == command_UserEventCode;
41}
42
39iBool isCommand_UserEvent(const SDL_Event *d, const char *cmd) { 43iBool isCommand_UserEvent(const SDL_Event *d, const char *cmd) {
40 return d->type == SDL_USEREVENT && d->user.code == command_UserEventCode && 44 return d->type == SDL_USEREVENT && d->user.code == command_UserEventCode &&
41 equal_Command(d->user.data1, cmd); 45 equal_Command(d->user.data1, cmd);