public MobileHealthTrackerGump(Mobile mobile) : base(mobile.Serial, 0) { while (UserInterface.GetControl <MobileHealthTrackerGump>(mobile.Serial) != null) { UserInterface.GetControl <MobileHealthTrackerGump>(mobile.Serial).Dispose(); } IsMoveable = true; HandlesMouseInput = true; Mobile = mobile; if (Mobile.IsClientEntity) { AddControl(m_Background = new GumpPic(this, 0, 0, 0x0803, 0)); m_BarBGs = new GumpPic[3]; AddControl(m_BarBGs[0] = new GumpPic(this, 34, 10, 0x0805, 0)); AddControl(m_BarBGs[1] = new GumpPic(this, 34, 24, 0x0805, 0)); AddControl(m_BarBGs[2] = new GumpPic(this, 34, 38, 0x0805, 0)); m_Bars = new GumpPicWithWidth[3]; AddControl(m_Bars[0] = new GumpPicWithWidth(this, 34, 10, 0x0806, 0, 1f)); AddControl(m_Bars[1] = new GumpPicWithWidth(this, 34, 24, 0x0806, 0, 1f)); AddControl(m_Bars[2] = new GumpPicWithWidth(this, 34, 38, 0x0806, 0, 1f)); } else { AddControl(m_Background = new GumpPic(this, 0, 0, 0x0804, 0)); m_BarBGs = new GumpPic[1]; AddControl(m_BarBGs[0] = new GumpPic(this, 34, 38, 0x0805, 0)); m_Bars = new GumpPicWithWidth[1]; AddControl(m_Bars[0] = new GumpPicWithWidth(this, 34, 38, 0x0806, 0, 1f)); AddControl(new HtmlGumpling(this, 17, 13, 120, 20, 0, 0, String.Format("<span color='#000' style='font-family:uni0;'>{0}", mobile.Name))); } }
public TargetLineGump() : base(0, 0) { CanMove = false; AcceptMouseInput = false; Add(_background = new GumpPic(0, 0, 0x1068, 0)); Add(_hp = new GumpPicWithWidth(0, 0, 0x1069, 0, 1)); }
public TargetLineGump(Mobile mobile) : base(mobile.Serial, 0) { CanMove = false; AcceptMouseInput = false; Add(_background = new GumpPic(0, 0, 0x1068, 0)); Add(_hp = new GumpPicWithWidth(0, 0, 0x1069, 0, 1)); Mobile = mobile; }
public MobileHealthTrackerGump(Mobile mobile) : base(mobile.Serial, 0) { while (UserInterface.GetControl <MobileHealthTrackerGump>(mobile.Serial) != null) { UserInterface.GetControl <MobileHealthTrackerGump>(mobile.Serial).Dispose(); } IsMoveable = true; Mobile = mobile; m_World = Service.Get <WorldModel>(); if (Mobile.IsClientEntity) { AddControl(m_Background = new GumpPic(this, 0, 0, 0x0803, 0)); m_Background.MouseDoubleClickEvent += Background_MouseDoubleClickEvent; m_BarBGs = new GumpPic[3]; AddControl(m_BarBGs[0] = new GumpPic(this, 34, 10, 0x0805, 0)); AddControl(m_BarBGs[1] = new GumpPic(this, 34, 24, 0x0805, 0)); AddControl(m_BarBGs[2] = new GumpPic(this, 34, 38, 0x0805, 0)); m_Bars = new GumpPicWithWidth[3]; AddControl(m_Bars[0] = new GumpPicWithWidth(this, 34, 10, 0x0806, 0, 1f)); AddControl(m_Bars[1] = new GumpPicWithWidth(this, 34, 24, 0x0806, 0, 1f)); AddControl(m_Bars[2] = new GumpPicWithWidth(this, 34, 38, 0x0806, 0, 1f)); } else { AddControl(m_Background = new GumpPic(this, 0, 0, 0x0804, 0)); m_Background.MouseDoubleClickEvent += Background_MouseDoubleClickEvent; m_BarBGs = new GumpPic[1]; AddControl(m_BarBGs[0] = new GumpPic(this, 34, 38, 0x0805, 0)); m_Bars = new GumpPicWithWidth[1]; AddControl(m_Bars[0] = new GumpPicWithWidth(this, 34, 38, 0x0806, 0, 1f)); AddControl(m_NameEntry = new TextEntry(this, 17, 16, 124, 20, 0, 0, 99, mobile.Name)); SetupMobileNameEntry(); } // bars should not handle mouse input, pass it to the background gump. for (int i = 0; i < m_BarBGs.Length; i++) { m_BarBGs[i].HandlesMouseInput = false; m_Bars[i].HandlesMouseInput = false; } }
public MobileHealthTrackerGump(Mobile mobile) : base(mobile.Serial, 0) { while (UserInterface.GetControl <MobileHealthTrackerGump>(mobile.Serial) != null) { UserInterface.GetControl <MobileHealthTrackerGump>(mobile.Serial).Dispose(); } IsMoveable = true; Mobile = mobile; if (Mobile.IsClientEntity) { AddControl(m_Background = new GumpPic(this, 0, 0, 0x0803, 0)); m_Background.MouseDoubleClickEvent += Background_MouseDoubleClickEvent; m_BarBGs = new GumpPic[3]; AddControl(m_BarBGs[0] = new GumpPic(this, 34, 10, 0x0805, 0)); AddControl(m_BarBGs[1] = new GumpPic(this, 34, 24, 0x0805, 0)); AddControl(m_BarBGs[2] = new GumpPic(this, 34, 38, 0x0805, 0)); m_Bars = new GumpPicWithWidth[3]; AddControl(m_Bars[0] = new GumpPicWithWidth(this, 34, 10, 0x0806, 0, 1f)); AddControl(m_Bars[1] = new GumpPicWithWidth(this, 34, 24, 0x0806, 0, 1f)); AddControl(m_Bars[2] = new GumpPicWithWidth(this, 34, 38, 0x0806, 0, 1f)); } else { AddControl(m_Background = new GumpPic(this, 0, 0, 0x0804, 0)); m_BarBGs = new GumpPic[1]; AddControl(m_BarBGs[0] = new GumpPic(this, 34, 38, 0x0805, 0)); m_Bars = new GumpPicWithWidth[1]; AddControl(m_Bars[0] = new GumpPicWithWidth(this, 34, 38, 0x0806, 0, 1f)); AddControl(new HtmlGumpling(this, 17, 13, 120, 20, 0, 0, String.Format("<span color='#000' style='font-family:uni0;'>{0}", mobile.Name))); } // bars should not handle mouse input, pass it to the background gump. for (int i = 0; i < m_BarBGs.Length; i++) { m_BarBGs[i].HandlesMouseInput = false; m_Bars[i].HandlesMouseInput = false; } }
public PartyHealthTrackerGump(PartyMember member) : base(member.Serial, 0) { while (UserInterface.GetControl <MobileHealthTrackerGump>() != null) { UserInterface.GetControl <MobileHealthTrackerGump>(member.Serial).Dispose(); } IsMoveable = false; IsUncloseableWithRMB = true; m_Serial = member.Serial; //AddControl(m_Background = new ResizePic(this, 0, 0, 3000, 131, 48));//I need opacity %1 background AddControl(m_Name = new TextLabel(this, 1, 0, 1, member.Name)); //m_Background.MouseDoubleClickEvent += Background_MouseDoubleClickEvent; //maybe private message calling? m_BarBGs = new GumpPic[3]; int sameX = 15; int sameY = 3; if (WorldModel.Entities.GetPlayerEntity().Serial != member.Serial) //you can't send a message to self { AddControl(btnPrivateMsg = new Button(this, 0, 20, 11401, 11402, ButtonTypes.Activate, member.Serial, 0)); //private party message / use bandage ?? } AddControl(m_BarBGs[0] = new GumpPic(this, sameX, 15 + sameY, 9750, 0)); AddControl(m_BarBGs[1] = new GumpPic(this, sameX, 24 + sameY, 9750, 0)); AddControl(m_BarBGs[2] = new GumpPic(this, sameX, 33 + sameY, 9750, 0)); m_Bars = new GumpPicWithWidth[3]; AddControl(m_Bars[0] = new GumpPicWithWidth(this, sameX, 15 + sameY, 40, 0, 1f)); //I couldn't find correct visual AddControl(m_Bars[1] = new GumpPicWithWidth(this, sameX, 24 + sameY, 9751, 0, 1f)); //I couldn't find correct visual AddControl(m_Bars[2] = new GumpPicWithWidth(this, sameX, 33 + sameY, 41, 0, 1f)); //I couldn't find correct visual // bars should not handle mouse input, pass it to the background gump. for (int i = 0; i < m_BarBGs.Length; i++)//??? { m_Bars[i].HandlesMouseInput = false; } }
private void BuildGump() { LocalSerial = _partyMemeberSerial; CanBeSaved = _partyMemeberSerial == World.Player; WantUpdateSize = false; if (World.Party.GetPartyMember(_partyMemeberSerial) != null) { Add(_background = new GumpPic(0, 0, BACKGROUND_NORMAL, 0) { IsVisible = false }); Width = 115; Height = 55; if (CanBeSaved) { Add(_partyNameLabel = new Label("[* SELF *]", false, 0x0386, font: 3) { X = 0, Y = -2 }); } else { Add(_partyNameLabel = new Label(_name, false, Notoriety.GetHue(Mobile.NotorietyFlag), 150, 3, FontStyle.Fixed) { X = 0, Y = -2 }); } Add(_buttonHeal1 = new Button((int)ButtonParty.Heal1, 0x0938, 0x093A, 0x0938) { ButtonAction = ButtonAction.Activate, X = 0, Y = 20 }); Add(_buttonHeal2 = new Button((int)ButtonParty.Heal2, 0x0939, 0x093A, 0x0939) { ButtonAction = ButtonAction.Activate, X = 0, Y = 33 }); Add(_hpLineRed = new GumpPic(18, 20, LINE_RED_PARTY, 0)); Add(_manaLineRed = new GumpPic(18, 33, LINE_RED_PARTY, 0)); Add(_stamLineRed = new GumpPic(18, 45, LINE_RED_PARTY, 0)); Add(_bars[0] = new GumpPicWithWidth(18, 20, LINE_BLUE_PARTY, 0, 96)); Add(_bars[1] = new GumpPicWithWidth(18, 33, LINE_BLUE_PARTY, 0, 96)); Add(_bars[2] = new GumpPicWithWidth(18, 45, LINE_BLUE_PARTY, 0, 96)); } else { if (CanBeSaved) { _oldWarMode = World.Player.InWarMode; Add(_background = new GumpPic(0, 0, _oldWarMode ? BACKGROUND_WAR : BACKGROUND_NORMAL, 0)); Width = _background.Texture.Width; Height = _background.Texture.Height; // add backgrounds Add(_hpLineRed = new GumpPic(34, 12, LINE_RED, 0)); Add(new GumpPic(34, 25, LINE_RED, 0)); Add(new GumpPic(34, 38, LINE_RED, 0)); // add over Add(_bars[0] = new GumpPicWithWidth(34, 12, LINE_BLUE, 0, 0)); Add(_bars[1] = new GumpPicWithWidth(34, 25, LINE_BLUE, 0, 0)); Add(_bars[2] = new GumpPicWithWidth(34, 38, LINE_BLUE, 0, 0)); } else { Hue color = 0; Hue textColor = 0x0386; Hue hitsColor = 0x0386; if (Mobile != null) { hitsColor = 0; color = Notoriety.GetHue(Mobile.NotorietyFlag); if (Mobile.NotorietyFlag == NotorietyFlag.Criminal || Mobile.NotorietyFlag == NotorietyFlag.Gray) { color = 0; } if (_canChangeName = Mobile.IsRenamable) { textColor = 0x000E; } } Add(_background = new GumpPic(0, 0, 0x0804, color)); Add(_hpLineRed = new GumpPic(34, 38, LINE_RED, hitsColor)); Add(_bars[0] = new GumpPicWithWidth(34, 38, LINE_BLUE, 0, 0)); Width = _background.Texture.Width; Height = _background.Texture.Height; Add(_textBox = new TextBox(1, width: 150, isunicode: false, hue: textColor) { X = 16, Y = 14, Width = 150, IsEditable = false, AcceptMouseInput = _canChangeName, AcceptKeyboardInput = _canChangeName, Text = _name }); if (_canChangeName) { _textBox.MouseClick += TextBoxOnMouseClick; } } } }