DOpus' button banks
have been responsible for reducing the number of
users for ToolManager, AmiDock and other button
bar interfaces for Workbench. Especially when
running DOpus as a Workbench replacement, they
become nigh on invaluable since they can be moved
around, closed and re-opened easily and can
contain graphics as well as text. Personally, I
tend to use text bars since they take up less RAM
and load up quicker, but for this tutorial I
thought we could have a look at creating an
integrated graphical button bar that fits in with
your backdrop. This is actually much harder
work than you might imagine, but the results can
be worth the trouble if you're willing to give it
a try. The first thing to bear in mind is that
each individual button in a DOpus button bank has
to be the same size as all the other buttons in
the same bank, so laying a grid down in PPaint,
Brilliance or DPaint is a must. The next thing to
think about is how much palette you have to play
about with. Us graphic card owners are lucky, we
could have a 24-bit picture, but AGA and ECS
owners have to be a lot more careful. If you are
using a MagicWB palette I recommend that you make
do with the eight colours that this one provides.
If you try to create any more than that, your
machine will start to slow down.
It's probably best to start by working out
which buttons you want in this bank. If you're
aiming to replace your existing bank then you are
going to need plenty of space, but if you're just
going to, say, replace your ftp button bank then
you'll probably only need a few buttons. Remember
also that unless you like to have a full window
around your buttons, you will need to work the
vertical or horizontal strip drag bar into the
design of your backdrop somehow. Ideas that came
to my mind when thinking about this tutorial
included making a backdrop that was full of
Workbench windows, so that our full windowed
button bank wouldn't look out of place, or using
short vertical bars to create an abstract
"Mondrian-esque" design for the other
style. However, the fact is that until there's an
option to remove the button bank's bar
altogether, integrating your button banks is
always going to be a little tricky.
The example button bank shown uses a picture
of a Beretta as a backdrop and the bullet as the
button bank. Obviously this only has a single
button button bank, but you get the idea.
Of course, there's a lot more to button banks
than this. For instance, did you know that if you
hold the Alt key down while clicking on a button
it will bring it straight up for editing? This
means no more having to use the button bank
pop-up menu, selecting edit and then choosing the
button you wish to edit. One modifier, one click
and boomph, you're there. In fact, as far as I'm
concerned Jon Potter may as well just remove the
"Edit..." menu item altogether. This
neat trick also works with the button banks at
the top of listers. Just hold down the alt key
while clicking them and Robert will be your
father's brother!
Also useful to bear in mind is the fact that
you can drag and drop buttons while the edit
window is open. You can drag and drop from one
button bank to another, do the same within the
same button bank -- you can even drag buttons
into the action editor if you want to add another
command, or drag them into a function window if
you want to make a button list. Tres handy.
While we are talking about creating buttons,
it's also worth discussing the commands that make
them work. As you probably already know, DOpus
has its own internal commands as well as the
ability to use AmigaDOS scripts to make things
happen. This gives the user (that's you) almost
unlimited power to create any type of button you
want. As an example, I find the Miami interface
to be somewhat intrusive. But Miami has a lovely
ARexx port which I'm never going to make full use
of. However, even I can set up a button in
Directory Opus to go online and another to go
offline by making a script that simply says:
/* Get Miami online*/ Address Miami.1
Online
I change online for offline when I want to
link down. And, if I was more ARexx- aware, I
could use Miami's ISONLINE command so that I only
need one button to do both jobs. The only trouble
with this script is that it gives no visual
feedback to tell me when I've got online (or off
again). This is where DOpus wins out again. By
adding:
command FinishSection
command Beep
after calling my Miami script, I can make
DOpus beep to inform me that I'm either on or
offline. For this to work, you'll need to make
sure that you don't have "Run
asynchronously" turned on in the list of
options down at the bottom right of the function
editor window. I thought this might initially be
a problem until I remembered that even buttons
are regarded as separate processes in DOpus, so
it won't affect the normal running of the rest of
the program.
The "FinishSection" beep sound can
also be very handy tool to have if you are in the
habit of copying long files or making huge
archives and it isn't that difficult to add to an
existing button. You don't even have to use
DOpus' internal beep -- Nick used to have his
machine doing a round of applause when copying
from his notoriously slow IDE drive.
For my last trick, I'll explain how to add
new buttons to a button bank interactively. For
this to work, you'll need your standard button
bank with a button spare. For me, this is the red
on green button labelled "Net buttons".
Before editing this button, change the title of
the bank and save it under a different name. For
me, the new bank becomes known as MainNet. Then
you can put the commands, shown in the grab
below, in the function editor for this button.
Now, if you click on the "Net buttons"
button the bank disappears and is replaced with
the clone bank. You can now add new buttons to
this bank to give you Net functions as I have
done and change the "Net buttons"
button to "Close Net" and reverse the
function for the button. This looks pretty nifty
and you'll be glad to know, doesn't take a whole
lot of effort either.
|
|
![pic 1](pic1.GIF) Making your graphical button
bank blend in with your backdrop can be tricky,
but effective.
![pic 2](pic2.GIF)
![pic 3](pic3.GIF)
Clicking the "Net Buttons" button
will open the second bank shown here.
![pic 4](pic4.GIF)
Making unfolding button banks is very easy.
Why not make one that just keeps unfolding?
![pic 5](pic5.GIF)
![pic 2](pic6.GIF)
You can use drag and drop not only to copy
files, extract archives and change directory, but
also to configure your DOpus setup -- copy
buttons, add functions, etc. You don't always get
the result you're looking for first time, but
they certainly are a time saver. The red boxes in
these two familiar windows show the areas where
you can drag and drop buttons to.
|