ID:1177859
 
Hi, Pretty sure this fits into this category so here goes.

I have 2 questions regarding making Map-based HUDS.

Question 1. I have made an inventory using Hudgroups library, to make sure the position of the item in the inventory is saved i use a second list called "invent" below is a basic view of the code..
mob
var/list/invent[77] //77 is the amount of slots.

item/proc
get(mob/m)
//usual get stuff
for(var/a in m.invent)
if(istype(a,/item)) continue
m.invent[m.invent.Find(a)] = src

So basically is there a more effective way to do this or should i just leave it as is? i would really like to extend this into a system where players have multiple bags to extend the invent instead of a default amount. Q1 end.


Question 2. The second question is, is it possible to make a scrollable view in a map hud. i would like to make it so i have more then 77 unique items in that grid as ill be using the same area for skills and am unsure if players will exceed 77 skills (unlikely but id like to cover my bases)


Any ideas/thoughts are welcome


~Midget
Been 4 days since i asked this question on my original post and no replies? arr well guess im stuck as i am
I'm not the best one to ask since I haven't gotten to sit down and work with this kind of thing enough yet, but since you haven't gotten any replies yet I'll try to offer some information about question 2. I would answer 1, but I'm not familiar with the library and don't want to lead you in the wrong direction.

Anyways. I don't think there is any way to do a scroll bar with on-screen objects, at least not on BYOND. If there is, it's probably not worth it, because I've seen a couple games on BYOND that would need that and their way of handling it was using multiple pages.

They just added things like 1, 2, 3, or page 1, 2, 3, etc for this as far as I know. The main example I can think of right now is NEStalgia's auction system.
i actually never thought of pages tbh it never crossed my mind but as you said its prolly gonna be the best bet, i was mainly trying to make it so that they could click the objects in the HUD and use it as a skill as opposed to only having the Default skillslot ones.

but if i do the hotkey setup how i want to they shouldnt need to really click but i wanted the option to be available.. pages it is shouldnt be to hard.
--
as for question one it was more of a question on is having a secondary list the best way to go or should i add the var inside the item itself. technically both ways work out the same and would require the same amount of work. just if i have it inside the item i need to remove it from the item when i drop it (so it doesnt muddle with people picking up a dropped item from player) then adding it on get instead of how i use it now.

Ill wait to see if i get anything else, but thanks for giving me another option to look at for the page thing.
In response to Midgetbuster
Ah, I see. Well, happy to be of some help with question 2, and as for question 1 I would imagine it's mostly just a matter of preference.

I could be wrong on that, but it seems logical. I'd probably use a var attached to the item, since that's just more my style, and I'm not big on using a list that I don't have to, but if you've already got the whole list method working or its your preference then you might as well stick with it and not waste any extra time doing the same thing a different way.

That being said, though, whether that is helpful or not I still wish you luck on getting some more thoughts and opinions on it!