Sign in to follow this  
Followers 0
ZeraKakkade

Need help with pics

5 posts in this topic

Hi,

I try to explain my problem with pics becouse my english is bad ^^

thats my ingame window (charackter creation)

Posted Image

now i want add the head from a charackter

Posted Image

the 255 0 255 colore should be transparent but it looks like this

Posted Image

but i want this

Posted Image

I have try the BMP2RGN.dll but now is the complete window transparent and the head is black

Posted Image

How can i make only the Pic (255 0 255) transparent?

thanks

Share this post


Link to post
Share on other sites



Post some example script...

Share this post


Link to post
Share on other sites

func _char_creation($GameMenu)

    $Set_Rasse = "Mensch"
    $Set_Klasse = "Kämpfer"
    $Set_Element = "Wasser"
    $Set_Name = ""
    $Set_HeadGrafik = 1
    $Set_KFT = 1
    $Set_ASD = 1
    $Set_ENG = 1
    $Set_FIT = 1
    $Set_REF = 1
    $Set_SIC = 1
    $set_Gender = 1
    $Set_Free_Stats = 10
    $Set_ArmorGrafik = 1

$window_charcreation = GUICreate("charcreation", 500, 430, -1, -1, $WS_POPUPWINDOW, -1, $GameMenu)
    $layout_rass = GUICtrlCreatePic("texture\common\lable_a.bmp", 20, 30, 160, 30, $WS_CHILD)
    $layout_klass = GUICtrlCreatePic("texture\common\lable_a.bmp", 20, 80, 160, 30, $WS_CHILD)
    $layout_element = GUICtrlCreatePic("texture\common\lable_a.bmp", 20, 130, 160, 30, $WS_CHILD)
    $layout_char = GUICtrlCreatePic("texture\common\lable_char.bmp", 270, 30, 160, 160, $WS_CHILD)
    $layout_charview = GUICtrlCreatePic("texture\char\" & $Set_Rasse & $set_Gender & "-" & $Set_HeadGrafik & "-0.bmp", 335, 60, 32, 40,$WS_CHILD)
    GUICtrlSetBkColor($layout_charview, 0xFF00FF)
    GUICtrlSetBkColor($layout_charview, $GUI_BKCOLOR_TRANSPARENT)
    GUISetState()
    $a = DllCall("BMP2RGN.dll", "int", "BMP2RGN", "str", "texture\char\" & $Set_Rasse & $set_Gender & "-" & $Set_HeadGrafik & "-0.bmp", "int", 255, "int", 0, "int", 255)
    SetWindowRgn($window_charcreation, $a[0])
endfunc


Func SetWindowRgn($h_win, $rgn)
    DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $h_win, "long", $rgn, "int", 1)
EndFunc  ;==>SetWindowRgn

$GameMenu is my main window

$GameMenu = GUICreate("Core", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUPWINDOW)

____________________________________________________________________

GUICtrlSetBkColor($layout_charview, 0xFF00FF)

GUICtrlSetBkColor($layout_charview, $GUI_BKCOLOR_TRANSPARENT)

there i have tryed to set the background colore to the same like my pic colore 255 0 255

but it look like screen 2

____________________________________________________________________

$a = DllCall("BMP2RGN.dll", "int", "BMP2RGN", "str", "texture\char\" & $Set_Rasse & $set_Gender & "-" & $Set_HeadGrafik & "-0.bmp", "int", 255, "int", 0, "int", 255)

SetWindowRgn($window_charcreation, $a[0])

and here with the BMP2RGN.dll but it make he complete window transparent like screen 4

Share this post


Link to post
Share on other sites

Please also include the images...so it would be easier to help you...

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

ok i have get the pic transparent

i have download the latest Autoit version and than a have create 2 windows

$window_charcreation_trans = GUICreate("charcreation", 500, 430, -1, -1, $WS_POPUPWINDOW)
    $layout_char_trans = GUICtrlCreatePic("texture\common\lable_char.bmp", 270, 30, 160, 160, $WS_CHILD)
    GUISetState()
    $window_charcreation = GUICreate("charcreation", 500, 430, -1, -1, $WS_POPUPWINDOW,$WS_EX_LAYERED,$window_charcreation_trans)
    $layout_rass = GUICtrlCreatePic("texture\common\lable_a.bmp", 20, 30, 160, 30, $WS_CHILD)
    $layout_klass = GUICtrlCreatePic("texture\common\lable_a.bmp", 20, 80, 160, 30, $WS_CHILD)
    $layout_element = GUICtrlCreatePic("texture\common\lable_a.bmp", 20, 130, 160, 30, $WS_CHILD)
    $layout_char = GUICtrlCreatePic("texture\common\lable_char.bmp", 270, 30, 160, 160, $WS_CHILD)
    $layout_charview = GUICtrlCreatePic("texture\char\" & $Set_Rasse & $set_Gender & "-" & $Set_HeadGrafik & "-0.bmp", 335, 60, 32, 40,-1)
    
    GUISetState()

behind the pic is the second window complete transparent so i have create the first window with the same background.

now can i choose different head styles and gender styles and all are transparent

Posted Image

----

Posted Image

thanks for try to help my ^.^

Edited by ZeraKakkade

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