Can someone else whose made a plugin confirm something for me before I post another bug report where it turns out there was no bug and I'm just an idiot.....
So if I call
Plugin.MbApiInterface.Setting_GetSkinElementColour(Plugin.SkinElement.SkinButton, Plugin.ElementState.ElementStateDefault, Plugin.ElementComponent.ComponentBackground)));
This returns the colour from the following element.
<element id="Controls.Button.Default" bg="2,54,104" fg="210,210,210" bdr="1,20,55" />
I confirmed it by changing the colours on that element and they were reflected in the colour returned.
Now if add the following line to the skins XML file
<element id="Controls.Button.Modified" fg="255,0,0" bdr="1,20,55" />
I would expect the following command to return 255,0,0 but it doesn't, it returns 210,210,210
Plugin.MbApiInterface.Setting_GetSkinElementColour(Plugin.SkinElement.SkinButton, Plugin.ElementState.ElementStateModified, Plugin.ElementComponent.ComponentForeground)));
I guess the issue could be that SkinElement.SkinButton is from something else that inherits the default colour from Controls.Button but I think that would be unlikely.
Or maybe Controls.Button cannot have a modified state? From the tests I've done I can't get any of the elements to return a different colour for modified state.
So, bug or idiot?.....possibly both.