JellyFish666 Posted April 8, 2008 Posted April 8, 2008 (edited) hehe BubbleBreaker is a great example but a little complexed for me not sure what is and isn't required a quick example would be great, I am wondering with this can I make like a progress bar that goes one color and then another by masking it at different widths and heights?like it will be transparent and as I lower the masking the progress goes up more. Edited April 8, 2008 by JellyFish666
FreeFry Posted April 9, 2008 Posted April 9, 2008 So... what exactly is it that you're trying to do? :S
JellyFish666 Posted April 10, 2008 Author Posted April 10, 2008 (edited) So... what exactly is it that you're trying to do? :Smaking a progress bar out of two images a normal picture and a mask so I can fill how much of the progress bar I want. Edited April 10, 2008 by JellyFish666
FreeFry Posted April 10, 2008 Posted April 10, 2008 So basically you want to fade the image(s) kinda?
FreeFry Posted April 10, 2008 Posted April 10, 2008 Otherwise, can't you use the GUICtrlCreateProgress? If you're after creating a "stylish" looking progress bar, the only way I can see to do it(as the animation of GUICtrlCreateAvi can't be controlled more than playing or stopping the animation), is to have a set of pictures, representing the frames in an animation, creating all the frames at the same place, and then show each frame(hiding the previous, etc.) to create an animated effect..
JellyFish666 Posted April 10, 2008 Author Posted April 10, 2008 (edited) sigh after many hours I finally found it [images Deleted] now is it easy for you guys to understand Edited April 11, 2008 by JellyFish666
jpam Posted April 10, 2008 Posted April 10, 2008 mmh, mybe this ? i repainted your png with transperence color #include <Prospeed.au3> Opt("GUIOnEventMode", 1) HotKeySet("{Esc}", "_exit") $GUI = GUICreate("ProgressBar ColorChange", 400, 600, -1, -1) GUISetOnEvent(-3, "_exit") GUISetState() background("",0,0,400,600) $load = LoadExtImage("thermometrmm7.jpg") $mask = ImportPng(0,"thermometrsv2.png") For $i = 0 To 445 Step 1 $bitmap = CreateExtBmp(32, 480) CopyExtBmp($bitmap, 0, 450-$i, 32, 480, $load, 0, 450-$i, 0) PaintPng(0,$bitmap,0,0,$mask,0) CopyExtBmp($hdc, 100, 50, 32, 480, $bitmap, 0, 0, 0) FreeExtBmp($bitmap) Sleep(10) Next While 1 Sleep(1000) WEnd Func _exit() FreeAllExtBmps() FreePng(0, $mask) Exit EndFunc
jpam Posted April 10, 2008 Posted April 10, 2008 one with color change ; expandcollapse popup#include <Prospeed.au3> Opt("GUIOnEventMode", 1) HotKeySet("{Esc}", "_exit") $GUI = GUICreate("ProgressBar ColorChange", 400, 600, -1, -1) GUISetOnEvent(-3, "_exit") GUISetState() background("",0,0,400,600) $load = LoadExtImage("thermometrmm7.jpg") $mask = ImportPng(0,"thermometrsv2.png") $array = InitExtFX($load) For $i = 0 To 445 Step 1 $clone = CloneArray($array) ExchangeRgb($load,0,0,$clone,-$i/3,$i/3,0) $bitmap = CreateExtBmp(32, 480) CopyExtBmp($bitmap, 0, 450-$i, 32, 480, $load, 0, 450-$i, 0) PaintPng(0,$bitmap,0,0,$mask,0) CopyExtBmp($hdc, 100, 50, 32, 480, $bitmap, 0, 0, 0) FreeExtFX($clone) FreeExtBmp($bitmap) Sleep(10) Next While 1 Sleep(1000) WEnd Func _exit() FreeAllExtBmps() FreeExtFX($clone) FreeExtFX($array) FreePng(0, $mask) Exit EndFunc
JellyFish666 Posted April 11, 2008 Author Posted April 11, 2008 Perfect, you got it done exactly how I was hoping it would look like and the color change just wow! thanks for adding that extra little touch to it and I learned a bit more code now that I am trying to absorb.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now