ID:1626585
 
(See the best response by GhostAnime.)
I want to make a pop-up that shows variables. However that goes against the point of the browse proc as it only shows constants (so you wouldn't need to put variables in the first place). Is browse the only way to create a window pop-up or is there some way to create a pop-up that can show changing vars? Not changing as it'll update real-time but when you open the pop-up it'll be up to date with current variables.
Best response
It is possible to show dynamic values of a variable in browse() - except that the value is "frozen" until you update the HTML (by reloading the HTML in the browser or having a javascript to update the variable).

The way I do it in my HTML edit system (/shameless plug) is that all the variables of the objects are loaded when something is edited and I have a link which calls an update javascript to reload the variable values (rather, the entire HTML) when needed.

Weapon
var/atkboost = 0
New() // On creation
atkboost = rand(1,9) // Randomly set the attack boost stat
..()

verb/Weapon_Info()
set src in usr
html = {"<h3>[src.name]</h3><hr>
<table>
<tr><td>+ Attack Boost</td><td>
[src.atkboost]</td></tr>
</table>"}


browse(html, "other options")


Every time the Weapon_Info is called, the HTML is generated then with the current atkboost variable.

It will appear like this:

[Weapon Name]
--------------------
+ Attack Boost 4

(assuming 4 was picked from the rand())
I actually use your HTML edit system and its really, really useful. Thanks for the help.
No problem, I hope that helped :)

As a note, I will be updating that library soon. Some fixes includes more flexibility in disable or hiding variables and, what I am currently working on, is the editing of variables in /list.