StOneDOes Posted Tuesday at 05:32 AM Share Posted Tuesday at 05:32 AM When it comes to rendering and interacting with different menus, can I assume that the correct way to do this is to have multiple Interface classes, where each Interface would represent a different menu. I'm assuming that you would not want to have every single widget on the same interface, otherwise it is probably going to be inefficient such that every widget would need to be iterated over by its parent each frame to determine whether it needs to be rendered or not. Presumably, if you hide the parent widget (ideally the root widget in this case), the widget would essentially have nothing to do when checked by the engine, and all its child widgets would be implicitly hidden also. Is this an accurate analysis? Quote Link to comment Share on other sites More sharing options...
Solution Josh Posted Tuesday at 05:57 AM Solution Share Posted Tuesday at 05:57 AM Since the widgets are hierarchical, there is no downside to putting them all in one interface. If you hide the topmost parent for each sub-interface the children will not be iterated through. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
StOneDOes Posted yesterday at 05:26 AM Author Share Posted yesterday at 05:26 AM What is actually the correct widget type to use as a parent of each sub-interface? Because I've tried creating a panel and setting its parent to the interface's root widget, and then tried creating all my subwidgets with the panel as parent, and cannot get them to render with this setup. Quote Link to comment Share on other sites More sharing options...
Dreikblack Posted yesterday at 05:46 AM Share Posted yesterday at 05:46 AM Is panel hidden (it would hide kids)? Also make sure it's full sized - kids uses local coordinates and can't be visible beside parent borders 1 Quote Link to comment Share on other sites More sharing options...
StOneDOes Posted yesterday at 06:34 AM Author Share Posted yesterday at 06:34 AM Ok I see what you mean. It shows when the panel is at 0,0 and matches the window size. The idea is to have the "root" widget per menu be used for nothing more than logical grouping for showing/hiding the entire menu. So ideally I would want to have the panel be invisible, so I can have a completely customized menu, and maintain efficiency at the engine level. Quote Link to comment Share on other sites More sharing options...
StOneDOes Posted yesterday at 06:36 AM Author Share Posted yesterday at 06:36 AM Ok just using SetColor() with alpha 0 appears to do want I need. Thank you 1 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.