ID:1090345
 
Keywords: help, hud, inventory, search

Problem description:

I'm currently making a fantasy-esque game. Since crafting is a large part in this game, I obviously need an easily-accessed and organized inventory system.
My question is, how could I go about adding a "Search" box to my Inventory tab? Or better yet, how could I cause the box to pop on and off screen by pressing "I?" I have the Interface Window made for Inventory, but I have no idea what code makes that window visible on the screen. Any help would be greatly appreciated.
You can make a box pop up using a macro that calls a proc that calls winshow() or something.

You can have an input with a default command of Search() with some kind of text argument

mob
verb // Forgot that macros can only call verbs.
Search(T)
for(var/obj/O in src.contents)
if(O.ID == T)
// ...

And then use the search function to modify what's displayed in inventory.
For showing the inventory window, you'll have to give your mob a verb.
mob/verb/inventory()
set hidden = 1
var/const/window = "inventory_window_id_here"
switch(winget(src,window,"is-visible"))
if("false")
winshow(src,window) // show
// other stuff
else
winshow(src,window,0) // hide

Then, assign a macro for the I key in your skin file.
You need to use winshow() function to display the window.