Without knowing the constructors for PanelElement and ButtonElement this code looks entirely reasonable to me. Seeing this in isolation the only thing I'd do is move the repeated button color into a common variable, but even then I might leave it alone so they can be changed independently down the line.
View all comments
Show parent comment
1
u/[deleted] Aug 15 '21
Looks pretty bad to me
There’s lots of repeated and unessecary parameters
Also no point in the vector 2 abstraction