Author Topic: Decal and CheckColumns
EndyTheUnsane 
Posts: ????
Registered: ????
Extended Info (if available)
Real Post Cnt: 0
User ID: 0
Subject: Decal and CheckColumns
I figured I would ask here since the DecalDev Forums are a ghost town and turning into spammer heaven.

So I've recently started dabbling with making a Decal plugin. For the most part right now just trying different things and seeing how it works, mostly to do with chat at the moment. So far I've been able to figure out how to overcome the problems I've encountered (except for using Virindi Views which I decided I would wait until i was a little farther along to deal with). But now something else has got me stumped.

I just can't wrap my head around Lists and the CheckColumns. I can use a basic List just fine. In a test plugin I have it create a list of user entered names and can then delete those names. But say I have 2 CheckColumns as well. So when a name is entered, it appears on a row with 2 check boxes. How do I deal with that type of checkbox? As in, how do I store it so that when I delete a name, it also properly removes the checkboxes on the same row. Or when I sort the Names list, it doesn't screw up which check box values are for which name. I can deal with the regular checkboxes just fine, but I seem to be missing something for the checkboxes in the check column. It's probably something really simple that I am overlooking that will all of a sudden make it click.

Any help would be appreciated.

 

-----signature-----
Link to this post
Virindi-Inquisitor 
Posts: 6,908
Registered: Nov 18, '01
Extended Info (if available)
Real Post Cnt: 6,646
User ID: 511,923
Subject: Decal and CheckColumns
In a listbox, all the controls in each horizontal row are stored in a 'row' entry. Only entire rows can be added and deleted. Deleting a row in the middle will automatically 'move up' all the stuff below it. If your plugin merely assigns text or a checked value to part of a row, then it is up to you to make sure you do that consistently.

 

-----signature-----
Virindi
---
****Virindi Plugins FAQ**** http://www.virindi.net/wiki/index.php/Virindi_Plugins_FAQ
http://www.virindi.net - Virindi Tank, Follower, Integrator, Reporter, VCS5, XPHelper, Item Tool, HUDs, etc...
Decal Core Dev - http://www.decaldev.com
Link to this post
EndyTheUnsane 
Posts: ????
Registered: ????
Extended Info (if available)
Real Post Cnt: 0
User ID: 0
Subject: Decal and CheckColumns
Ok, I think I get it now. I'll have to play with it a bit and see if I can get it to work now. I think I was doing some things backwards from the way I should have been to get the results I want. (It wouldn't be the first time.)

Thanks Virindi happy

 

-----signature-----
Link to this post
EndyTheUnsane 
Posts: ????
Registered: ????
Extended Info (if available)
Real Post Cnt: 0
User ID: 0
Subject: Decal and CheckColumns
So far so good. I've been playing with the listbox a bit and had some minor troubles with errors coming up despite things appearing to work like they should. Figured that out, though.

I do have a couple of related questions, though. When using something from the list, there's [row][col][subval]. What's the subval and what is it used for? And my other question is,how do I sort the contents of the listbox? Before, I was adding the names to a different list, sorting that list and then assigning the values in that list into the listbox. That was a backwards way of doing it and of course would make the check column values be off.

 

-----signature-----
Link to this post
Virindi-Inquisitor 
Posts: 6,908
Registered: Nov 18, '01
Extended Info (if available)
Real Post Cnt: 6,646
User ID: 511,923
Subject: Decal and CheckColumns
Subval should be 0 except for icons. For icons, subval should be 1 and you should assign an integer portal id.

Sorting is something you have to manage yourself. If you want to move a row around, you have to manually set each row's contents or clear the list and re-add everything in a different order (if you do this, save the scrollposition first and then assign it again when you are done).

 

-----signature-----
Virindi
---
****Virindi Plugins FAQ**** http://www.virindi.net/wiki/index.php/Virindi_Plugins_FAQ
http://www.virindi.net - Virindi Tank, Follower, Integrator, Reporter, VCS5, XPHelper, Item Tool, HUDs, etc...
Decal Core Dev - http://www.decaldev.com
Link to this post
EndyTheUnsane 
Posts: ????
Registered: ????
Extended Info (if available)
Real Post Cnt: 0
User ID: 0
Subject: Decal and CheckColumns
I see. That's what I was thinking as far as the sorting, but thought I should double check in case there was an easier way I was overlooking. I'll need to spend some time on that, but I think that can wait until Christmas break which will be in about two weeks. Thanks happy

 

-----signature-----
Link to this post
Mag-nus 
Posts: ????
Registered: ????
Extended Info (if available)
Real Post Cnt: 0
User ID: 0
Subject: Decal and CheckColumns
endy, I have list and sorting examples in my code in Mag-tools.

I recommend just writing your views using VVS instead of straight decal view code, or VVS wrapped decal code.

Writing straight VVS is pretty easy, and I think its a heck of a lot easier to understand than wrapping your decal view code.

