osu-framework icon indicating copy to clipboard operation
osu-framework copied to clipboard

Extend Draw Visualiser to allow inspecting non-Drawable objects

Open dekrain opened this issue 3 years ago • 4 comments

I have implemented a very very hacky prototype that allows to inspect objects & structs in the tree view with graph view for iterables.

Properties/fields are inspected by clicking on values in property inspector. Inspector

Now having implemented this ad-hoc, I realise it would take some time to support it properly, plus there are going to be some untested bugs, including that the game crashes if I inspect the inspector itself (which was partially prevented before, but it seems my solutions bypasses it). But it could come handy in debugging when properly implemented.

dekrain avatar Dec 20 '21 23:12 dekrain

Looks cool for sure, though I'd probably expand the property on the right hand side rather than make DrawVisualiser drill into objects.

smoogipoo avatar Dec 21 '21 01:12 smoogipoo

(I spent way too much time on this) but I also made it so that any ToolWindow will update its content layout when it's resized due to toolbar changing its size if there's too much buttons to fit in one line (I tried to add more buttons to the TreeContainer but the buttons overflowed and the last one overlapped with the tree view). I used FillFlowContainer for it instead of relying on manual Padding for the main content.

dekrain avatar Dec 31 '21 23:12 dekrain

I've split the VisualisedDrawable (which I renamed to VisualisedElement) class into multiple subclasses that handle different kinds of objects.

visualiser

I will move the functionality of DrawVisualiser for inspecting object into a seperate tool later, just thought it would be useful to post some progress.

dekrain avatar Jan 11 '22 16:01 dekrain

that's all well and good, but you haven't addressed any of the feedback provided on your currently-open PR that i presume to be a prerequisite to any of the above.

bdach avatar Jan 11 '22 18:01 bdach