//public UIImage NPCImage; public override void OnInitialize() { BackgroundPanel = new DraggablePanel(); BackgroundPanel.SetPadding(0); BackgroundPanel.Left.Set(400f, 0f); BackgroundPanel.Top.Set(100f, 0f); BackgroundPanel.Width.Set(600f, 0f); BackgroundPanel.Height.Set(400f, 0f); BackgroundPanel.BackgroundColor = new Color(73, 94, 171); Texture2D buttonKillTexture = ModContent.GetTexture("PissAndShit/UI/DeathHandKillButton"); UIHoverImageButton killButton = new UIHoverImageButton(buttonKillTexture, "Kill NPC"); killButton.Left.Set(10, 0f); killButton.Top.Set(10, 0f); killButton.Width.Set(40, 0f); killButton.Height.Set(40, 0f); killButton.OnClick += new MouseEvent(KillButtonClicked); BackgroundPanel.Append(killButton); Texture2D buttonDamageTexture = ModContent.GetTexture("PissAndShit/UI/DeathHandDamageButton"); UIHoverImageButton damageButton = new UIHoverImageButton(buttonDamageTexture, "Damage NPC"); damageButton.Left.Set(60, 0f); damageButton.Top.Set(10, 0f); damageButton.Width.Set(40, 0f); damageButton.Height.Set(40, 0f); damageButton.OnClick += new MouseEvent(DamageButtonClicked); BackgroundPanel.Append(damageButton); Append(BackgroundPanel); }
public override void OnInitialize() { BackgroundPanel = new DraggablePanel(); BackgroundPanel.SetPadding(0); BackgroundPanel.Left.Set(400f, 0f); BackgroundPanel.Top.Set(50f, 0f); BackgroundPanel.Width.Set(100f, 0f); BackgroundPanel.Height.Set(40f, 0f); BackgroundPanel.BackgroundColor = new Color(73, 94, 171); UINumPanel = new UINumberPanel(); UINumPanel.SetPadding(0); // ????? UINumPanel.Left.Set(40f, 0f); UINumPanel.Top.Set(5f, 0f); UINumPanel.Width.Set(50f, 0f); UINumPanel.Height.Set(30f, 0f); BackgroundPanel.Append(UINumPanel); Append(BackgroundPanel); }