Thread Rating:
- 0 Votes - 0 Average
- 1
- 2
- 3
- 4
- 5
More Dialog Help =\
|
Author |
Message |
RanXerox 
Master
 
Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19
![]()
|
RE: More Dialog Help =\
Quote:1. I need to know how to record text from a text input box I didn't see anything on the wiki or could find any examples.
Here is a example of radio buttons and text entry from my Hold'em Poker script. In the DIALOG itself:
Code:
//Bottom Left Menu
resizepic 100 355 2620 200 110
Group 0
radio 105 362 1896 1895 <QVAL <LOCAL.YourDecision>==<DEF.PokerDecisionCheck> ? 1:0> <DEF.PokerDecisionCheck>
dtext 125 362 1153 Check
radio 160 362 1896 1895 <QVAL <LOCAL.YourDecision>==<DEF.PokerDecisionFold> ? 1:0> <DEF.PokerDecisionFold>
dtext 180 362 1153 Fold
radio 205 362 1896 1895 <QVAL <LOCAL.YourDecision>==<DEF.PokerDecisionCheckFold> ? 1:0> <DEF.PokerDecisionCheckFold>
dtext 225 362 1153 Check/Fold
radio 105 377 1896 1895 <QVAL <LOCAL.YourDecision>==<DEF.PokerDecisionCall> ? 1:0> <DEF.PokerDecisionCall>
dtext 125 377 1153 Call: <EVAL <REF1.TAG.CurrentBet>-<LOCAL.YourBet>>
radio 105 392 1896 1895 <QVAL <LOCAL.YourDecision>==<DEF.PokerDecisionRaiseBlind> ? 1:0> <DEF.PokerDecisionRaiseBlind>
dtext 125 392 1153 Blind Raise: <dDEF.PokerBigBlind>
radio 105 407 1896 1895 <QVAL <LOCAL.YourDecision>==<DEF.PokerDecisionRaisePot> ? 1:0> <DEF.PokerDecisionRaisePot>
dtext 125 407 1153 Pot Raise: <dREF1.TAG.CurrentPot>
radio 105 422 1896 1895 <QVAL <LOCAL.YourDecision>==<DEF.PokerDecisionRaiseCustom> ? 1:0> <DEF.PokerDecisionRaiseCustom>
dtext 125 422 1153 Custom
dtext 125 437 1153 Raise:
resizepic 173 424 2620 89 32
button 270 430 2714 2715 1 0 5 //Decision
dtextentrylimited 205 430 80 23 1153 3 6 <EVAL <SRC.CTAG0.Poker_NextBet>>
Then in the DIALOG BUTTON:
Code:
OnButton=5//Make decision
REF1=<SRC.TAG.PokerTable>
IF (<ARGCHKID> > 0)
SRC.CTAG.Poker_Decision=<ARGCHKID>
IF (<SRC.CTAG.Poker_Decision>==<DEF.PokerDecisionCall>)
SRC.CTAG.Poker_NextBet=<EVAL <REF1.TAG0.CurrentBet>>
ELSEIF (<SRC.CTAG.Poker_Decision>==<DEF.PokerDecisionRaiseBlind>)
SRC.CTAG.Poker_NextBet=<EVAL <DEF.PokerBigBlind>>
ELSEIF (<SRC.CTAG.Poker_Decision>==<DEF.PokerDecisionRaisePot>)
SRC.CTAG.Poker_NextBet=<EVAL <REF1.TAG0.CurrentPot>>
ELSEIF (<SRC.CTAG.Poker_Decision>==<DEF.PokerDecisionRaiseAllIn>)
SRC.CTAG.Poker_NextBet=<EVAL <REF1.TAG0.Player<dLOCAL.YourSeat>.Chips>>
ELSEIF (<SRC.CTAG.Poker_Decision>==<DEF.PokerDecisionRaiseCustom>)
IF !(STRMATCH(*[0-9]*,<ARGTXT[3]>))
SRC.CTAG.Poker_Decision=
SRC.CTAG.Poker_NextBet=
ELSE
SRC.CTAG.Poker_NextBet=<EVAL <ARGTXT[3]>>
IF (<EVAL <SRC.CTAG0.Poker_NextBet>> < <EVAL <DEF.PokerBigBlind>>)
SRC.CTAG.Poker_NextBet=<EVAL <DEF.PokerBigBlind>>
ELSEIF (<EVAL <SRC.CTAG.Poker_NextBet>> > <EVAL <REF1.TAG0.Player<dLOCAL.YourSeat>.Chips>>)
SRC.CTAG.Poker_NextBet=<EVAL <REF1.TAG0.Player<dLOCAL.YourSeat>.Chips>>
ENDIF
ENDIF
ENDIF
ELSE
SRC.CTAG.Poker_Decision=
SRC.CTAG.Poker_NextBet=
ENDIF
SDIALOG d_poker_pokertable
RETURN 1
I store the decision (i.e. the particular radio button that was last used) and the value of the custom bet (i.e. the "text entry") as CTAGs on the player. That way the dialog can be refreshed without losing the choices/values.
|
|
04-30-2012 08:29 AM |
|
|
Messages In This Thread |
RE: More Dialog Help =\ - RanXerox - 04-30-2012 08:29 AM
|
User(s) browsing this thread: 1 Guest(s)