ID:157873
 
Im not sure how to explain this but what i want is making an button in my game that makes a pop up of the stats.

Can someone pls explain me how to and maybe a demo would help other people too.

chaokai
Well, there's (at least) two ways you can do this:
- you need to look up browse() and make an HTML-based popup browser

- Have another window/grid element (or something similar) that is visible when you want the person to see their stats (and output the stats to that grid).

Personally I prefer the HTML browser method *shrugs*
Chaokai wrote:
Im not sure how to explain this but what i want is making an button in my game that makes a pop up of the stats.

I'm not sure if you mean stats as in an info panel, or stats as in mere statistics about a particular object on the map. Assuming you want the latter, here's what you need to do:

1) In your game's skin file, create a new window, and make it fairly small by default like maybe 300x400 or even smaller. It probably doesn't need a few features like the status bar. Add a grid control to this window, plus any labels you might want for a picture or name or whatnot.

2) When clicking the button or using the verb, whichever, use winclone() to create a copy that will just be used for one object (you can skip this if you use the same window for everything). You may want to call winexists() first to tell if you even need to do this part.

3) Fill in the controls. Send pictures, text, etc. to any labels, and fill in the grid with appropriate info. If the number of rows/columns on the grid could have changed, be sure to clear out any that you're not using; you can do that with a simple change to the cells parameter.

4) Call winshow() to pop up the window. It's possible that it's already showing, in which case it's already updated.

Lummox JR
In response to Lummox JR (#2)
Thank you very much it helped me out it was just the small think i needed to know.

Chaokai