Also, when it comes to lists there are a few gotchas when you wrap decal view code using VVS interfaces. I don't recall exactly what they were though. sad

 

-----signature-----
Link to this post
EndyTheUnsane 
Posts: ????
Registered: ????
Extended Info (if available)
Real Post Cnt: 0
User ID: 0
Subject: Decal and CheckColumns
I attempted using VVS and I tried using it in a couple of different ways, but I didn't have much luck. I know that part of it is getting used to doing things in Decal in general, but also even just looking through someone else's code and understanding it. Because I wasn't having any problems with the regular Views, I decided to stick with those for a bit. However, I will give VVS another try very soon. Possibly even this weekend. Or else over Christmas break. (I will have about a month off and need stuff to do to keep me occupied.)

I didn't realize that you had your source online. I'll have to check out the sorting examples then. Thanks Mag-nus happy

 

-----signature-----
Link to this post
EndyTheUnsane 
Posts: ????
Registered: ????
Extended Info (if available)
Real Post Cnt: 0
User ID: 0
Subject: Decal and CheckColumns
I've been looking through the Object Browser and did some searching online, but I can't find anything on Luminance. I can show when XP changes, but I am looking to do the same with Luminance.

 

-----signature-----
Link to this post
Virindi-Inquisitor 
Posts: 6,908
Registered: Nov 18, '01
Extended Info (if available)
Real Post Cnt: 6,646
User ID: 511,923
Subject: Decal and CheckColumns
EndyTheUnsane posted:
I've been looking through the Object Browser and did some searching online, but I can't find anything on Luminance. I can show when XP changes, but I am looking to do the same with Luminance.


Message 0x02CF is Set Character QWORD. Here are some of the keys:

internal enum QuadValueKey
{
TotalExperience = 0x01,
UnassignedExperience = 0x02,
ItemCurrentExperience = 0x04,
ItemLevelExperienceIncrement = 0x05,
LuminancePointsCurrent = 0x06,
LuminancePointsMaximum = 0x07,
}

Virindi Reporter is open source and tracks luminance points. See: http://www.virindi.net/repos/virindi_public/trunk/VirindiReporter/VirindiReporter/XPCounting.cs

 

-----signature-----
Virindi
---
****Virindi Plugins FAQ**** http://www.virindi.net/wiki/index.php/Virindi_Plugins_FAQ
http://www.virindi.net - Virindi Tank, Follower, Integrator, Reporter, VCS5, XPHelper, Item Tool, HUDs, etc...
Decal Core Dev - http://www.decaldev.com
Link to this post
EndyTheUnsane 
Posts: ????
Registered: ????
Extended Info (if available)
Real Post Cnt: 0
User ID: 0
Subject: Decal and CheckColumns
I think that just gave me an idea of something else to play around with now too. lol Thanks, that should keep me busy for a little while. wink

Edit: I had another thought... is it possible to squelch individual AC sounds with Decal? Like when buffs are expiring and the item buffs all expire at once.

 

-----signature-----
Link to this post
EndyTheUnsane 
Posts: ????
Registered: ????
Extended Info (if available)
Real Post Cnt: 0
User ID: 0
Subject: Decal and CheckColumns
Just wanted to mention that I got VVS working. Gonna play with that some more to see if I can do it again to know that it wasn't a fluke. lol

I also got the Luminance part working. Though, I only half understand it. I'll play around some more with that too.

So thank you Virindi and Mag-nus. Your advice and examples were a huge help.

 

-----signature-----
Link to this post
EndyTheUnsane 
Posts: ????
Registered: ????
Extended Info (if available)
Real Post Cnt: 0
User ID: 0
Subject: Decal and CheckColumns
This may be a dumb question, but where is the plugin window position is stored? I can't figure it out.

 

-----signature-----
Link to this post
Mag-nus 
Posts: ????
Registered: ????
Extended Info (if available)
Real Post Cnt: 0
User ID: 0
Subject: Decal and CheckColumns
Decal/VVS manage the plugin window positioning.

With VVS though you can create your view object:

HudView ViewR = new VirindiViewService.HudView(null, 60, 105, new ACImage(Color.Black), false);

Then, in the CharacterFilter.Login event, you can set its position:
ViewR.Location = new Point(CoreManager.Current.Actions.RegionWindow.Right - 60, CoreManager.Current.Actions.Region3D.Bottom - 110);

ViewR.Visible = true;

BTW, with this method you can place your hud ANYWHERE in the client window. I actually have a checkbox right below my aetheria and a comp hud to the bottom right of the screen right below all of my pack slots.

 

-----signature-----
Link to this post
EndyTheUnsane 
Posts: ????
Registered: ????
Extended Info (if available)
Real Post Cnt: 0
User ID: 0
Subject: Decal and CheckColumns
I think that actually helped for something that was one of the next things on my list to look at, but what if I just want to save the current position of the plugin window so that I don't have to move it every time I log in? I'm using the MetaView wrappers.

 

-----signature-----
Link to this post

Valid XHTML 1.0 Transitional Powered by PHP