December 14, 2017, 07:04:15 PM

Vita-Nex: Core



ServUO
Ultima Shards: Multiverse

JetBrains

User Info

 
 
Welcome, Guest. Please login or register.

Who's Online

  • Dot Guests: 1
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

Advertisment

Current Board

Support  >  Custom Support

Give and receive help and advice to do with any aspect of customizing the project. This is the best board to post in if you're having issues with a custom module, service or modification.


Author Topic: Cast Bars Suggestion  (Read 7194 times)

0 Members and 1 Guest are viewing this topic.

Offline Greed

  • User
  • *
  • Posts: 21
  • Likes: 2
    • View Profile
Cast Bars Suggestion
« on: February 03, 2015, 03:01:43 AM »
Hi Vorspire, love your Vita-Nex Core it is the best. Thank you so much for it. I do have a minor suggestion though which a good friend proposed to me and asked that I should relay to you. Specifically, the cast bars themselves would turn red when you are interrupted and blue when your spell is ready to be casted.
« Last Edit: February 03, 2015, 03:18:43 AM by Greed »

Offline Vorspire

  • Administrator
  • *****
  • Posts: 142
  • Likes: 34
  • Founder & Developer
    • View Profile
    • Vita-Nex: Core
Re: Cast Bars Suggestion
« Reply #1 on: February 03, 2015, 08:46:22 AM »
Sounds like a good idea, I'll consider it for the next release!

Currently the cast bars rely on tiled images in the gump that can not be hued, but there are new techniques that can be used to work around that; namely using html entries with a bodybgcolor set.

Here is an example that will allow you to turn the filler for the cast bars any color you want (just change Color.DarkGreen)

Code: [Select]
protected override void CompileLayout(SuperGumps.SuperGumpLayout layout)
{
base.CompileLayout(layout);

int xyPadding = Padding;
int whPadding = xyPadding * 2;

// We know that 'layout' contains this entry, so replace it with a tweaked version!
// It doesn't matter that we've added it to the layout late, it will replace and insert itself correctly.
layout.AddReplace(
"imagetiled/body/visual",
() =>
{
if (Width <= whPadding || Height <= whPadding)
{
return;
}

int x = xyPadding, y = xyPadding, w = Width - whPadding, h = Height - whPadding;

if (FlowOffset(ref x, ref y, ref w, ref h))
{
AddImageTiled(x, y, w, h, ForegroundID);

// Additional HTML entry (with background color set)
AddHtml(x, y, w, h, " ".WrapUOHtmlBG(Color.DarkGreen), false, false);
}
});
}

The above code added to the SpellCastBar gump, overrides the template from its base ProgressBarGump by replacing the entry in the SuperGumpLayout.
« Last Edit: February 03, 2015, 08:56:11 AM by Vorspire »

Offline Greed

  • User
  • *
  • Posts: 21
  • Likes: 2
    • View Profile
Re: Cast Bars Suggestion
« Reply #2 on: February 03, 2015, 10:08:34 AM »
You're the best Vorspire. Thanks man.  ;D

Offline Greed

  • User
  • *
  • Posts: 21
  • Likes: 2
    • View Profile
Re: Cast Bars Suggestion
« Reply #3 on: February 12, 2015, 01:55:57 AM »
Here's another suggestion: if possible make it so that the cast bars work with Sallos too.  ;)

 

Download VNc

Recent Topics

Vita-Nex: Core 4.0.0.0 Released by Vorspire
[January 15, 2017, 08:56:41 PM]


Effects Help by Vorspire
[January 15, 2017, 06:47:33 PM]


Ultima Online Phoenix is Ready to Begin! by Abracadabra2.0
[December 13, 2016, 01:14:49 AM]


How To: Deceit Braziers Spawn/Despawn by Abracadabra2.0
[November 26, 2016, 07:34:13 PM]


Installing VNC 3.0.0.1 by Johnny
[August 27, 2016, 06:49:40 PM]


JSON Web Stats Stuck Problem by Argalep
[May 27, 2016, 06:16:55 AM]


Modules not Working after being Enabled by ProfessorChaos
[May 19, 2016, 02:44:06 AM]


Issues Installing VitaNex Core 3.0.0.1 on RunUO 2.7 by ProfessorChaos
[May 18, 2016, 09:30:37 PM]


ADM Assistance by Vorspire
[May 18, 2016, 09:23:25 PM]


Suggestion by Vorspire
[April 24, 2016, 06:23:15 PM]

Comments

Refresh History
  • Moderated
  • Terrapin: Hello - and thanks - thought I would check VNC out since using it in JustUO server...
    April 22, 2015, 10:20:17 PM
  • Vorspire: Hello!
    December 16, 2014, 07:11:55 PM
  • Tek: Hello
    December 15, 2014, 08:51:25 AM
  • magnus_mythos: hello
    November 18, 2014, 05:30:22 AM
  • Antares_UO: thanks Vospire
    June 15, 2014, 06:52:17 PM
  • jezika: Thank you is not enough Vorspire! This system is exactly what I was looking for.
    June 04, 2014, 06:01:11 AM
  • Vorspire: VNc 2.1.1.0 Released!
    March 10, 2014, 01:33:06 AM
  • Vorspire: VNc 2.1.0.0 Released!
    January 27, 2014, 12:57:51 PM
  • Kassandra: Many thanks for building my shard for me.  It is awesome, I'm extremely pleased with what you've done and the ongoing support!!!
    November 20, 2013, 01:31:08 AM
  • Regnak: Great news ! Thanks Vorspire :)
    November 16, 2013, 01:55:16 PM
  • Vorspire: VNc: 2.1.0.0 is being developed!
    November 13, 2013, 08:38:35 AM
  • Vorspire: VNc 2.0.0.5 Released!
    September 11, 2013, 12:49:42 AM
  • Vorspire: VNc 2.0.0.4 Released!
    August 23, 2013, 12:47:54 AM
  • Vorspire: VNc 2.0.0.3 Released!
    July 05, 2013, 12:50:13 AM
  • Kaemalux: :-)
    July 01, 2013, 01:51:13 PM
  • Vorspire: VNc 2.0.0.2 Released!
    June 20, 2013, 08:29:19 PM
  • scrlked: I am trying it out on my shard. This is taking UO to the next level.
    June 13, 2013, 11:11:16 AM
  • Vorspire: VNc 2.0.0.0 Released!
    June 03, 2013, 12:53:33 AM
  • ST33LDI9ITAL: huzzah, going on vacation in for 2 weeks soon, plan to catch up on some runuo stuff. looking forward to taking some time with it. good job!
    February 26, 2013, 06:02:30 AM
  • Vorspire: The latest, most optimised version of VNc is not far from release.
    February 22, 2013, 03:16:51 AM

Carbonate design by Bloc
variant: carbon
SMF 2.0.11 | SMF © 2015, Simple Machines
SimplePortal 2.3.6 © 2008-2014, SimplePortal