Gumps and GF_SCRIPT_BTN

Archive of the older Feature Request Forum Posts

Moderator: POL Developer

Locked
mr bubbles
Grandmaster Poster
Posts: 120
Joined: Thu Jan 18, 2007 2:34 am

Gumps and GF_SCRIPT_BTN

Post by mr bubbles » Wed Apr 11, 2007 3:36 am

I know its limited to what you guys can do concerning gumps as it's mostly client side. I don't suppose it would be possible to add something like GF_SCRIPT_BTN to start a selected script without closing the gump.

Barbeirosa

Post by Barbeirosa » Wed Apr 11, 2007 4:29 am

Ummm... do you know how gumps work?

Just put a button on it that causes a script to be started, and reload the gump.

mr bubbles
Grandmaster Poster
Posts: 120
Joined: Thu Jan 18, 2007 2:34 am

Post by mr bubbles » Wed Apr 11, 2007 5:03 am

Noticed your a bit rude and arrogant barb, just an observation.

It's for when i don't want to reload a gump, ie im on page 10 and just want a button that takes someone to a webpage or something.

tartaros
New User
Posts: 28
Joined: Tue Mar 27, 2007 6:30 am
Contact:

Post by tartaros » Wed Apr 11, 2007 2:44 pm

all the core could do is resend the gump automatically, with textentries pre-filled with the text that was filled into them meanwhile, and not trigger the usual gump resonse scripts... other than that, you can't tell the client to not close the gump upon pressing a non-page button.

mr bubbles
Grandmaster Poster
Posts: 120
Joined: Thu Jan 18, 2007 2:34 am

Post by mr bubbles » Wed Apr 11, 2007 5:11 pm

ah ok thanks.

MuadDib
Former Developer
Posts: 1090
Joined: Sun Feb 12, 2006 9:50 pm
Location: Cross Lanes, WV

Post by MuadDib » Wed Apr 11, 2007 5:21 pm

You can however, tell the gump to not close unless a closing type button is pressed.

Outside that, you can run the gump sending in a loop, that will resnd it etc after closed.

Barbeirosa

Post by Barbeirosa » Wed Apr 11, 2007 7:20 pm

mr bubbles wrote:Noticed your a bit rude and arrogant barb, just an observation.
Some people lack tact, others lack intelligence, yet others lack beauty, and still others lack creativity. Last time I checked, no one was perfect.

Yukiko
Distro Developer
Posts: 2741
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Post by Yukiko » Wed Apr 11, 2007 11:43 pm

From gumps.html in \pol\docs

Button [x] [y] [released-id] [pressed-id] [quit] [page-id] [return-value]
...
[quit] : This parameter is only to be found in buttons. It determines whether you want to exit the gump after clicking the button or not.


and some people research and post solutions for those who need them, and do it tactfully even if not perfectly.

mr bubbles
Grandmaster Poster
Posts: 120
Joined: Thu Jan 18, 2007 2:34 am

Post by mr bubbles » Thu Apr 12, 2007 12:29 am

but without it quitting can it be set to run a function when pressed?

Yukiko
Distro Developer
Posts: 2741
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Post by Yukiko » Thu Apr 12, 2007 12:37 am

Yes because when the button is pressed the gump will return a value (return-value in the doc snippet I posted) to the script and that value can be used to trigger a script.

mr bubbles
Grandmaster Poster
Posts: 120
Joined: Thu Jan 18, 2007 2:34 am

Post by mr bubbles » Thu Apr 12, 2007 1:22 am

Im feeling very stupid. How does it know when the buttons been pressed?

I've got a button set to not quit, but i cant figure out how to check if its been pressed already.

Nothing seems to be read until the gump actually closes, what have i missed
:sad:

tartaros
New User
Posts: 28
Joined: Tue Mar 27, 2007 6:30 am
Contact:

Post by tartaros » Thu Apr 12, 2007 6:17 am

sadly, Yukiko is wrong in the assumption about the function of [quit].

Yukiko wrote:Button... [quit] [page-id] [return-value]
if the [quit] is 1 and the button is pressed, the gump is closed, and response sent to the server with the [return-value] as the pressed button id. [page-id] is unused.

