VaultNetwork.netVault Network Boards
Author Topic: Decal and CheckColumns [Locked]
EndyTheUnsane  1 star
Posts: 51
Registered:
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.
Virindi-Inquisitor  4 stars
Posts: 1,538
Registered: 2001-11-18 22:25:54
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
EndyTheUnsane  1 star
Posts: 51
Registered:
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
EndyTheUnsane  1 star
Posts: 51
Registered:
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.
Virindi-Inquisitor  4 stars
Posts: 1,538
Registered: 2001-11-18 22:25:54
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
EndyTheUnsane  1 star
Posts: 51
Registered:
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
Mag-nus  1 star
Posts: 234
Registered:
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.
EndyTheUnsane  1 star
Posts: 51
Registered:
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
EndyTheUnsane  1 star
Posts: 51
Registered:
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.
Virindi-Inquisitor  4 stars
Posts: 1,538
Registered: 2001-11-18 22:25:54
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

VaultNetwork.net is an independently operated community forum and is not affiliated with, endorsed by, or technically based on IGN, GameSpy, FilePlanet, GameStats, or the former IGN/GameSpy Vault Network.
References to VaultNetwork.net mean this site/domain. VNBoards-style presentation is a visual homage only. By using this site, you agree to the forum rules.