Jump to content


Photo

Theo's Picture Chooser BBInterface Tutorial


  • Please log in to reply
1 reply to this topic

#1 pitkon

pitkon

    Administrator

  • Head Administrator
  • 1,210 posts
  • LocationAthens & Nafplio, Greece

Posted 03 February 2014 - 07:35 AM

This is Theo's picture chooser tutorial for bbinterface, published a long time ago. The script, however, is as fresh as yesterday. Kudos to Theo for some dedicated work on Blackbox for Windows and, hopefully, an interview with him will follow soon...

 

Picture chooser...

This is my first BBInterface tutorial. I try to show how to make a part of my own BBInterface configuration. I try to explain how to make something like a picture chooser. It should look something like this:

Attached File  theo1.PNG   122.92KB   2 downloads

so if you press the <<< or the >>> button the picture changes to the previous or the next one.

  • at first create the images you want to use:

    Attached File  theo2.PNG   84.88KB   0 downloads

    and name them picture1.bmp, picture2.bmp and picture3.bmp, and the control images:

    Attached File  theo3.PNG   1.54KB   0 downloads

    with names buttonprev.bmp and buttonnext.bmp.
     
  • now create a BBInterface frame, one label and two buttons.

    Attached File  theo4.PNG   15.49KB   0 downloads

    call the label Picture and the two buttons PrevPicture and NextPicture
     
  • load the pictures into the interface so it looks something like this:

    Attached File  theo5.PNG   39.28KB   0 downloads

    the script should look like this
    @BBInterface Plugin SetPluginProperty ZeroControlsAllowed false@BBInterface Plugin SetPluginProperty SuppressErrors true@BBInterface Control Create Frame Frame1@BBInterface Control SetWindowProperty Frame1 X 645@BBInterface Control SetWindowProperty Frame1 Y 51@BBInterface Control SetWindowProperty Frame1 Width 203@BBInterface Control SetWindowProperty Frame1 Height 279@BBInterface Control SetWindowProperty Frame1 Transparency 100@BBInterface Control SetWindowProperty Frame1 IsToggledWithPlugins true@BBInterface Control SetWindowProperty Frame1 IsOnAllWorkspaces true@BBInterface Control SetWindowProperty Frame1 IsVisible true@BBInterface Control SetWindowProperty Frame1 IsTransparent true@BBInterface Control SetWindowProperty Frame1 IsOnTop true@BBInterface Control SetWindowProperty Frame1 IsSnappy true@BBInterface Control SetControlProperty Frame1 HAlign "Center"@BBInterface Control SetControlProperty Frame1 VAlign "Top"@BBInterface Control SetControlProperty Frame1 Style "Toolbar"@BBInterface Control SetControlProperty Frame1 HasTitleBar false@BBInterface Control CreateChild Frame1 Label Picture@BBInterface Control SetWindowProperty Picture X 5@BBInterface Control SetWindowProperty Picture Y 5@BBInterface Control SetWindowProperty Picture Width 193@BBInterface Control SetWindowProperty Picture Height 233@BBInterface Control SetControlProperty Picture HAlign "Center"@BBInterface Control SetControlProperty Picture VAlign "Center"@BBInterface Control SetControlProperty Picture Style "Toolbar"@BBInterface Control SetAgent Picture Image Bitmap "picture1.bmp"@BBInterface Control CreateChild Frame1 Button PrevPicture@BBInterface Control SetWindowProperty PrevPicture X 4@BBInterface Control SetWindowProperty PrevPicture Y 240@BBInterface Control SetWindowProperty PrevPicture Width 93@BBInterface Control SetWindowProperty PrevPicture Height 35@BBInterface Control SetAgent PrevPicture Image Bitmap "buttonprev.bmp"@BBInterface Control CreateChild Frame1 Button NextPicture@BBInterface Control SetWindowProperty NextPicture X 99@BBInterface Control SetWindowProperty NextPicture Y 240@BBInterface Control SetWindowProperty NextPicture Width 99@BBInterface Control SetWindowProperty NextPicture Height 34@BBInterface Control SetAgent NextPicture Image Bitmap "buttonnext.bmp"
  • now all we have to do is add functions to the buttons...
    First we have to load the BroamRelay plugin because there is more then one thing to do on a press of a button.
     
  • Create a txt file for every image you want to use. The files should look like this:

    picture1.txt

    @BBInterface Control SetAgent Picture Image Bitmap "picture1.bmp"@BBInterface Control SetAgent PrevPicture MouseDown Bro@m "@BroamRelay c:BBLeanpluginsBroamRelaypicture3.txt""@BBInterface Control SetAgent NextPicture MouseDown Bro@m "@BroamRelay c:BBLeanpluginsBroamRelaypicture2.txt""
    picture2.txt

    @BBInterface Control SetAgent Picture Image Bitmap "picture2.bmp"@BBInterface Control SetAgent PrevPicture MouseDown Bro@m "@BroamRelay c:BBLeanpluginsBroamRelaypicture1.txt""@BBInterface Control SetAgent NextPicture MouseDown Bro@m "@BroamRelay c:BBLeanpluginsBroamRelaypicture3.txt""
    picture3.txt

    @BBInterface Control SetAgent Picture Image Bitmap "picture3.bmp"@BBInterface Control SetAgent PrevPicture MouseDown Bro@m "@BroamRelay c:BBLeanpluginsBroamRelaypicture2.txt""@BBInterface Control SetAgent NextPicture MouseDown Bro@m "@BroamRelay c:BBLeanpluginsBroamRelaypicture1.txt""
    c:BBLeanpluginsBroamRelay is the path where you have this txt file stored.
     
  • Each of this files has 3 bro@ms, the first changes the image, and the other two change the button settings. In the first one you specifie which image you want for example picture2 and then in the other two you set the file of the previous image picture1.txt and the next image picture3.txt
     
  • now just add one of the button setting for example
    @BBInterface Control SetAgent NextPicture MouseDown Bro@m "@BroamRelay c:BBLeanpluginsBroamRelaypicture1.txt""
    to your BBinterface.rc file, reload it and pusth the button (so it loads the other settings)
     
  • And thats all folks :-)
     
  • This is a listing of the final BBInterface file when picture1 is selected:

    @BBInterface Plugin SetPluginProperty ZeroControlsAllowed false@BBInterface Plugin SetPluginProperty SuppressErrors true@BBInterface Control Create Frame Frame1@BBInterface Control SetWindowProperty Frame1 X 645@BBInterface Control SetWindowProperty Frame1 Y 51@BBInterface Control SetWindowProperty Frame1 Width 203@BBInterface Control SetWindowProperty Frame1 Height 279@BBInterface Control SetWindowProperty Frame1 Transparency 100@BBInterface Control SetWindowProperty Frame1 IsToggledWithPlugins true@BBInterface Control SetWindowProperty Frame1 IsOnAllWorkspaces true@BBInterface Control SetWindowProperty Frame1 IsVisible true@BBInterface Control SetWindowProperty Frame1 IsTransparent true@BBInterface Control SetWindowProperty Frame1 IsOnTop true@BBInterface Control SetWindowProperty Frame1 IsSnappy true@BBInterface Control SetControlProperty Frame1 HAlign "Center"@BBInterface Control SetControlProperty Frame1 VAlign "Top"@BBInterface Control SetControlProperty Frame1 Style "Toolbar"@BBInterface Control SetControlProperty Frame1 HasTitleBar false@BBInterface Control CreateChild Frame1 Label Picture@BBInterface Control SetWindowProperty Picture X 5@BBInterface Control SetWindowProperty Picture Y 5@BBInterface Control SetWindowProperty Picture Width 193@BBInterface Control SetWindowProperty Picture Height 233@BBInterface Control SetControlProperty Picture HAlign "Center"@BBInterface Control SetControlProperty Picture VAlign "Center"@BBInterface Control SetControlProperty Picture Style "Toolbar"@BBInterface Control SetAgent Picture Image Bitmap "picture1.bmp"@BBInterface Control CreateChild Frame1 Button PrevPicture@BBInterface Control SetWindowProperty PrevPicture X 4@BBInterface Control SetWindowProperty PrevPicture Y 240@BBInterface Control SetWindowProperty PrevPicture Width 93@BBInterface Control SetWindowProperty PrevPicture Height 35@BBInterface Control SetAgent PrevPicture Image Bitmap "buttonprev.bmp"@BBInterface Control SetAgent PrevPicture MouseDown Bro@m "@BroamRelay c:BBLeanpluginsBroamRelaypicture3.txt"@BBInterface Control CreateChild Frame1 Button NextPicture@BBInterface Control SetWindowProperty NextPicture X 99@BBInterface Control SetWindowProperty NextPicture Y 240@BBInterface Control SetWindowProperty NextPicture Width 99@BBInterface Control SetWindowProperty NextPicture Height 34@BBInterface Control SetAgent NextPicture Image Bitmap "buttonnext.bmp"@BBInterface Control SetAgent NextPicture MouseDown Bro@m "@BroamRelay c:BBLeanpluginsBroamRelaypicture2.txt"
  • If you have some comments, want to ask something or improvement to this tutorial please write me at theo.devil@gmx.net
  • Images and content Copiright 2004 by Miroslav Petrasko [Theo]

  • meanmechanics likes this

#2 Mew

Mew

    Member

  • Members
  • PipPip
  • 20 posts

Posted 08 February 2014 - 08:27 PM

3complicated5me

I'll stick to my stupid plain background XD






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users