Creations Favorites Medals Posts ID:273977
ID:273977

Basically upon Clicking on a grid cell i want the BioWindow to display for the player's Cell that was clicked.

 //Displays and Updates Gridmob/proc Update_Who() src << output("
Key","Grid:1,1") src << output("
Time Online","Grid:2,1") var/Row = 1 for(var/mob/M in Online_Players) Row++ src << output("
[M.key]","Grid:1,[Row]") src << output("
[M.hours]:[M.minutes].[M.seconds]","Grid:2,[Row]") winset(src,"Main.Grid","cells=2x[Row]") 

As you can see it will display the Key, then Time the players been online. However upon clicking on the row that key or time are in, i want it to have the BioWindow popup. I have the biowindow configured and everything the only problem i cant figure out is how to have the row's Click() Function minipulated or if that's even posible? Any help would be appreciated.
 #1 Nov 2 2011, 9:02 am Bump
I would rather use Topic, like this;

 //Displays and Updates Gridmob/proc Update_Who() src << output("
Key","Grid:1,1") src << output("
Time Online","Grid:2,1") var/Row = 1 for(var/mob/M in Online_Players) Row++ src << output("
[M.key]","Grid:1,[Row]") src << output("
[M.hours]:[M.minutes].[M.seconds]","Grid:2,[Row]") winset(src,"Main.Grid","cells=2x[Row]")mob/Topic(href,href_list[]) switch(href_list["action"]) if("w_key") for(var/mob/M in Online_Players) if(!M.client)continue if(M.key <> href_list["w_key"] || M.name <> href_list["w_name"]) continue else {src.DisplayBio(M); return}mob/proc DisplayBio(var/mob/Person) winset(src,"BioWindow","is-visible=true") src << output(null,"BioWindow.BioLabel") src << output("[Person.Bio]","BioWindow.BioLabel") src << output(null,"BioWindow.NameLabel") src << output("[Person.key]","BioWindow.NameLabel") 

Edited(Again): It must work now, it was my fault since I missed the \ref before [M] when calling Topic().
So that's why it was throwing an error, since D-Cire was a text string instead of a reference to an atom.
 #3 Nov 2 2011, 9:31 am The thing that gets clicked is the atom (or your case, mob) that's in the grid. Plain text won't be clickable. So what you'd want to do is make an obj of some kind that displays the text you want (use http://www.byond.com/ members/?command=reference&path=atom%2Fvar%2Fname name to do this) and no icon. The text should be clickable, calling the obj's Click() method. You will get extra info via: http://www.byond.com/ members/?command=reference&path=atom%2Fproc%2FClick Make sure show-names is true on the grid, also.
 #4 Nov 2 2011, 3:29 pm In response to Neo Rapes Everything (#2) I get this error: runtime error: Cannot read "D-Cire".Bio proc name: DisplayBio (/mob/proc/DisplayBio) usr: D-Cire (/mob) src: D-Cire (/mob) call stack: D-Cire (/mob): DisplayBio("D-Cire") D-Cire (/mob): Topic("src=\[0x3000000]&action=w_key&...", /list (/list)) How would i make it read for D-Cire.Bio and not "D-Cire".Bio?, Basically how would i get it out of string format?
 #5 Nov 2 2011, 3:47 pm In response to D-Cire (#4) Could I get a Code Snippet of the DisplayBio proc, as well as your Topic?
 #6 Nov 2 2011, 4:56 pm In response to D-Cire (#4) Have you tried text2path("D-Cire")?