// #description = Repairs broken functionality with certain GUIML elements after the T2 mission editor has been initialised. And in some cases, where they misbehave for no known reason.
// Separate Package just to ensure the code is "injected" at the right time
packageGUIMLInjection
{
// Takes care of opening the F2 menu on certain server/client combinations not working properly
functionScoreScreen::onWake(%this)
{
parent::onWake(%this);
if(!isActivePackage(GUIMLWorkaround))
activatePackage(GUIMLWorkaround);
}
// Takes care of if we just launch the editor but never use the F2 menu; clicking a link in say a server desc
functiontoggleEditor(%make)
{
parent::toggleEditor(%make);
if(!isActivePackage(GUIMLWorkaround))
activatePackage(GUIMLWorkaround);
}
};
activatePackage(GUIMLInjection);
//Seperate package to activate our new code
packageGUIMLWorkaround
{
functionGuiMLTextCtrl::onURL(%this,%url)
{
if(getField(%url,0)$="wwwlink")
parent::onURL(%this,getField(%url,1));// Opens a web browser window as it should