Widget / Spatial conundrum

Been thinkin’ about Widget and Spatial in Renderer.

One way to deal with this would be to use the actual Widget implementations instead of the interface.

Here’s what I mean, remove the draw(Widget w) method and use draw(WidgetContainerAbstract w) and draw(WidgetImpl w) instead. If there is a higher lever Widget that has specific rendering needs we can add the draw method to handle it, i.e. draw(WidgetText wt), draw(WidgetScrollerButton wsb). I think this will get rid of the ambiguity between the Widget interface and Spatial in the Renderer. Anyway, that’s how it works with the rest of the Spatial derived classes, (which didn’t occur to me until I was taking a shower this morning. :slight_smile: )

I can’t try it out until later, but do you think that will work?


Yes, that should work. That’s exactly what I was thinking.

Do you think we should move Widget Renderer draw methods into the main Renderer interface and class or leave them in the extended interface and classes?

Either way works for me.


I think having all rendering done in one place is a good idea. So I’m all for it moving into Renderer. My only concern is the size of Renderer. It may be getting cumbersome.

I say we go ahead and move everything into the single renderer for now. See how that works. That would allow the removal of both the WidgetDisplaySystem and WidgetRenderer. Which I think would be good just for the confusion they may cause.

Works for me.