[Userlib & Source] - ImageGadget Animations

Developed or developing a new product in PureBasic? Tell the world about it.
Env
Enthusiast
Enthusiast
Posts: 151
Joined: Tue Apr 27, 2010 3:20 pm
Location: Wales, United Kingdom

[Userlib & Source] - ImageGadget Animations

Post by Env »

Hey all,

As an extension to the source code I was tinkering with in the Tricks & Tips section, I have finally made a stable library that allows you to apply animations to a standard ImageGadget.

Using straight-forward commands, this library allows you to apply an animation strip (frames stitched together) to an ImageGadget, as well as pausing, playing, stopping, setting the speed of the animation.

What's Included

- 2 Different Variations of the UserLibrary for Windows 32bit Platform, which are:

Standard - Using standardized commands (ApplyImageGadgetAnimation) for PureBasic 4.50 and above... (Enables any number of frames to be applied)
Prefixed - With simplified commands, prefixed with a "AIG_" (i.e. AIG_ApplyAnimation) for PureBasic 4.50 and above...

- Source code to enable you to easily tailbite the library to work with your compiler for both call-types.

- Documentation in the form of a CHM file.

- Documentation in the form of html files, and a snazzy index page... which isn't so snazzy, as I hand-made it.

- Include file, in case the userlibs fail.

- Userlib compilation sources, so you can easily build a userlib for your platform, with no hassle.

- An Example.

- A few little animation strips to play with.

Revisions

1.0 Beta 2 - Re-built the <4.50 libraries on PureBasic 4.41 in the hope that it supports previous compilers better than the initial release that gave errors.
1.0 Beta 3 - After the problems of including this library in previous versions of Purebasic before 4.41, the Source Code has been refined, and has been included in the package as an include file.
1.0 Beta 4 - Fixed a very basic mistake in the Include File, which was the Include containing the Init and Kill procedures, which would only be applicable if being made into a userlibrary.
1.0 Final - Fixed the source code for better integration as a include file (as a few functions were still made with building as a userlib in mind...), help file updated, and html help provided.

Download

You can download the 1.0 Final release here: http://www.mediafire.com/file/ehmynnmgw ... 32_src.zip


Please report any bugs, feature requests, or general usage experiences here :)

Thanks,

Env
Last edited by Env on Mon May 10, 2010 4:37 pm, edited 10 times in total.
Thanks!
Padraig
User
User
Posts: 29
Joined: Fri Jul 13, 2007 1:22 pm

Re: [Userlib] - ImageGadget Animations

Post by Padraig »

Hello!

This looks like a great and handy thing, but I can't get it to work on PB 4.41. The example gives me a "The following PureLibrary is missing: Event." compiler error on both the prefixed and the standard userlib. :(

Pad
Env
Enthusiast
Enthusiast
Posts: 151
Joined: Tue Apr 27, 2010 3:20 pm
Location: Wales, United Kingdom

Re: [Userlib] - ImageGadget Animations

Post by Env »

Hey Padraig...

Thanks for bringing it to my attention, I have now re-build the UserLibraries meant for compilers before 4.50 on a 4.41 compiler... So it should work fine now (Touch Wood)....

The new link is on the initial post.



Have a go and let me know if any problems occur..

Thanks mate,


Env
Thanks!
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Re: [Userlib] - ImageGadget Animations

Post by Kaeru Gaman »

Env wrote:... I have now re-build the UserLibraries meant for compilers before 4.50 on a 4.41 compiler...
will work on a 4.4x, but not necessarily on a 4.3x and certainly not on 4.2x + <
the thing with the tailbitten userlibs is, they are strictly version bound.

this and some possible side effects are the reasons why some people refuse to use userlibs.
since you published your code as an include, too, that's not that big a problem here.
oh... and have a nice day.
Env
Enthusiast
Enthusiast
Posts: 151
Joined: Tue Apr 27, 2010 3:20 pm
Location: Wales, United Kingdom

Re: [Userlib] - ImageGadget Animations