if [quit] is 0 and the button is pressed, it stays on screen,m only it switches to page [page-id]. Nothing is sent to the server, [return-value] is unused.


This is how the UO client works, nothing you can do about it from the side of the server. True story.

Barbeirosa

Post by Barbeirosa » Thu Apr 12, 2007 6:39 am

Yukiko wrote:...even if not perfectly.
Emphasis mine. It's often useful to have factually correct information. I would rather get correct information from an a$$hole than get erroneous information from a sweet grandmotherly type. The latter might make me feel all warm and fuzzy inside, but the former will actually, you know - be useful.

Different strokes for different blokes, though!

mr bubbles
Grandmaster Poster
Posts: 120
Joined: Thu Jan 18, 2007 2:34 am

Post by mr bubbles » Thu Apr 12, 2007 6:56 am

Well i'd rather get accidental wrong info from someone who tries to help without making me feel crap :/

Barbeirosa

Post by Barbeirosa » Fri Apr 13, 2007 1:40 am

mr bubbles wrote:Well i'd rather get accidental wrong info from someone who tries to help without making me feel crap :/
If asking you if you know how gumps work makes you feel like crap, then you're bound to feel like crap an awful lot in life, as people ask what your prior knowledge is before diving into an explanation.

User avatar
Austin
Former Developer
Posts: 617
Joined: Wed Jan 25, 2006 2:30 am

Post by Austin » Fri Apr 13, 2007 4:14 am

Barbeirosa wrote:
mr bubbles wrote:Well i'd rather get accidental wrong info from someone who tries to help without making me feel crap :/
If asking you if you know how gumps work makes you feel like crap, then you're bound to feel like crap an awful lot in life, as people ask what your prior knowledge is before diving into an explanation.
How about this, consider yourself banned.
If that makes you feel like crap and or you need to come back with a new account and say you've been wronged or that POL is all doomed without you or.. maybe you just feel you need to teach us some lesson, maybe your accusations against other users are coming from strong introspection.

Yukiko
Distro Developer
Posts: 2741
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Post by Yukiko » Sun Apr 15, 2007 10:11 pm

Tarteros, yes sorry about that. I did check it afterwards in a script and found it to be an incorrect statement. Didn't have time to post a correction until now. The gump docs are ambiguous.

Thank you Austin!!!!

Marilla

Post by Marilla » Mon Apr 16, 2007 3:26 am

Austin wrote: How about this, consider yourself banned.
If that makes you feel like crap and or you need to come back with a new account and say you've been wronged or that POL is all doomed without you or.. maybe you just feel you need to teach us some lesson, maybe your accusations against other users are coming from strong introspection.
Sorry to disappoint you in oh-so-many ways.

First; it's an old account, not a new one. Feel free to ban this one, too, as it's probably best for everyone if I don't post here again, ever.

Second; Not sure why you would think I would believe I have been wronged. I mean, think about it; What benefit do I get from posting here, aside from venting some steam at people who couldn't care less? My time is better spent doing things important to me and those I do actually care about. You've done me a huge favor, for which I thank you sincerely.

Third; I have no clue where you get the idea that I would think POL is doomed without me. I hope none of these other earnest 'community participants' think that POL's future relies on them, either. I think Muad said it best:
I fail to remember the last time I personally, or Austin for that matter, listened to anyone period... I don't care one way, or the other. About you, or any other person who posts on this forum. If you think I might care, you are sadly mistaken.
But then again, I realized that long, long ago, back when I did care, and made a couple lame efforts around here to actually help. No one else cared, so I stopped caring, too. At that point, I should have simply realized then that being here was a waste of time, and just reverted back to lurking to download the most recent Cores and keeping up with what bugs were introduced in each new core.

It took you banning me for me to realize I need to go ahead and do that now; save myself a lot of time that I can use to devote to people who actually give a rat's ass what I do or say, and save all the nice people here the trouble of having to listen to a word I say. POL will go along its destined path perfectly fine with or without me, so the only person who has been done a favor here is me, really. So as a very rare occurrence, I agree with Yukiko:
Thank you Austin!!!!
So long... and thanks for all the fish. Please delete this account, as I can't find the link to do so myself.

Locked