mirror of
https://github.com/zoriya/Gamacon.git
synced 2026-05-26 16:47:36 +00:00
Allowing nullables
This commit is contained in:
@@ -20,6 +20,10 @@ static void ctr(void *component, va_list args)
|
||||
|
||||
if (!scene)
|
||||
return;
|
||||
if (onclick == NULL) {
|
||||
cmp->onclick = NULL;
|
||||
return;
|
||||
}
|
||||
callback = scene->get_callback(scene, onclick);
|
||||
if (!callback)
|
||||
my_printf("No callback found with the name: %s\n", onclick);
|
||||
@@ -35,7 +39,7 @@ static void fdctr(gc_entity *entity, gc_scene *scene, void *component, node *n)
|
||||
if (!scene)
|
||||
return;
|
||||
callback = scene->get_callback(scene, onclick);
|
||||
if (!callback)
|
||||
if (!callback && !xml_hasproperty(n, "nullable"))
|
||||
my_printf("No callback found with the name: %s\n", onclick);
|
||||
cmp->onclick = callback;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user