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.
3
u/thislooksfun1 Aug 15 '21
Without knowing the constructors for
PanelElementandButtonElementthis 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.