Jump to content


Photo

How to build a wharf in bbInterface?


  • Please log in to reply
13 replies to this topic

#1 jschall

jschall

    Advanced Member

  • Members
  • PipPipPip
  • 47 posts

Posted 02 February 2015 - 10:04 PM

At @pitkon's suggestion, I have started learning to use bbInterface with the aim of eventually making a wharf, with tab buttons that open flyout bars, similar to ones pitkon has made as part of his elaborate themes.

 

So far, I have learned to add buttons to frames and label them with static text, and so far, it doesn't crash.

 

But I would like to know how to create bars that fly out and contain icons that launch programs.

 

Any help or links to a tutorial would be appreciated. (I have read the tutorials here.)

Attached Files



#2 crowmag

crowmag

    bbDinosaur

  • VIP Member
  • 77 posts

Posted 03 February 2015 - 06:48 AM

No doubt this is not how Pete would do it, it's less elabrate and more to the quick and dirty.

Basically it goes like this...

Create your button and make it's mouse release execute Blackbox.exe like this:

C:Blackboxblackbox.exe -exec @BBCore.ShowMenu "C:PATH_TO_A_FOLDER_FULL_OF_SHORTCUTS"

Clicking the button will immediatly show a menu filled with all the shortcuts in the folder and the menu title will be that of the folder's name.

If you have icon's turned on in menus, the menu will show icons and text - otherwise just a text menu.

BTW, you can use this same command method within a shorcut to Blackbox.exe - just edit the "target" in the shortcut after you create it. -- Place that shortcut in a bbIconBox and you'll get the same effect.

---

If you want large icons on a panel, it's a lot more work as you have to place a bunch of buttons on a frame - each with a custom icon and executing... whatever.

Once you have that you make a seperate toggle button to toggle your custom icon panel between visable and hidden states. Obviously, the toggle button can't be on the same frame your showing and hideing.

You'll need to open the bbInterface.rc in a text editor to get a better idea of what is going on...

Basicaly, one toggle state does this:

@BBInterface Control SetWindowProperty %CONTROL_NAME% IsVisible false

and the other state does this:

@BBInterface Control SetWindowProperty %CONTROL_NAME% IsVisible true

Those are bro@ms - in fact, every line in a bbInterface script is a bro@m.

In fact the menu trick above is done by Blackbox.exe executing a bro@m.

bro@m = Brodcast Message. And just about every plugin has a bro@m or two (or more) that it will respond too. Turn on "Show Bro@ms" in the Blackbox configuration and then CTRL+Right-click on a plugin and you'll see them.


  • pitkon likes this

#3 pitkon

pitkon

    Administrator

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

Posted 03 February 2015 - 07:41 AM

I am going to show you a very basic way to do one button that opens a fly-out bar, as you put it.

 

1) On any bbi element, Ctrl+Right Click. A menu pops up. Go Interface Operations/Create New Control/SwithButton. A new element, a switchbutton, is created. This one will click a drawer, or a fly-out bar, on and off.

Adjust the size to whatever by grabbing the edge of the switch button, pressing Alt and dragging. Move the switch button to wherever by Ctrl+Left Clickin on it and dragging.

Let's say that you want a drawer with Internet programs. So, let's name this switch button Web. Ctrl+Right Click on it and go Control Options/Control Name. Change switchbutton to Web. Ctrl+Right Click and go Configuration/Save Configuration. It's something you must do after every step, so you won't lose what you have done so far.

Here, you can a) add an icon to the Web sb, (b add a caption to the sw or c) do both. You can also choose which style you prefer for that button from the ones inherent to the specific style you are using.

a) Adding an icon:  Ctrl+Right click on the Web sb and go Control Options/Image. Choose between Bitmap (jpg, png, bmp) or Icon (ico). Go where the image is and open it. If you want to change the image's size or position, use Control Options/Image/Options/Scale and Control Options/Image/Options/Image Alignment.

(b Adding a caption: Ctrl+Right click on the Web sb and go Control Options/Caption/Static Text. Type Web (or whatever). You can change the position of the text (Control Options/Text Settings), the font (Window Options/Use Custom Font) or the size (Window Options/Font Size). You can also use a bold font (Window Options/Font Bold)

c) Do both the above.

Choosing a style: Ctrl+right click and go Window Options/Style. Choose a style.

Now you have the mother ship, all you need is a child element it can control - namely, the Web Drawer.

 

2) Ctri+Right click on the Web sb and go Interface Operations/Create New Control/Frame. Again, a new element is created. Repeat some of the above steps to resize (it will depend on the number of buttons you want to place in there) and move it (preferably next to the Web switch button), add an image (although it may be covered by the buttons we are going to add), name it WebDrawer, and choose a style.

Now we have to fill the drawer with buttons controlling applications. For this example I chose just three apps to work as an example -Firefox, Outlook Express and Utorrent.

Let's start with adding a Firefox button. Ctrl+Right click on the frame and go Interface Options/Create New Child Control/Button. Make sure you click on Create New CHILD Control and then Button. A new button appears within the WebDrawer frame. Again, add icon, text (let's say, Firefox), resize etc. Now, Ctrl+Right click on the Firefox button and go Control Options/Mouse Down/Run Open. Go to Firefox.exe and open it. That's it.

You could create the other two buttons the same way, but there is an easier way to do it. Ctrl+Right click on the Firefox button and go Interface Operations/Clone This Control. A Firefox twin button appears. Repeat. Two Firefox twins. Now you can change icons, text, path etc. by using some of the steps above. The nice thing about Cloning is that each new element has the same size as the original one and some other common characteristics. No need to resize again or repeat some of the tiresome procedures.

