Save-Point
Need help with my menu - Current issue is item grid layout - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Games Development (https://www.save-point.org/forum-4.html)
+--- Forum: Code Support (https://www.save-point.org/forum-20.html)
+--- Thread: Need help with my menu - Current issue is item grid layout (/thread-7322.html)

Pages: 1 2 3 4 5


RE: Need help with my menu - Current issue is item grid layout - LilyFrog - 09-17-2018

Embarrassing myself by posting something in the wrong place. That might be worse.

Yeah, I think that's gonna be just fine. I'm planning to use the inventory for puzzles exclusively, so it's unlikely that the number of items in the inventory will ever exceed that number.

So I'm trying to make a window that pops up over the menu screen when you hit the use button on an item in the inventory, and shows a bigger picture of the item and a detailed description (which would be longer than would fit in the help window). I'm pretty sure I can put the window together and probably figure out how to swap out the picture and text with what I know now.

My issue at the moment is that, since I want it to open over the menu, I don't think I can use common events to summon the window. But I can't seem to find what I could use in script form to detect what to display in the window based on which item was selected. 
I assume it'd have to do with the item's id, but that's as far as I've gotten.
Also consuming the item via this isn't a concern for me because all the items will be set to not be consumable.


RE: Need help with my menu - Current issue is item grid layout - DerVVulfman - 09-17-2018

OH. So after selecting the item, you want another POPUP window for the item: Larger Pic, and Description... and an option to USE or CANCEL? Or is there more that needs to be with selecting the item?

And consumable... you just have to make it consumable in the item description. I don't like leaving things out that MIGHT become necessary. Winking


RE: Need help with my menu - Current issue is item grid layout - LilyFrog - 09-17-2018

It's more just to display a description, based on which item was selected. I made a really terrible mock up in an image editing program because I'm still working on putting the window itself together. Layout of the window is also not finalized. Every graphical aspect of this is terrible and will absolutely be changed later. I can assure you no actual items will have pictures I randomly pulled from google images.

[Image: IiK61vu.png]
I don't know if a "Use" option is really necessary, but I'm not against the idea in the event that I can use that for puzzles somehow.


RE: Need help with my menu - Current issue is item grid layout - kyonides - 09-17-2018

In the scene script update method or a method being called from that update method, you enter...

Code:
 def my_new_update_related_method
   if Input.trigger?(Input::B)
   $game_system.se_play($data_system.buzzer_se)
   # any additional code you might need here
 elsif Input.trigger?(Input::C)
   $game_system.se_play($data_system.decision_se)
   # any additional code you might need here
 end
end

That's what will allow you to add the USE or OK and the CANCEL button features in any scene script.


RE: Need help with my menu - Current issue is item grid layout - DerVVulfman - 09-18-2018

It's not all she wants.  She wants a popup window to appear upon clicking one of the inventory items.  This popup window displaying the vital information about the item along with a nicely rendered image.

Fortunately, I wrote a script entitled [Thread6157]]DerVV's Simple Popup System[/Thread] which took all of 5 minutes to add to the latest update (and more to just make this post... hahaha).  Yep, check the attachment.   Nothing special in the popup window, just showing "Hi There"... for now.

I'll clean it up late and give you a proper config for 'ALL' of this rather than having to go from script to script to edit what you want.


RE: Need help with my menu - Current issue is item grid layout - LilyFrog - 09-18-2018

Oh my gosh, thank you. I actually lost what little I'd put together last night due to a combination of my own stupidity and my computer crashing, so this is a massive relief. Also it actually functions, unlike whatever mess I was making.

So I still am not completely sure how to make it detect which item it is that's being selected. I can't seem to find anything that would work in that way, but I'm also inclined to believe it's probably way more obvious than it seems.

I also assume I'm probably going to want to store the data to be displayed in a separate script, else the Scene_Menu script become extremely cluttered.


RE: Need help with my menu - Current issue is item grid layout - DerVVulfman - 09-18-2018

I have no idea how you are selecting the item other than by cursor key whilst within the menu. More information on how you ARE selecting the item would be appreciated.

And YEP... I was thinking the same about the items list, a separate script/module


RE: Need help with my menu - Current issue is item grid layout - LilyFrog - 09-18-2018

Oh, no, I mean when you select an item with the usual key, how would I make the script be able to tell which item it is?


RE: Need help with my menu - Current issue is item grid layout - DerVVulfman - 09-18-2018

Laughing You mean.....

When you move the cursor up/down/left/right on the Item Grid and then press... ENTER. How does it then figure out what item it is?

Items have Item IDs, signifying what it is. Rather than passing the Item ID into the window, I just pushed a bit of text.

To have it show the item, some changes do need to be made to the Popup window code itself. And call me a completeist, but I do plan on allowing you to distinguish from regular items, armor and weapons in the list. It's no bother.... rather easy actually. Heck, I could have the screen show QUANTITY and stuff if you need.

Now... do you actually USE the item while the Popup window is open? If so, it could be as simple as hitting SELECT and ESC as usual.


RE: Need help with my menu - Current issue is item grid layout - LilyFrog - 09-18-2018

Oh, are you adding to it? I'm sorry if that's a silly question; I'm recovering from a migraine at the moment and it makes me a even easier to confuse, and I don't like to assume. I can try to work on something else in the meantime if so. (Most things seem to be too advanced for me to understand so far, anyway... migraine or no.)

I know about item IDs, to an extent, as I've been playing around with some different scripts (such as journal ones) trying to figure out how things works. I'm just not sure what kind of things I need to plug in to have it display something based on what the item's ID is.