theom Posted July 11, 2018 Share Posted July 11, 2018 What is your take on implementing a control disable feature? Some thoughts (child overrides a parent handler): Set a flag in the Control class and it and all children need to know about the flag and honor it. Set a flag in the Control class and return false from the parent handler. The child only needs to act on the return value from the parent but call order matters, i.e the child needs to check with the parent method before doing anything else. I have mainly used option 2 in the past but 1 as well and they both work well. My current needs are to be able to disable buttons, which is easy to implement specifically for the button, but I think it's worth the effort to make this available to all the controls. Quote Link to comment Share on other sites More sharing options...
Guest Posted July 11, 2018 Share Posted July 11, 2018 Agree for 2! Quote Link to comment Share on other sites More sharing options...
theom Posted July 11, 2018 Author Share Posted July 11, 2018 I took a quick look at the Control class and it uses the same method as option 2, but for other purposes. Probably not a problem though. I'll begin with the Button and see how disabling it meshes with the current code. GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
theom Posted August 18, 2018 Author Share Posted August 18, 2018 I got seriously sidetracked and haven't been able to work on this and I'm unsure when I'll be able to get back to it. Anyway, just wanted to give you a heads up ? Sebavan 1 Quote Link to comment Share on other sites More sharing options...
Sebavan Posted August 18, 2018 Share Posted August 18, 2018 isEnabled property has been added and used by text input so far Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.