@willmotil wrote:
The question i have is made in a loose or general sense. As every time i try to write a ui i just feel like it sucks.
What sort of patterns do you guys use or think should be used for Ui ?
What sort of patterns do you think work the best to keep it decoupled and adaptable?To say do you think the composite pattern is a good starting point or some other is best. Do you mix patterns and if so which do you choose ?.
I have been trying to prototype a good pattern for UI but this is like my Achilles heel.For example this is my latest idea but im not to sure about it no matter how i try to design my ui it never feels right. Id like to hear others input.
// pseudo ui schema // //abtract BaseElement //{ // LocalPosition // Action OnClick; // Action OnOver; // Action OnAwaitingInput; // //ect. //} // // ConteteElement_A : BaseElement{ // LocalPosition // OnClick; // OnOver; // //ect. //} // // //abtract BaseButton //{ // list<BaseButton> children; // list <BaseElement> baseElements; // list <rectangle> elementsDrawnPosition // // deals with positions and depths // abstract void IterateChanges(int n); //} // // Abstract Group : BaseButton //{ // //} // // Abstract Leaf : BaseButton //{ // //} // // ConcreteA_Panel : Group{ // // has children // // defines element list //} // // ConcreteB_List : Group{ // // has children // // defines element list //} // // ConcreteC_ClickButton : Leaf{ // // cant have children // // defines element list //}
Posts: 1
Participants: 1