D
DarthTenebris
Guest
Hello everybody,
I recently got to try out the new features, and the new structs made me think a bit.
I have a script called EngineUI, which I intend to house all the GUI elements I'm going to make programatically. Previously, I made an object for every button I added. With the new structs, I think I can pull off something more flexible and expandable. Here's the part of interest:
An object called obj_gui_manager handles interaction with the UI script, such as the step and draw "events". On a classic object, I can use the events to detect input that would otherwise require complex GML code to detect, such as double taps, drags, and pinches. Is it possible to have structs detect such events as well, or do I have to detect them manually via the struct's step event?
Thank you for your time.
I recently got to try out the new features, and the new structs made me think a bit.
I have a script called EngineUI, which I intend to house all the GUI elements I'm going to make programatically. Previously, I made an object for every button I added. With the new structs, I think I can pull off something more flexible and expandable. Here's the part of interest:
GML:
function Button(x, y, width, height, absolute, parent) constructor() {
step = function() {
// logic
}
draw = function() {
// render
}
}
Thank you for your time.