It is currently Sat Apr 29, 2017 4:23 am



Welcome
Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!


Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: Settings/options menu programming
Unread postPosted: Fri Apr 24, 2015 7:41 am 
Offline
User avatar

Joined: Tue Nov 04, 2014 7:12 am
Posts: 122
Hello!

Thanks for the advice so far, it was helpful!
I review all these ideas! ;)

_________________
"Unfortunately I only BASIC to understand. Everything else I need strong help..." :P


Report this post
Top
 Profile  
 
 Post subject: Re: Settings/options menu programming
Unread postPosted: Fri Apr 24, 2015 9:32 am 
Offline
User avatar

Joined: Tue Mar 05, 2013 5:19 am
Posts: 581
Location: Netherlands
Hi QBFan,

I have taken this post as a challenge. Convinced that it could be easily done.
So have a look at this simple and straightforward 'Pizza Game'. :oops:
The check mark symbols may or may not work (depending on Android version).
Change to your needs.

Code:
OptionNo$=CHR$(9633)
OptionYes$=CHR$(9638)
ARRAY.LOAD Menu$[],OptionNo$+" with onions",OptionNo$+" with cheese",OptionNo$+" with tomatoes","Order pizza","Cancel"
FOR i=1 TO 2
   Kap=0
   Options=0
   IF i=1 THEN
      PRINT "in Text mode"
      PRINT
   ELSE
      GR.OPEN 255,0,0,255,0,-1
      GR.COLOR 255,255,255,0,1
      GR.TEXT.SIZE 20
      GR.TEXT.DRAW g,10,90,"in Graphics mode"
   ENDIF
   DO
      DIALOG.SELECT Choice,Menu$[],"Your pizza menu"
      IF Choice>0 THEN
         IF Choice=1 THEN
            IF LEFT$(Menu$[1],1)=OptionNo$ THEN
               Menu$[1]=REPLACE$(Menu$[1],OptionNo$,OptionYes$)
            ELSE
               Menu$[1]=REPLACE$(Menu$[1],OptionYes$,OptionNo$)
            ENDIF
         ENDIF
         IF Choice=2 THEN
            IF LEFT$(Menu$[2],1)=OptionNo$ THEN
               Menu$[2]=REPLACE$(Menu$[2],OptionNo$,OptionYes$)
            ELSE
               Menu$[2]=REPLACE$(Menu$[2],OptionYes$,OptionNo$)
            ENDIF
         ENDIF
         IF Choice=3 THEN
            IF LEFT$(Menu$[3],1)=OptionNo$ THEN
               Menu$[3]=REPLACE$(Menu$[3],OptionNo$,OptionYes$)
            ELSE
               Menu$[3]=REPLACE$(Menu$[3],OptionYes$,OptionNo$)
            ENDIF
         ENDIF
         IF Choice=4 THEN Kap=1
         IF Choice=5 THEN Kap=1
      ENDIF
   UNTIL Kap=1
   Result$="You chose to order a pizza with"
   IF Choice=4 THEN
      IF LEFT$(Menu$[1],1)=OptionYes$ THEN
         Result$=Result$+" onions"
         Options=Options+1
      ENDIF
      IF LEFT$(Menu$[2],1)=OptionYes$ THEN
         IF Options>0 THEN Result$=Result$+" and"
         Result$=Result$+" cheese"
         Options=Options+1
      ENDIF
      IF LEFT$(Menu$[3],1)=OptionYes$ THEN
         IF Options>0 THEN Result$=Result$+" and"
         Result$=Result$+" tomatoes"
         Options=Options+1
      ENDIF
      IF Options=0 THEN
         Result$=Result$+" NOTHING !"
      ELSE
         Result$=Result$+"."
         Txt$="You selected "+INT$(Options)+" option(s)...."
         IF i=1 THEN
            PRINT Txt$
         ELSE
            GR.TEXT.DRAW g,10,20,Txt$
         ENDIF
      ENDIF
   ELSE
      Result$="So you don't like my pizza's !"
   ENDIF
   IF i=1 THEN
      PRINT Result$
   ELSE
      GR.TEXT.DRAW g,10,50,Result$
      GR.RENDER
   ENDIF
   PRINT "Wait for graphics mode..."
   PAUSE 7000
   IF i=1 THEN
      CLS
   ELSE
      CLS
      GR.CLOSE
   ENDIF