OK, so we now have a Web switch button and a WebDrawer frame. The last step is to make the switch button control the frame, by switching it on and off.

 

3) Ctri+Right click on the Web sb. Go Control Options/Pressed/Blackbox Bro@m. Type this:

@BBInterface Control SetAgent Web Pressed Bro@m "@BBInterface Control SetWindowProperty WebDrawer IsVisible true" This will make the WebDrawer appear.

Then go Control Options/Unpressed/Blackbox Bro@m. Type this:

@BBInterface Control SetAgent Web Unpressed Bro@m "@BBInterface Control SetWindowProperty WebDrawer IsVisible false" This will make the WebDrawer disappear.

 

That's it! Repeat the procedure to create switchbuttons that control frames for System, Utilities, Music or whatever. You can use Clone to clone switch buttons and frames and then change buttons, icons, paths etc. And SAVE regularly.

Of course, these are BASIC instructions. The things you can do with bbi are almost endless. For instance, it's a good idea when creating wharfs to place ALL elements in one frame, so when you want to move the wharf all elements will follow. But you can add them later to a new frame, or do other tricks like using invisible frames - but more of this in my next tutorial, if you are still interested :)



#4 jschall

jschall

    Advanced Member

  • Members
  • PipPipPip
  • 47 posts

Posted 03 February 2015 - 03:26 PM

@crowmag:

 

I tried your suggestion first. The button contains the command 

 

"C:bbZeroblackbox.exe -exec @BBCore.ShowMenu "C:bbZeroShortcut FoldersSystem Tools""

 

This command runs fine in a Windows Run dialog, and opens the sub-menu with its icons.

 

But when I press or release the button in bbI, this error shows:

 

Error: Could not execute: C:bbZeroblackbox.exe -exec @BBCore.ShowMenu "C:bbZeroShortcut FoldersSystem Tools"

(The system cannot find the file specified.)



#5 jschall

jschall

    Advanced Member

  • Members
  • PipPipPip
  • 47 posts

Posted 03 February 2015 - 04:51 PM

Pete: Thanks for the great tutorial!

 

Here's what I have so far - two bars that fly out when their buttons are pressed:

Attached Files



#6 pitkon

pitkon

    Administrator

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

Posted 03 February 2015 - 04:58 PM

Pete: Thanks for the great tutorial!

 

Here's what I have so far - two bars that fly out when their buttons are pressed:

Great work! And you are very welcome. Remember, if you don't want your wharf always on top, uncheck Windows Options/Always On Top.



#7 crowmag

crowmag

    bbDinosaur

  • VIP Member
  • 77 posts

Posted 03 February 2015 - 06:13 PM

@crowmag:

 

I tried your suggestion first. The button contains the command 

 

"C:bbZeroblackbox.exe -exec @BBCore.ShowMenu "C:bbZeroShortcut FoldersSystem Tools""

 

This command runs fine in a Windows Run dialog, and opens the sub-menu with its icons.

 

But when I press or release the button in bbI, this error shows:

 

Error: Could not execute: C:bbZeroblackbox.exe -exec @BBCore.ShowMenu "C:bbZeroShortcut FoldersSystem Tools"

(The system cannot find the file specified.)

 

Doah!

Yeah, been a while since building anything new in bbInterface - pretty much have my desktop how I want it...

Anyway, the problem arises because you don't need the "blackbox.exe -exec" part - you just need to execute the bro@m. Like this:

Control SetAgent Button1 LeftMouseUp Bro@m "@BBCore.ShowMenu C:bbZeroShortcut FoldersSystem Tools"
So, your just going to...

Control Options > MouseUp > BlackBox Bro@m > Entry

and inserting

@BBCore.ShowMenu C:bbZeroShortcut FoldersSystem Tools

between the quotes (no double quotes!).

Sorry, copy-paste did me in...

#8 jschall

jschall

    Advanced Member

  • Members
  • PipPipPip
  • 47 posts

Posted 03 February 2015 - 08:47 PM

Thanks for the correction, @crowmag. It works (see pic), but once the submenu is displayed, it won't go away. Maybe it needs a switch button instead of a regular button?

Attached Files



#9 crowmag

crowmag

    bbDinosaur

  • VIP Member
  • 77 posts

Posted 03 February 2015 - 10:48 PM

I'm not sure what you mean: "won't go away". Clicking any item in the menu should execute the item linked in it and dismiss the menu. If you don't click a menu item, clicking any blank area on the desktop will dismiss the menu as well.



#10 jschall

jschall

    Advanced Member

  • Members
  • PipPipPip
  • 47 posts

Posted 04 February 2015 - 01:41 PM

@crowmag:

 

You are correct - the sub-menu window "goes away" when either an app is run or the desktop is clicked. I guess I hadn't restarted BlackBox when I saw that it wouldn't disappear.



#11 m.sa

m.sa

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 14 March 2015 - 04:02 AM

 

3) Ctri+Right click on the Web sb. Go Control Options/Pressed/Blackbox Bro@m.

 

I got everything working up until this point. When I go to Control Options, I don't see "Pressed" or "Unpressed". Any ideas?



#12 pitkon

pitkon

    Administrator

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

Posted 14 March 2015 - 08:20 AM

I got everything working up until this point. When I go to Control Options, I don't see "Pressed" or "Unpressed". Any ideas?

The element is probably not a button or switch button.



#13 m.sa

m.sa

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 14 March 2015 - 02:30 PM

I'm pretty sure it's a button although I could be wrong. Here's a screenshot of what I'm seeing.

Attached Files

  • Attached File  Help.png   88.62KB   0 downloads


#14 pitkon

pitkon

    Administrator

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

Posted 15 March 2015 - 08:23 AM

That's really weird. Don't you get Pressed/Unpressed on other elements?






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users