SphereCommunity
gump pull down menu? - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: gump pull down menu? (/Thread-gump-pull-down-menu)



gump pull down menu? - x77x - 06-08-2017 06:08 PM

is a gump drop down menu possible? if so, how? example please?

was thinking about making a blacksmith menu


RE: gump pull down menu? - Coruja - 06-09-2017 04:35 AM

UO doesn't have any packet or built-in method to do this, but it can be done using pure script code, you just need to play with "PAGE x" (0, 1, 2, ...) on dialogs. Page 0 is always used as base, and others pages > 0 are only called when you open the dialog in this specific page

Code:
[DIALOG d_something]
0,0

page 0
//this is the base page, it will always show

page 1
//1st page, it will only show if you open the dialog using "DIALOG d_something 1", or using an dialog button with args "0 1 0"

page 2
//2nd page, it will only show if you open the dialog using "DIALOG d_something 2", or using an dialog button with args "0 2 0"

on simple dialogs this is enough to switch between pages and create an drop-down menu where page 0 is the background and page 1/2/etc is the opened drop-down options to select. But if you want more advanced engines (track the page number, open the dialog again on the same page after it was closed, etc) you must also use [C]TAG on the character to store the current page number, like TAG.Dialog.d_something.Page=2

PS: I can't remember exactly, but if the dialog is opened without any page specified, sphere will open it on page 1 by default (and also page 0 as background)