summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-09-10 10:23:04 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-09-10 10:23:04 +0300
commit42c455a7cb92def894e394f8702e081488965c50 (patch)
tree232cdc9a17f1c2784b5cb8d107215a27ec6c572d /src/ui
parent8faf510eadb2a831c60d31cc66cfe9bac7db651f (diff)
Cleanup
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/widget.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ui/widget.c b/src/ui/widget.c
index cfd119cb..c8db73dc 100644
--- a/src/ui/widget.c
+++ b/src/ui/widget.c
@@ -140,7 +140,7 @@ void setPos_Widget(iWidget *d, iInt2 pos) {
140 setFlags_Widget(d, fixedPosition_WidgetFlag, iTrue); 140 setFlags_Widget(d, fixedPosition_WidgetFlag, iTrue);
141} 141}
142 142
143void setSize_Widget(iWidget *d, iInt2 size) { 143void setSize_Widget(iWidget *d, iInt2 size) {
144 d->rect.size = size; 144 d->rect.size = size;
145 setFlags_Widget(d, fixedSize_WidgetFlag, iTrue); 145 setFlags_Widget(d, fixedSize_WidgetFlag, iTrue);
146} 146}
@@ -687,8 +687,11 @@ iBool isHover_Widget(const iAnyObject *d) {
687} 687}
688 688
689iBool isSelected_Widget(const iAnyObject *d) { 689iBool isSelected_Widget(const iAnyObject *d) {
690 iAssert(isInstance_Object(d, &Class_Widget)); 690 if (d) {
691 return d && (flags_Widget(d) & selected_WidgetFlag) != 0; 691 iAssert(isInstance_Object(d, &Class_Widget));
692 return (flags_Widget(d) & selected_WidgetFlag) != 0;
693 }
694 return iFalse;
692} 695}
693 696
694iBool equalWidget_Command(const char *cmd, const iWidget *widget, const char *checkCommand) { 697iBool equalWidget_Command(const char *cmd, const iWidget *widget, const char *checkCommand) {