NEXT i
END "End of demo"


It runs in text mode first, then in graphics mode....
Enjoy.

Aat.

_________________
To view all my Apps in the BASIC! repository: http://laughton.com/basic/programs/Author_Index/Aat.pdf

When Sod's Law equals Murphy's Law you are bound to be on the right track....!


Report this post
Top
 Profile  
 
 Post subject: Re: Settings/options menu programming
Unread postPosted: Sat Apr 25, 2015 1:12 am 
Offline
User avatar

Joined: Mon Aug 18, 2014 1:16 pm
Posts: 1317
Nice one Aat and as gikam says we could do with a checkbox menu built into Basic, Roy


Report this post
Top
 Profile  
 
 Post subject: Re: Settings/options menu programming
Unread postPosted: Sat Apr 25, 2015 2:45 am 
Offline
User avatar

Joined: Sun Nov 23, 2014 8:15 am
Posts: 2185
Location: romania
roy wrote:
Nice one Aat and as gikam says we could do with a checkbox menu built into Basic, Roy

how?


Report this post
Top
 Profile  
 
 Post subject: Re: Settings/options menu programming
Unread postPosted: Tue Apr 28, 2015 9:16 am 
Offline
User avatar

Joined: Tue Nov 04, 2014 7:12 am
Posts: 122
Hello!

Thank you to all the creative and useful answers!
On this I can already start ... :)

_________________
"Unfortunately I only BASIC to understand. Everything else I need strong help..." :P


Report this post
Top
 Profile  
 
 Post subject: Re: Settings/options menu programming
Unread postPosted: Wed May 20, 2015 12:42 am 
Offline
User avatar

Joined: Tue Nov 04, 2014 7:12 am
Posts: 122
Hello!

I can change the color of dialog.select menu?
Or this fix white color (on graphic screen)?

Thank you.

_________________
"Unfortunately I only BASIC to understand. Everything else I need strong help..." :P


Report this post
Top
 Profile  
 
 Post subject: Re: Settings/options menu programming
Unread postPosted: Wed Jun 03, 2015 1:44 am 
Offline

Joined: Wed Oct 03, 2012 9:53 am
Posts: 2795
Location: Colorado, U.S.
It is not possible to change the color of dialog.select. Luca has asked me many times to allow changing the console color. The method for changing console color will also allow changing dialog color. But not yet.

I do not understand what you are asking about the graphic screen. Do you wan to set the graphics screen color? You you do that with the GR.Open command:
GR.Open 255,255,255,255 makes the graphics screen white.
GR.Open 255,0,0,0 makes the graphics screen black.
GR.Open 255,0,0,255 makes the graphics screen bright blue
GR.Open 255,0,0,50 makes the graphics screen dark blue

There is no command to change the background color. There should be. I am surprised no one has asked for this!

- Marc


Report this post
Top
 Profile  
 
 Post subject: Re: Settings/options menu programming
Unread postPosted: Wed Jun 03, 2015 12:19 pm 
Offline
User avatar

Joined: Tue Nov 04, 2014 7:12 am
Posts: 122
Hello!

Thank you, to the point that I can not.
(color of the dialog.select menu)

The other one that I knew.
Sorry I was not clear ... (google translator .. :) )
(rgb colors - all clear to me)

_________________
"Unfortunately I only BASIC to understand. Everything else I need strong help..." :P


Report this post
Top
 Profile  
 
 Post subject: Re: Settings/options menu programming
Unread postPosted: Wed Jun 03, 2015 5:33 pm 
Offline

Joined: Wed Jun 03, 2015 5:26 pm
Posts: 1
Can I ask you something, is there any instruction to send a file to printer, Thank you very much in advance.


Report this post
Top
 Profile  
 
 Post subject: Re: Settings/options menu programming
Unread postPosted: Mon Jun 15, 2015 12:36 am 
Offline

Joined: Wed Oct 03, 2012 9:53 am
Posts: 2795
Location: Colorado, U.S.
Hi Matrix. No, there is no printing support in BASIC!. I'll add the request to the list.

- Marc


Report this post
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2, 3  Next


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
suspicion-preferred