Sign in to follow this  
Followers 0
OminousIdol

Need help with Icons!

4 posts in this topic

Trying to make a icon have transparent areas! I found a icon editor and made sure everthing that was suppose to be transparent was! I put it into my program the areas where its suppose to be transparent it was grey instead... Then I tested my icon by coverting my project to a exe and using that same icon for the exe.. It came out just fine everything that was suppose to be transparent was! Is their somthing I have to do in autoit to tell it to make it transparent or what??? Can somone please help me out!

Thanks

OminousIdol

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

My attempt at simulating transparency:

- Instead of using an image file, draw "pixels" (label controls) on the window.

- Mask.txt specifies what the image looks like; zeros denote "transparent" regions

- Movement is not optimal since all the labels have to be updated; ideally you would only modify pixels on the edges of the image that change

- There is still a bit of delay when you push the arrow keys, so I customized each loop to re-draw the image as "nicely" as possible: image refreshs top-to-bottom if you move downward but refreshed left-to-right if you move rightward

sim_transparency.zip

Edited by CyberSlug

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

Thanks alot! Didnt even think of that... but would you be able to set differnt colors to the mask.txt?

Thanks Again!

OminousIdol

Share this post


Link to post
Share on other sites

Sure, you can use a different character for each letter. 0-9, a-z, A-Z, other ASCII characters...

0000100
0012100
0122210
1223221
0122210
0012100
0001000

Modify the block of code that initially creates the label with an If-ElseIf-...-EndIf block or with a Select-Case block:

If $mask[$j][$k] = 1 Then
         $refs[$j][$k] = GUICtrlCreateLabel("", $xPos+$k*2, $yPos+$j*2, 2, 2)
         GUICtrlSetBkColor(-1, 0xFF0000)
      ElseIf $mask[$j][$k] = 2 Then
         $refs[$j][$k] = GUICtrlCreateLabel("", $xPos+$k*2, $yPos+$j*2, 2, 2)
         GUICtrlSetBkColor(-1, 0x0000FF)
      ElseIf $mask[$j][$k] = 3 Then
         $refs[$j][$k] = GUICtrlCreateLabel("", $xPos+$k*2, $yPos+$j*2, 2, 2)
         GUICtrlSetBkColor(-1, 0x00FF00)
      EndIf

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0