Welcome, Guest |
You have to register before you can post on our site.
|
|
|
Color picker bug or just something I'm missing |
Posted by: OldMoses - 08-09-2023, 05:35 PM - Forum: Help Me!
- Replies (8)
|
|
I don't see a dialog box "Title" that I assign. It just calls it "Color". Otherwise, it works fine.
Code: (Select All) SCREEN _NEWIMAGE(1024, 512, 32)
a~& = _COLORCHOOSERDIALOG("Flood", &HFF000000)
COLOR , a~&
CLS
t~& = _COLORCHOOSERDIALOG("Word", &HFFFFFFFF)
COLOR t~&
LOCATE 10, 10
PRINT "This is your color scheme"
END
|
|
|
Charlie posting too much BAM at Retro |
Posted by: bplus - 08-05-2023, 03:07 PM - Forum: QBJS, BAM, and Other BASICs
- Replies (26)
|
|
Charlie shame on you for posting over 50% materials at Retro! (I am being totally sarcastic. Shame on them in my eyes! for criticizing you for being so prolific, my goodness most forums love you when you are so active!). And like you complained doing this publicly is pretty nasty too, just lets jokers like me see and make fun of them though.
Don't you know not to post more than Ron77? LOL this is so funny to me, but I hate how you are being treated!
|
|
|
A Perplexing Issue |
Posted by: NakedApe - 08-03-2023, 03:47 PM - Forum: Help Me!
- Replies (5)
|
|
This sub took me hours to get going because it's behaving so strangely. It's a simple routine to print out some info, but it won't work unless an INPUT statement is used at the end, not an INPUT$() or INKEY$. Even SLEEP causes the sub not to run right. My first choice is for the user just to press a single key and exit the sub, but only the input statement works right - which requires a carriage return. I don't get it. Any help will be much appreciated! See remarks below...
SUB destTable () '
SHARED destData() AS STRING
SHARED destCounter AS INTEGER
SHARED fuel AS SINGLE
DIM range AS SINGLE
DIM AS INTEGER counter, entry, entries(20) '
DIM n AS STRING
range = fuel / 35.29 ' fuel / rate of burn per light year
counter = 0
_FONT messFont: COLOR YELLOW
n = _TRIM$(MID$(STR$(range), 1, 5))
_PRINTSTRING (30, 40), "Destinations Within Present Range" + " (" + n + " Light Years)"
DO
counter = counter + 1
IF range >= VAL(destData(counter, 3)) THEN ' if range is greater than distance to destination...
entry = entry + 1
entries(entry) = counter
_FONT messFont: COLOR ORANGE
_PRINTSTRING (30, 66 + entry * 25), CHR$(64 + entry) + ") " + destData(counter, 1) '
_FONT courseFont: COLOR GREEN
_PRINTSTRING (340, 70 + entry * 25), destData(counter, 2)
_FONT courseFont: COLOR PINK
_PRINTSTRING (580, 72 + entry * 25), destData(counter, 3) + " Light Years"
END IF
LOOP UNTIL counter = 20
_FONT messFont: COLOR YELLOW
_PRINTSTRING (40, 138 + entry * 25), "Your Destination Choice is"
LOCATE 30, 344
INPUT n ' <======= !! reuse n string
' n = INPUT$(1) ' ALL THESE REMMED COMMANDS CAUSE THE ABOVE NOT TO DISPLAY TO SCREEN
' WHILE INKEY$ = "": n = INKEY$: WEND ' UNTIL *AFTER* USER PRESSES A KEY
' DO: n = INKEY$: LOOP UNTIL n <> "" ' only an INPUT statement gets the above table to print ...
' SLEEP ... otherwise program freezes w/o performing above code until key is hit, then the table appears for a sec
counter = ASC(n) - 96 ' reuse counter
destCounter = entries(counter) '
pickDest
END SUB
|
|
|
|