mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-25 14:36:13 +01:00
12 lines
No EOL
305 B
Text
12 lines
No EOL
305 B
Text
#macro struct_has variable_struct_exists
|
|
|
|
function struct_override(original, override) {
|
|
var args = variable_struct_get_names(override);
|
|
|
|
for( var i = 0; i < array_length(args); i++ ) {
|
|
if(!struct_has(original, args[i])) continue;
|
|
original[$ args[i]] = override[$ args[i]];
|
|
}
|
|
|
|
return original;
|
|
} |