Latest |Kites |Pictures |Programming |Life

EButton is a 'Start' button plugin.

Download : Zip file.

Download Skins : EButton skins.
EButton 2, a preview : EButton 2.

A screen shot showing two instances of EButton ( start and tools ) each with a different skin and label.

The skins consists of normal, mouse over (animation) and mouse press. These are simple bitmaps that can be edited in any old paint program.

In this shot you can see how the EButton plugin has been added next to the geOTasks. This mimics the explorer shell quite well. The blue skin is available via deviantart.com

Stuff you can customize with this button are:

  • The skins, including mouse over animations.
  • Animation speed.
  • The pop up menu position (aligned with the button or for quicker access under the mouse)
  • Add text labels to the button - use the same button background skin for many different buttons.
  • Turn off those fucking tool tips!

EButton ReadMe.txt

Add an EButton to a geOBar, it will complain that it don't have a skin yet. Don't worry, it will display 'no text'.

Open regedit, browse to the plugin settings and set a button skin.

Shift + Right-mouse-button-double-click to refresh the EButton (it will pick up the new settings from the reg)

Reg options, and what they do:

Align :

left or right text alignment

Font :

example -> "Courier New, 15"

frameSpeed :

low numer is faster

Menu :

Normal geoshell menu name.

menuAtMouse :

true or false. True displays the menu at the mouse co-ordinates, false aligns it with the button (like the 'start' menu)

runToEndOfAnimation :

true or false

If the skin can animate on mouseOver it will start at the top frame, then after 'frameSpeed' pause it will display the next frame. If the user moves the mouse off the button then what should happen to the animation?

Set this to true to finish the animation, it keeps rolling till it gets to the first frame. Then it displays the normal bitmap. This may result in buttons animating some time after the users has removed the mouse.

If it is false then the animation stops and the normal bitmap is shown. This may result in jerky animation.

Skin :

Path to skin directory. Must contain :

  • button.bmp
  • buttonClick.bmp
  • buttonOver.bmp

String :

The string to be displayed on the button, can be left or right aligned (see Align) Font is set in Font.

textOffset :

Number of pixels to offset the text from the edge of the button.

toolTip :

false to get rid of the most anoying thing in the world.

true to enable the most anoying thing in the world.

bounce :

This was introduced to help reduce the size of the .bmp files. Most of the MouseOver animations I created were symetrical, for example:

- fade in, fade out.

So the .bmp files would have (in this example) 9 frames, with these levels of fade:

  • frame 0 : transparent
  • frame 1 : 75%
  • frame 2 : 50%
  • frame 3 : 25%
  • frame 4 : opaque
  • frame 5 : 25%
  • frame 6 : 50%
  • frame 7 : 75%
  • frame 8 : transparent

And this gave me a nice animated button.

The frames are displayed: 0 to 9, 0 to 9, 0 to 9 etc...

Half of the frames are duplicated, so setting bounce to true forces EButton to count up, then down.

Here is our new buttonOver.bmp:

  • frame 0 : transparent
  • frame 1 : 75%
  • frame 2 : 50%
  • frame 3 : 25%
  • frame 4 : opaque

And now EButton displays: 0,1,2,3,4,3,2,1,0 [ repeat ]

You get the same animation, with only ( half + 1 ) frames...

Another example, this time with pictures:

Without bounce set: With bounce set the animation runs to the end, then back again:

+-----------------+
|   skin format   |
+-----------------+

The button.bmp must be 24 pixels high. It can be any width.

buttonClick.bmp must be the same size as button.bmp

buttonOver.bmp must be the same width as button.bmp, but it can be any multiple of 24 in height.

If it was 48 pixels high then the top 24 are used as the first frame, then 25 to 48 are used as the second frame.

This can be mulitplied up, so you can have as many frames as you want.

To turn off animation set the buttonOver.bmp to have one frame of animation (height = 24 pixels) this will turn off the animation timer.

+--------------------+
|   skin directory   |
+--------------------+

This is relative to the geOShell directory (where the geoshell.exe lives)

So an EButton skin in the 'skins/my button' directory actually lives in

E:\geoshell\skins\my button

or your equivilant.

To have many EButtons with different skins, each set of skins needs to be in its own directory, e.g.:

  • skins/mySkin/startButton
  • skins/mySkin/workButton
  • skins/mySkin/prawnButton

This will keep the button skins that match the geOShell skins all together (easy to zip up and share :-)

by ::eden::

Server Grind [0.0238 seconds]