internal void BaseSkinByType(Gump g) { if (relplug == null) { SkillSettings.DoTell("Base Type is invalid. Cannot skin."); } g.AddPage(0); string switchby = relplug.getGumpType(); if (switchby == "Control") { //this.X = sk.GetCoord("Control", "X", sk ); this.Y = sk.SelectionY; g.X = 0; g.Y = 0; if (!Skin.WindowInfo.ContainsKey("Control")) { SkillSettings.DoTell("No key for Control gump skin."); return; } WindowInfo inf = Skin.WindowInfo["Control"]; g.X = inf.X; g.Y = inf.Y; //this.AddBackground(sk.GetCoord("Control", "X", sk ), sk.SelectionY, sk.GetCoord("Control", "W", sk ), sk.GetCoord("Control", "H", sk ), sk.SelectBGID); g.AddBackground(0, 0, inf.W, inf.H, inf.bgID); g.AddImageTiled(Skin.BarSHX, Skin.BarSHY, Skin.BarSHW, Skin.BarSHH, Skin.SelectLineH); g.AddHtml(Skin.TMSSX, Skin.TMSSY, 140, 20, "<basefont size=5 face=1 color=#CC0000><Center>TMSS - //4// -</center></basefont>", false, false); //<basefont size=5 face=1 color=#CC0000><Center>TM Skill & Stat System v3.0</center></basefont> } else if (switchby == "Master") { g.X = 0; g.Y = 0; if (!Skin.WindowInfo.ContainsKey("Master")) { SkillSettings.DoTell("No key for Master gump skin."); return; } WindowInfo inf = Skin.WindowInfo["Master"]; //this.AddBackground(sk.MasterX, sk.MasterY, sk.MasterW, sk.MasterH, sk.MasterBGID); g.X = inf.X; g.Y = inf.Y; g.AddBackground(0, 0, inf.W, inf.H, inf.bgID); g.AddImageTiled(Skin.BarMHX, Skin.BarMHY, Skin.BarMHW, Skin.BarMHH, Skin.MasterLineH); g.AddImageTiled(Skin.BarMVX, Skin.BarMVY, Skin.BarMVW, Skin.BarMVH, Skin.MasterLineV); g.AddItem(Skin.IconMX, Skin.IconMY, Skin.IconMID, Skin.IconMColor); } else if (switchby == "Underbar") { g.X = 0; g.Y = 0; if (!Skin.WindowInfo.ContainsKey("Underbar")) { SkillSettings.DoTell("No key for Underbar gump skin."); return; } WindowInfo inf = Skin.WindowInfo["Underbar"]; g.X = inf.X; g.Y = inf.Y; g.AddBackground(0, 0, inf.W, inf.H, inf.bgID); //this.AddBackground(sk.sk.GetCoord("Underbar", "X", );, sk.sk.GetCoord("Underbar", "Y", );, sk.HelpW, sk.HelpH, sk.HelpBGID); } else { SkillSettings.DoTell("Unknown Gump Type. Cannot apply base skin."); } }
private void Activate() { this.AddPage(1); //The heart of the matter. If a plugin is enabled... try { if ((bool)QueryPageHelper.PluginsEnabled[arg]) { //Try to connect to the plugin's gump code repository. try { string toAct = "Server.TMSS." + (string)QueryPageHelper.GumpCalls[arg]; //+"."+ControlPageHelper.GumpCalls[num]+"()"; //SkillSettings.doTell( toAct ); ObjectHandle handle = Activator.CreateInstance(null, toAct); TMPlugin theObj = (TMPlugin)handle.Unwrap(); relplug = theObj; GumpType = relplug.getGumpType(); if (GumpType != "Underbar" && GumpType != "Master" && Mobile != null && Skin.HelpOn) { Dictionary <string, object> args = new Dictionary <string, object>(); args.Add("Skin", this.Skin); args.Add("Mobile", Mobile); args.Add("Get", relplug); associatedHelpGump = new TMQueryPage("TMSS Session Help Gump", args); //Mobile.SendGump(associatedHelpGump); } if (!(relplug is Gump)) { BaseSkinByType(this); } theObj.GetGumpCode(this); } //If you can't, throw this exception. catch (Exception e) { SkillSettings.DoTell("Plugin errors on use. Please report this error, and do not attempt to use: " + arg + " Exception: " + e); } } //If the plugin is NOT enabled... else { SkillSettings.DoTell("Plugin not enabled: " + arg); } } catch (Exception e) { SkillSettings.DoTell("Error while creating plugin info. Arg was: " + arg + ". Further info: " + e); } }
private void Activate() { this.AddPage(1); //The heart of the matter. If a plugin is enabled... try { if ((bool)QueryPageHelper.PluginsEnabled[arg]) { //Try to connect to the plugin's gump code repository. try { string toAct = "Server.TMSS." + (string)QueryPageHelper.GumpCalls[arg];//+"."+ControlPageHelper.GumpCalls[num]+"()"; //SkillSettings.doTell( toAct ); ObjectHandle handle = Activator.CreateInstance(null, toAct); TMPlugin theObj = (TMPlugin)handle.Unwrap(); relplug = theObj; GumpType = relplug.getGumpType(); if (GumpType != "Underbar" && GumpType != "Master" && Mobile != null && Skin.HelpOn) { Dictionary<string, object> args = new Dictionary<string, object>(); args.Add("Skin", this.Skin); args.Add("Mobile", Mobile); args.Add("Get", relplug); associatedHelpGump = new TMQueryPage("TMSS Session Help Gump", args); //Mobile.SendGump(associatedHelpGump); } if( !(relplug is Gump) ) BaseSkinByType(this); theObj.GetGumpCode(this); } //If you can't, throw this exception. catch (Exception e) { SkillSettings.DoTell("Plugin errors on use. Please report this error, and do not attempt to use: " + arg + " Exception: " + e); } } //If the plugin is NOT enabled... else { SkillSettings.DoTell("Plugin not enabled: " + arg); } } catch( Exception e ) { SkillSettings.DoTell("Error while creating plugin info. Arg was: "+arg+". Further info: "+e); } }