Jump to content

Recommended Posts

Posted

Does the GUI not support Transparent GIFS or PNG? Because I am trying to build a game I can not get any of my pictures to be Transparent! Is their a way around this or just cant be done?

Thanks

OminousIdol

Posted (edited)

Use icons or avi files. Anything else is not supported. It's a limitation of windows.

Edited by this-is-me
Who else would I be?
Posted

Ok... made my pictures icons so they can be transparent but the quality is not that great any of making it better and have this code. When it first displays the Icon it is really small for some reason then whe I press left to make it move it becomes big like it should! Can anyone tell me how to make it big when you first start up the program thanks!

Here is my code!

Dim $L, $x, $y, $w, $h

$L = 0
$x = 10
$y = 10
$w = 94.5
$h = 109.6

HotKeySet("{RIGHT}", "Right")

GuiCreate("Walking", 800, 600)

$pic = GUICtrlCreateIcon("walk1.ico",-1,$x, $y, $w, $h)
GUICtrlSetNotify ()


Func Right()
$L = $L + 1
$x = $x + 10

If $L = 1 Then
GUICtrlSetImage($pic,"walk2.ico")
GUICtrlSetPos($pic,$x, $y, $w, $h)
EndIf

If $L = 2 Then
GUICtrlSetImage($pic,"walk3.ico")
GUICtrlSetPos($pic,$x, $y, $w, $h)
EndIf

If $L = 3 Then
GUICtrlSetImage($pic,"walk4.ico")
GUICtrlSetPos($pic,$x, $y, $w, $h)
EndIf

If $L = 4 Then
GUICtrlSetImage($pic,"walk5.ico")
GUICtrlSetPos($pic,$x, $y, $w, $h)
EndIf

If $L = 5 Then
GUICtrlSetImage($pic,"walk6.ico")
GUICtrlSetPos($pic,$x, $y, $w, $h)
$L = 1
EndIf

EndFunc

GUISetState ()
$msg = 0
While $msg <> -3

Wend
Posted

For the question about avi and icons, google it.

For the gui problem, replace

$pic = GUICtrlCreateIcon("walk1.ico",-1,$x, $y, $w, $h)

with

$pic = GUICtrlCreateIcon("walk1.ico",-1,$x, $y, $w, $h)
GUICtrlSetPos($pic,$x, $y, $w, $h)

Trust me, it works.

Who else would I be?
Posted

Thanks! That work just great! But I am just having problems with this whole thing... Been trying to create my images into ICO but when it makes a grey background and its not transparent. Really need a way where I can make a person walking on the GUI and have all the images transparent! I have the walking part down just fine but I cant figure out how to get IMAGES transparent!

Please Help Me!

OminousIdol

Posted (edited)

Ok I already saw those and still have problem... Every time I try to make a icon and have some areas transpartent when I insert it into my GUI all the areas that are suppose to be transpartent are grey.... I know that they are transpartent because I put the Icon into a EXE and it was transparent! So I dont understand what I am doing wrong??

Also if you put a background on those two icons Racing around each icon a grey background will show up.. All I did was put a yellow label and made it size of the GUI and grey boxes are around the icons so they are not transparent correct?

That is what I am getting at I need icons that are acutal transpartent not ones that just blend in with the GUI background!!!!

Thanks

OminousIdol

Edited by OminousIdol

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...