Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 29
  1. #1
    Join Date
    Mar 2007
    Location
    México
    Posts
    220

    Animated toolbar (script/module)

    This script let you to create "animated toolbars" with image and button objects, and I think that it looks great =).

    Put this file in your project's root folder o script's folder and in your global functions call it with "require("xToolBar")". I also add an xml file xD .

    There are 3 main functions:

    xToolBar.CreateToolbar: Creates a new toolbar container
    xToolBar.AddItem: Adds an image or button object
    xToolBar.Animate: Animates your toolbar (put this one in your "On Mouse Move" event).

    And there are 5 different animations:

    xMODESTRAIGHT = 1;
    xMODEUP = 2;
    xMODEDOWN = 3;
    xMODESTRAIGHTUP = 4;
    xMODESTRAIGHTDOWN = 5;

    I don't have a help file but this is how i use it (you can create more than 1 toolbar):

    PHP Code:
    --[On Preload]
    mTB xToolBar.CreateToolbar("MyToolBar"4Window.GetSize(Application.GetWndHandle()).Width/210505xMODEUP);
    --
    I have 4 image objects
    for x=1do
        
    xToolBar.AddItem("Image"..xmTB);
    end

    --[On Mouse Move]
    xToolBar.Animate(e_Xe_YmTB); 
    And that's all. Try the other animations and let me know if you like it =) .
    Last edited by webultra; 03-12-2011 at 04:08 PM. Reason: I forgot to add the file lol

  2. #2
    Join Date
    Feb 2007
    Location
    Como, Italy
    Posts
    1,633
    Very nice example!

    I have palyed with it for a short time because I was in a hurry.

    I will give a deeper look tommorow and I have some suggestion to improve it, for example, a function that will retrieve the dimensions of the pictures used in the toolbar so they will not become pixelate due to the fixed dimensions of the icons you set in this code (50) px:

    Code:
    mTB = xToolBar.CreateToolbar("MyToolBar", 4, Window.GetSize(Application.GetWndHandle()).Width/2, 10, 50, 5, xMODEUP);
    Many thanks!
    We are slowly invading your planet to teach lazy humans to read the user manual.
    But don't be scared: we are here to help.

  3. #3
    Join Date
    Mar 2007
    Location
    México
    Posts
    220
    Hi Cybergraph, thank you for your comments.

    I used 50px in the example because i had 4 bigger images xD . The script resizes the added images/buttons, and the most used sizes are between 16px and 48px. If you don't want to resize the images/buttons you can comment those lines in the script . In fact I wasn't resizing when I started to write the script .

  4. #4
    Join Date
    Mar 2007
    Location
    México
    Posts
    220
    Update: Version 1.1

    I added opacity change in image objects and a couple of buttons (must be rename as the button filename) that will work as tooltips when the mouse is over an item (looks like the MAC dock's tooltips jeje) .


    The texts for the tooltips are taken from the image/buttons object's tooltips .

    Example call:

    PHP Code:
    mTB xToolBar.CreateToolbar("mTB"13460390323xMODESTRAIGHTUPtruetrue);
    for 
    x=113 do
        
    xToolBar.AddItem("Image"..xmTB);
    end 
    And I finally compiled it into an lmd (thnx to reteset's action plugin compiler). If some knows how to include the buttons (1k each one) inside of the lmd and how to call them once i need them i would appreciate the help
    Last edited by webultra; 03-14-2011 at 02:10 AM.

  5. #5
    sim is offline No longer a forum member
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,633
    Quote Originally Posted by webultra View Post
    Update: Version 1.1

    I added opacity change in image objects and a couple of buttons (must be rename as the button filename) that will work as tooltips when the mouse is over an item (looks like the MAC dock's tooltips jeje) .


    The texts for the tooltips are taken from the image/buttons object's tooltips .

    Example call:

    PHP Code:
    mTB xToolBar.CreateToolbar("mTB"13460390323xMODESTRAIGHTUPtruetrue);
    for 
    x=113 do
        
    xToolBar.AddItem("Image"..xmTB);
    end 
    And I finally compiled it into an lmd (thnx to reteset's action plugin compiler). If some knows how to include the buttons (1k each one) inside of the lmd and how to call them once i need them i would appreciate the help

    Do you have a example as I am gettting alot tD error and nill erros
    It looks like a great plugin tho.

  6. #6
    Join Date
    Mar 2007
    Location
    México
    Posts
    220
    It's 3:44am here in méxico lol, I'll upload an example project in the morning.

    The last example call adds 13 image objects to the created toolbar, maybe that's why you are getting those errors. If you add an image object that doesn't exist it will give a nil error .

    Here is another example call using less images:

    --[On Preload]
    PHP Code:
    mTB xToolBar.CreateToolbar("mTB"4Window.GetSize(Application.GetWndHandle()).Width/210323xMODESTRAIGHTUPfalsetrue);
    --
    With 4 image objects
    for x=1do
        
    xToolBar.AddItem("Image"..xmTB);
    end 
    --[On Mouse Move]
    PHP Code:
    xToolBar.Animate(e_Xe_YmTB); 
    If you want to see the tooltip object you have to place in your project page the 2 buttons included in the rar file, and rename them as their filename (without extension).

  7. #7
    sim is offline No longer a forum member
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,633
    I give that a shot until the morning thanks

  8. #8
    Join Date
    Mar 2007
    Location
    México
    Posts
    220
    Here is the example project and a snapshot of it. I created 5 toolbars to show the different kind of animations available.


    Comments are accepted

  9. #9
    sim is offline No longer a forum member
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,633
    Ooo let me have pway :P

    That is pretty nice man I not sure how to edit it just yet bit its funky well done.
    Last edited by sim; 03-14-2011 at 11:42 AM.

  10. #10
    Join Date
    Feb 2007
    Location
    Como, Italy
    Posts
    1,633
    @webultra

    As sayd before, it's a very good plugin and I think most users in the forum will be thankful to you.

    If I can give some suggestions for future improvements, here they are:

    - give the user the possibility to choose the transparency level (example: instead of the booleans, use -1 = no transparency, from 0 to 100 = transparency level).

    - give a look to the attachement: it is an example (don't remember the author, sorry) of an animated toolbar. Could you add these types of animations to yours?

    Many thanks in advance.
    Attached Files
    We are slowly invading your planet to teach lazy humans to read the user manual.
    But don't be scared: we are here to help.

  11. #11
    Join Date
    Mar 2007
    Location
    México
    Posts
    220
    Wow, that's a really nice example. About the transparency level the answer is yes, I'll do it today. And about the other animations I think there is no problem, but it will take maybe 1 day more.

  12. #12
    Join Date
    Feb 2007
    Location
    Como, Italy
    Posts
    1,633
    The time is not a problem, mate.

    Glad to see you like my suggestions.
    We are slowly invading your planet to teach lazy humans to read the user manual.
    But don't be scared: we are here to help.

  13. #13
    Join Date
    May 2004
    Location
    Belgium
    Posts
    166
    Thnx for sharing

  14. #14
    Join Date
    Feb 2009
    Posts
    1,285
    What a cool plugin, it must be part of my collection!
    thanks!

  15. #15
    Join Date
    Mar 2007
    Location
    México
    Posts
    220
    Hi, here is the new update (v1.2). It was easier than I thought to add those fisheyes animations (my code works faster ).


    Here is the changelog:

    -Added 4 animations (shakeme and 3 different kinds of fisheye animation)
    -Removed the nItems argument from xToolBar.CreateToolbar function (now there is no limit of items)
    -Changed the boolean transparency argument from xToolBar.CreateToolbar to a number argument, so now you can choose the initial opacity of the image objects (-1 = no opacity change)
    -Added 2 functions (GetnShakes and ChangenShakes) to control the xMODESHAKEME animation

    Thanx to Cybergraph for those sugestions and to the author of the fisheyemenu.

    Example and plugin attached.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts