once again i hit a titanium reinforced brick wall
im haveing troble with the code, I am trying to make it so I have multible feilds where the user can enter data (mostly strings) and you select the feild by clicking on them just like in any windows app, or like the box im typeing in now in the forum. the data in each feild needs to be in its own varible ofcorse. however the problem is the text wont show unless i hold down the mouse button, and the information is being stored in the same varible.
heres my code (i took out the non-related stuff to avoid confusion):
global page
GLOBAL PLAYNAME$
GLOBAL CHARNAME$
REM ** MAIN PROGRAM **
SYNC ON
SYNC RATE 0
DIM gmessage$(0)
CLS
DO
GOSUB PAGECHECK
SYNC
LOOP
END
PAGECHECK:
IF PAGE=7 THEN PASTE IMAGE 7, 0, 0
IF PAGE=1 THEN PASTE IMAGE 1, 0, 0 : pageone()
IF PAGE=2 THEN PASTE IMAGE 2, 0, 0
IF PAGE=3 THEN PASTE IMAGE 3, 0, 0
IF PAGE=4 THEN PASTE IMAGE 4, 0, 0
IF PAGE=5 THEN PASTE IMAGE 5, 0, 0
IF PAGE=6 THEN PASTE IMAGE 6, 0, 0
RETURN
function pageone()
TEXTFEILD(PLAYNAME$,184,145,616,164)
TEXTFEILD(CHARNAME$,184,215,616,234)
endfunction
FUNCTION TEXTFEILD(Z$,X1,Y1,X2,Y2)
Z$=RealTimeInput()
IF ZONECLICKED(X1,Y1,X2,Y2)=1 THEN TEXT X1, Y1, Z$ + "|"
ENDFUNCTION
FUNCTION RealTimeInput()
IF KEYSTATE(14)
IF backspaceflag = 0
IF LEN(text$) > 0 THEN text$ = LEFT$(text$,(LEN(text$)-1))
backspaceflag = 1
ENDIF
ELSE
backspaceflag = 0
IF RETURNKEY()
IF returnflag = 0
text$ = ""
SendMessage(returntext$)
returnflag = 1
ENDIF
ELSE
returnflag = 0
oldkey$ = newkey$
newkey$ = INKEY$()
IF newkey$ <> oldkey$ AND ASC(newkey$) > 31 THEN text$ = text$ + newkey$
returntext$ = text$
ENDIF
ENDIF
ENDFUNCTION returntext$
function zoneclicked(x1,y1,x2,y2)
if mousex()>x1 and mousex()<x2
if mousey()>y1 and mousey()<y2
if mouseclick()=1
exitfunction 1
endif
endif
endif
endfunction 0
FUNCTION SendMessage(message$)
REM Your 'send' code goes here. If you are running a multiplayer game, you
REM can send the message to the other computer. If this is a single player
REM game, you can store the message in a global variable to do with as
REM you please in your main code. Here, we are doing the latter.
gmessage$ = message$
ENDFUNCTION
If you want to see the entire code, just ask
I am god, now bow before me you stupid peasants
I accept no responsibility for any thing I say while... well..... ever