BBC BASIC
« Button Suite BBCSDL:program generator with sample »

Welcome Guest. Please Login or Register.
Dec 12th, 2017, 1:03pm


Cross-platform BBC BASIC (Win32, Linux x86, Android, Mac OS-X, Raspberry Pi)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Button Suite BBCSDL:program generator with sample  (Read 87 times)
michael
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 125
xx Button Suite BBCSDL:program generator with sample
« Thread started on: Oct 29th, 2017, 10:42pm »

BBC4W version:
If you prefer you can download the merged BUTTON SUITE:

https://1drv.ms/u/s!AmYwmTjbmULXlzsKdSzcwX6MzeHc

and the output file for BBC4W is "TEMP.bbc" instead of "TEMP.txt"


OR


FOR BBCSDL:
These programs need to be put in @usr$ directory in BBCSDL folder:

BUTTON SUITE SDL VERSION.bbc
RETROLIB core.bbc

The output file for BBCSDL is @usr$+"TEMP.txt"
( change it to @usr$+"TEMP.bas" to make it easier to find)

Here is a generated program that was created using "BUTTON SUITE.bbc". Keep in mind that the buttons within BUTTON SUITE were created using this tool,(before the program generator was added")

Later on I will improve the generator so it creates an entire functional button for each creation so its ready to copy and paste within your program. (more compact and interactive with mouse)
**********************************************
This program requires RETROLIB core.bbc included in this link:

https://1drv.ms/f/s!AmYwmTjbmULXlzraoTxb0O96gJ47

**********************************************
The x% and y% variables make it easier to add the construct to a DEF FN buttonname(x%,y%) (which I wlll create)

NOTE:"RETROLIB core" has a text reference file if you want to use its powerful toys.

THE PUMPKIN BUTTON: (works on BBCSDL )

(BBC4W version has INSTALL"RETROLIB core.bbc" instead of INSTALL@usr$+"RETROLIB core.bbc"


NOTE: THE NEXT EXAMPLES ARE BBCSDL ONLY

BBC4W: To make work on BBC4W remove @usr$ and make sure you are in the same directory as "RETROLIB core.bbc"
Code:
     
 REM IMPORTANT "RETROLIB core.bbc" must be loaded into BBCSDL and saved in @usr$ directory !!!


INSTALL@usr$+"RETROLIB core.bbc"
      PROCgraphics(500,500):LET x%=100:LET y%=100:PROCsbox(x%,y%,x%+50,y%+50,"0"):GCOL 15
      ELLIPSE x%+26,y%+23,18,17
      LINE x%+23,y%+44,x%+24,y%+40
      LINE x%+23,y%+44,x%+28,y%+44
      LINE x%+29,y%+39,x%+28,y%+44
      LINE x%+29,y%+39,x%+28,y%+44
      LINE x%+15,y%+26,x%+20,y%+33
      LINE x%+15,y%+26,x%+21,y%+26
      LINE x%+20,y%+33,x%+21,y%+26
      LINE x%+29,y%+33,x%+28,y%+26
      LINE x%+29,y%+33,x%+35,y%+26
      LINE x%+30,y%+26,x%+35,y%+26
      LINE x%+26,y%+16,x%+15,y%+20
      LINE x%+26,y%+16,x%+37,y%+20
      LINE x%+38,y%+20,x%+29,y%+13
      LINE x%+23,y%+13,x%+29,y%+13
      LINE x%+23,y%+13,x%+29,y%+13
      LINE x%+23,y%+13,x%+15,y%+21
      MOVE 0,0:END
 


And another sample
Code:
 
 INSTALL@usr$+"RETROLIB core.bbc"
      PROCgraphics(500,500):LET x%=100:LET y%=100:PROCsbox(x%,y%,x%+50,y%+50,"0"):GCOL 15
  
      COLOUR 0,210,152,022:GCOL 0
      ELLIPSE x%+26,y%+22,20,17
      ELLIPSE x%+21,y%+27,4,5
      ELLIPSE x%+32,y%+27,4,5
      LINE x%+19,y%+18,x%+32,y%+18
      MOVE 0,0:END
 


Another cool button that looks like a % in a box:

Code:
      INSTALL@usr$+"RETROLIB core.bbc"
      PROCgraphics(500,500):LET x%=100:LET y%=100:PROCsbox(x%,y%,x%+50,y%+50,"0"):GCOL 15
      COLOUR 0,098,184,180:GCOL 0
      LINE x%+1,y%+1,x%+44,y%+44
      ELLIPSE x%+13,y%+33,8,8
      ELLIPSE x%+36,y%+13,8,8
      MOVE 0,0:END
 


A button that resembles dice:

Code:
      INSTALL@usr$+"RETROLIB core.bbc"
      PROCgraphics(500,500):LET x%=100:LET y%=100:PROCsbox(x%,y%,x%+50,y%+50,"0"):GCOL 15
      COLOUR 0,100,136,202:GCOL 0
      ELLIPSE x%+13,y%+12,6,5
      ELLIPSE x%+37,y%+13,6,5
      ELLIPSE x%+37,y%+33,6,5
      ELLIPSE x%+13,y%+33,6,5
      MOVE 0,0:END
 

« Last Edit: Oct 30th, 2017, 6:03pm by michael » User IP Logged

I like reinventing the wheel, but for now I will work on tools for D3D
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Donate $6.99 for 50,000 Ad-Free Pageviews!


This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls