BizHawk icon indicating copy to clipboard operation
BizHawk copied to clipboard

Yoshi's UI experiment

Open YoshiRulz opened this issue 5 years ago • 1 comments

This is a proof-of-concept for creating an abstraction over WinForms, which we could later implement using another UI framework without needing to rewrite EmuHawk. It doesn't work with the Designer, but we'd need to ditch that when switching UI frameworks anyway.

I'd like feedback on which coding style people are most comfortable with for UI design. Pick yer poison (edit: I confused "imperative" with "procedural" when committing): "imperative in ctor" (as opposed to in InitializeComponent in the Designer file): https://github.com/TASEmulators/BizHawk/blob/229c31e4192a22cc2f9159804a75fbfadbfcab8a/src/BizHawk.Client.EmuHawk/config/AutofireConfig.cs#L32-L55 "imperative + builders": (note: The method HackAddChild was named with regards to the third "DSL" style, in which it is relegated to be a hack. Obviously it's not a hack if we agree that's how it should be done.) https://github.com/TASEmulators/BizHawk/blob/879fdc8f432d484cececd8c0cbeef68dc2c294c3/src/BizHawk.Client.EmuHawk/config/AutofireConfig.cs#L36-L62 "DSL" https://github.com/TASEmulators/BizHawk/blob/ce8498da976e80cad1157d8784a0e56e35d20c2c/src/BizHawk.Client.EmuHawk/config/AutofireConfig.cs#L47-L72

YoshiRulz avatar Jul 10 '20 13:07 YoshiRulz

I'd like feedback on which coding style people are most comfortable with for UI design.

From an outsider's point of view, I prefer code styles that "pack" information together without too many indentations, that are related to one another of an UI object, and being presentable/readable to the developers who are modifying its properties "on a whim" to suit the needs that are "in demand".

That means, I would be more inclined to go with the "imperative + builders" style a bit more.

tommai78101 avatar Jul 13 '22 17:07 tommai78101