Binding Skin-Controls dynamically (1 Viewer)

steve42

MP Donator
  • Premium Supporter
  • November 9, 2008
    79
    30
    Ettlingen
    Home Country
    Germany Germany
    Hi everybody,

    I hope this is the right place to ask. I am new to plugin development, but I in the last few days there is
    a lot of progress, but for now i am looking for a solutions of this problem:

    I've developed a couple of skin files with the new skin editor. The skin controls contain some "magic"
    descriptions and my plugin should now dynamically bind GUIControl instances to all these controls,
    which have the right OnClick ... handlers installed automatically (controled through the plugins code).

    The skin file should work as a template in a way that it defines everything and the plugin code is very
    generic.

    But how do I bind controls? The only thing I saw until now is attributes. But this is hardcoded and one
    must know all the ids and types in advance.

    I hope someone of the 'wise man' could give me a hint.

    steve
     

    steve42

    MP Donator
  • Premium Supporter
  • November 9, 2008
    79
    30
    Ettlingen
    Home Country
    Germany Germany
    Solutions found

    Okay, I must confess that a little code reading reveals a simple solution:

    load the windows a usual and iterate over the included controls.

    But yesterday night this was not so obvious to me. sorry I am new to mp and c# development.
     

    Users who are viewing this thread

    Top Bottom