Post by Env »

The source-code hasn't yet been finished, and as such it has been removed in its primitive form from the Tricks & Tips section.. Though when I have optimised it, and profiled it as much as I deem necessary, then it will be released.

Env
Thanks!
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Re: [Userlib] - ImageGadget Animations

Post by Kaeru Gaman »

ok, so just the tempus of my sentence is to change... :mrgreen:

anyhow, just be aware that userlibs have this restrictions.
you will not reach the whole community with a userlib.

even a lot of collegues who use userlibs use only those they really, really need for their project,
because sometimes the combinations of userlibs can show strange sideeffects.
... well, at least some years ago I observed such an effect, dunno if it still is possible.

however, I generally avoid userlibs.
I'm about to be convinced to try mpz's MP3D lib, if I do it will be my first userlib ever.
oh... and have a nice day.
Padraig
User
User
Posts: 29
Joined: Fri Jul 13, 2007 1:22 pm

Re: [Userlib] - ImageGadget Animations

Post by Padraig »

Works like charm now on PB 4.41. Thanks for fixing this so quickly! :D

Does not work on PB4.3 and minor. The compiler spits out: "The following PureLibrary is missing: AlphaImage".

Neverthless, nice work and thanks for sharing!

Pad
Env
Enthusiast
Enthusiast
Posts: 151
Joined: Tue Apr 27, 2010 3:20 pm
Location: Wales, United Kingdom

Re: [Userlib] - ImageGadget Animations

Post by Env »

You're welcome, and it's Bloody typical lol.. Thanks Kaeru Gaman for the heads up also.


A new release has been posted on the first post, including the Source Code as an include file, as well as updated documentation.

Env
Thanks!
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

Re: [Userlib & Source] - ImageGadget Animations

Post by c4s »

Interesting library and thanks for releasing the source!

But with using AnimImageGadget.pbi I get an IMA at line 86 (with your example) with PB 4.50 Beta 4.
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
Env
Enthusiast
Enthusiast
Posts: 151
Joined: Tue Apr 27, 2010 3:20 pm
Location: Wales, United Kingdom

Re: [Userlib & Source] - ImageGadget Animations

Post by Env »

Are you using both the include & the userlib? if so, don't... The AnimImageGadget.pbi is to be used separately, and not in conjunction with the Include File.


The example was written with the UserLib in mind, so you may need to make some adjustments if it doesn't work...
Thanks!
Env
Enthusiast
Enthusiast
Posts: 151
Joined: Tue Apr 27, 2010 3:20 pm
Location: Wales, United Kingdom

Re: [Userlib & Source] - ImageGadget Animations

Post by Env »

Ah bollocks, I've realised my mistake... Ammended version will be updated in a few minutes...
Thanks!
Env
Enthusiast
Enthusiast
Posts: 151
Joined: Tue Apr 27, 2010 3:20 pm
Location: Wales, United Kingdom

Re: [Userlib & Source] - ImageGadget Animations

Post by Env »

Fixed the code, and it was an embarrassingly simple mistake lol... all should work fine when either using the include file, or building it as a userlibrary...

New Version (Beta 4) Uploaded: http://www.mediafire.com/file/liw0kwyli ... 32_src.zip
Thanks!
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

Re: [Userlib & Source] - ImageGadget Animations

Post by c4s »

Thanks - Works fine now.
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
Env
Enthusiast
Enthusiast
Posts: 151
Joined: Tue Apr 27, 2010 3:20 pm
Location: Wales, United Kingdom

Re: [Userlib & Source] - ImageGadget Animations

Post by Env »

The 1.0 Final version is now complete and uploaded for your using pleasure...


Changes

* Fixed a few little bugs in the code, and fixed procedure calls that take optional arguments when not being built as a UserLibrary.
* Ammended Help Documentation.
* Included HTML Help.
Thanks!
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: [Userlib & Source] - ImageGadget Animations

Post by DoubleDutch »

Thanks for this. :)
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
Post Reply