Jump to content

XSkin.au3... Skin your GUI


Valuater
 Share

Recommended Posts

Ahhh, Ok, I think I see it.. Set the array in the GUICtrlSetImage.. Cool So can a seperate image be declared for maybe like different groups or can they be flagged by each member of the array to show an individual image for each one returned in listview like youe XSkin with dynamically showing an individual image for each folder it finds in the script directory?

Ok, I am rambling now.. LOL Thanks!

Link to comment
Share on other sites

Yes thats rambling!

ok, if you want a pic from each folder like XSkin does, just use filelisttoarray() for folders only, place a pic in each folder with the same name ( just looks different) and use the $File_List & "\Picture_name.jpg" to get each picture

then put them in the list like the above code

8)

NEWHeader1.png

Link to comment
Share on other sites

  • 2 weeks later...

Based on the new Beta ver 3.2.11.1+

If you replace this

#include-once
#include <GUIConstants.au3>oÝ÷ Û­Øb±«­¢+Ø¥¹±Õµ½¹(¥¹±Õ±ÐíU%
½¹ÍѹÑÍà¹ÔÌÐì)%Õѽ%ÑYÉÍ¥½¸ÐìÅÕ½Ðì̸ȸÄÀÅÕ½ÐìQ¡¸(¥¹±Õ±Ðí]¥¹½ÝÍ
½¹ÍѹÑ̹ÔÌÐì(¥¹±Õ±ÐíMÑÑ¥
½¹ÍѹÑ̹ÔÌÐì(¥¹±Õ±Ðí ÕÑѽ¹
½¹ÍѹÑ̹ÔÌÐì)¹%

it seemed to work for me on my minimal testing

8)

NEWHeader1.png

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

To Valuater,

Please excuse me for doing these things after downloading your program(Xskin) and studying your functions,

especially the ones that don't have a clear syntax help. (e.g. _ButtonHover.au3 that in contrast has a function -_HoverButton())

Also the variables that must be declared first like the

Global $XButton_Location = @ScriptDir & "\Buttons"

Global $Icon_Folder = @ScriptDir & "\Icons"

for _HoverButton function, (you already know how it works, "mouse_over", "Press", and "Normal" . I don't know about the others who also downloaded it)

################################################################################################

Xsin.au3

- Function XskinInputBox has been edited to have a Bitor($es_password, $es_autohscroll) style for password typed inputboxes.

Details:

*Line 345

Func XSkinInputBox($IBTitle, $IBText, $IBDefault = "", $style = "")

* Line 346

Local $IBinput1 = XSkinMsgBox($IBTitle, $IBText, $IBDefault, 2, $style)

Return $IBinput1

*Line 278

Func XSkinMsgBox($MBTitle, $MBText, $IBDefault = "", $IBNotify = "", $style = "")

*Line 311

If $IBNotify = 2 Then $IBInput = GUICtrlCreateInput($IBDefault, $tile_size + 20, $MBHeight - ($tile_size + 70), $MBwidth - (($tile_size * 2) + 40), 20, $style)

If $IBNotify = 4 Then

*Line 314

XSkinButton("Ok", ($MBwidth / 2) - 35, $MBHeight - ($tile_size + 40), 70, 25, "XSkinMBI1")

Else

XSkinButton("Ok", $MBwidth / 5, $MBHeight - ($tile_size + 40), 70, 25, "XSkinMBI1")

XSkinButton("Cancel", ($MBwidth / 5) * 2.8, $MBHeight - ($tile_size + 40), 70, 25, "XSkinMBI2")

-Function XskinGuiCreate has a bug in resizing when the fuction "winmove" or the other way is called. Broken images appear then.

Here is my suggested soloution for xskin users

Details:

Instead for doing it directly:

(example)

***************************************************************************

#Include <Xskin.au3>

$skin_folder = @scriptDir & "\skin\HeavenlyBodies"

XsinGuiCreate("My XskinGui", 300, 200, $skin_folder)

while 1

;;;;

wend

***************************************************************************

You may create a UDF like this within your script or in another script(just don.t forget to include it in #include statement:

(example)

***************************************************************************

FUNC _XskinGUicreate_resizeable($Title, ByRef $Width, ByRef $Height, $Xskin_folder)

XsinGuiCreate($Title, $Width, $Height, $Xskin_folder)

XSkinButton("My button", 50, 20, "Resize") ; creates a button to call a function to resize within the UDF

while 1

mouseover()

wend

Endfunc; ==> _XskinGUicreate_resizeable

Func Resize()

$Width = 400 ; the new width will be returned

$Height = 344 ; the new height will be returned

$skin_folder = @scriptdir & "\skin\style_02" ; or even the skin

Endfunc ; ==> Resize

**************************************************************************

Then in your main scipt

**************************************************************************

#Include <Xskin.au3>

$skinDir = @scriptDir & "\skin\HeavenlyBodies"

$w = 300 ; the width

$h = 200 ; the height

_XskinGUicreate_resizeable("My XskinGui", $w, $h, $skinDir) ; all the other options regardin your gui must be inserted in the UDF "_XskinGUicreate_resizeable" ; you may rename it

while 1

;;;;

wend

################################################################################################

*Petition:

I am thankful for what you have done, but please don't think something bad about this,

why didn't you put ".chm" files (help files) for other includes(functions)

e.g. _ButtonHover.au3 for changing images for buttons during mouse_over, Press, and normal.

Any Comment: Please email me at Asaman83687@yahoo.com "or" @Gmail.com

Link to comment
Share on other sites

Hi there. First off, great job on this script! I've got a few changes for you in XSkin.au3 to enable the $GUI_DISABLE button state, and in _ButtonHover.au3 for the same thing.

XSkin.au3

Func MouseOver($XSHover = 0)
    Local $XS_msg, $XS_Hvr, $XSlid0
    For $XS_t = 1 To $XS_TMA
        ;If $XS_debug Then ToolTip("Window Number = " & $XS_t & @CRLF & "XSkin GUI # = " & $XS_gui[$XS_t] & @CRLF & "Window State = " & WinGetState($XS_gui[$XS_t]), 10, 10, "XSkin Debug Mode = On", 1)
        If WinActive($XS_gui[$XS_t]) Then
            $XS_msg = GUIGetCursorInfo($XS_gui[$XS_t])
            If BitAND(GUICtrlGetState($XS_msg[4]), $GUI_ENABLE) Then   ; ===> Check if control is disabled
                For $XS_x = 1 To UBound($CtrlIDA) - 1
                    If IsArray($XS_msg) And $XS_msg[4] == $CtrlIDA[$XS_x]Then
                        GUICtrlSetBkColor($CtrlIDA[$XS_x], $over_color)
                        While IsArray($XS_msg) And $XS_msg[4] == $CtrlIDA[$XS_x]
                            $XS_msg = GUIGetCursorInfo($XS_gui[$XS_t])
                            If IsArray($XS_msg) And $XS_msg[2] = "1" Then
                                GUICtrlSetStyle($CtrlIDB[$XS_x], $SS_ETCHEDFRAME)
                                Sleep(170)
                                GUICtrlSetStyle($CtrlIDB[$XS_x], $SS_NOTIFY + $SS_GRAYRECT)
                                If $CtrlIDC[$XS_x] = "" Then ExitLoop
                                Call($CtrlIDC[$XS_x])
                            EndIf
                            Sleep(5)
                        WEnd
                        GUICtrlSetBkColor($CtrlIDA[$XS_x], $btn_color)
                        $XSlpr = 0
                        Return
                    EndIf
                Next
                If WinActive($XS_gui[$XS_t]) And IsArray($XS_msg) And $iLoop Then
                    For $XS_s = 1 To UBound($XSkinID) - 1
                        If $XSkinID[$XS_s] == $XS_msg[4]Then
                            GUICtrlSetBkColor($XSkinID[$XS_s], $over_color)
                            While WinActive($XS_gui[$XS_t]) And IsArray($XS_msg)
                                $XS_msg = GUIGetCursorInfo($XS_gui[$XS_t])
                                If $XS_msg[4] <> $XSkinID[$XS_s]Then ExitLoop
                                Sleep(5)
                            WEnd
                            GUICtrlSetBkColor($XSkinID[$XS_s], $GUI_BKCOLOR_TRANSPARENT)
                            $XSlpr = 0
                        EndIf
                    Next
                EndIf
            EndIf ; ===> Check if control is disabledoÝ÷ Ø   ÝjÉWîËb¢{h±ëmáè½êÁºÛhËZµêÞªè«zËaxz/z°n¶Ú'~éܶ*'¶Þ¶êç¶Ø«{Mú]»gjºÚÉ«­¢+ÙÕ¹}!½ÙÉ ÕÑѽ¹MÑMÑÑ ÀÌØíaѸ°ÀÌØíѹ}ÍÑÑôÀÌØíU%}9 1¤(%U%
ÑɱMÑMÑÑ ÀÌØíaѹlÁt°ÀÌØíѹ}ÍÑѤ(%U%
ÑɱMÑMÑÑ ÀÌØíaѹlÅt°ÀÌØíѹ}ÍÑѤ)¹Õ¹
Link to comment
Share on other sites

Another little addon function to _ButtonHover.au3. The one thing that bothered me was I never got to see my button pressed state because the OnEvent message is sent on the mouse button down click, not the up click like a button control. So I wrote this function to change to the 'pressed' graphic and wait for the mouse button release to continue. It will return immediately if the cursor is moved off the button (cancels the click). I use OnEvent mode, so this function is inserted as the first line of my Event function.

_HoverWaitButtonUp

Func _HoverWaitButtonUp()
    $ret = GUIGetCursorInfo()
    GUICtrlSetImage(@GUI_CtrlId, $XButton_Location & "\Press" & $XBType)
    While $ret[4] == @GUI_CtrlId + 1 And $ret[2] == 1
        Sleep(5)
        $ret = GUIGetCursorInfo()
    WEnd
    If $ret[2] == 1 Then Return 1
EndFunc ;===> _HoverWaitButtonUpoÝ÷ ØZ+{¦¦WºÚ"µÍ[ÈØ]TÙ][ÜÊ
BY  ÉÝÈÒÝØZ]]Û

H[]È[Ý[ÛÛÙB[[
Link to comment
Share on other sites

Another little addon function to _ButtonHover.au3. The one thing that bothered me was I never got to see my button pressed state because the OnEvent message is sent on the mouse button down click, not the up click like a button control. ...

I like that one... thx

8)

NEWHeader1.png

Link to comment
Share on other sites

I have a pretty big update for _ButtonHover and XSkin. I've added support for _HoverButton's where each can have it's own Normal/Over/Press states. I also fixed a bug in _ButtonHover that was causing major problems. For the bug, try this -

$test = ""

If $test = 0 Then ConsoleWrite("test1 = " & $test & @CRLF)
If $test = 1 Then ConsoleWrite("test2 = " & $test & @CRLF)oÝ÷ ÙµÒ)Èrç{Ûjëh×6Func XSkinIcon(ByRef $XS_hWin, $XS_cH = 1) ; icon style
    If $XS_cH > 3 Or $XS_hWin = "" Then Return
    Local $XS_b, $XS_IPos1 = $XS_Isize, $XSIPos, $XS_winB[$XS_cH + 1]
    If StringRight($Icon_Folder, 1) <> "\" Then $Icon_Folder &= "\"
    $XSIPos = WinGetPos($XS_hWin)
    For $XS_b = 1 To UBound($XS_winB) - 1
        If $XS_b = 3 And Not FileExists($Icon_Folder & $XS_Istyle & $XS_b & ".bmp") Then
            GUICtrlCreatePic($Icon_Folder & "Standard3.bmp", ($XSIPos[2] - $XadjLt) - $XS_IPos1, $XadjDn, $XS_Isize, $XS_Isize, -1, $WS_EX_TOPMOST)
        Else
            GUICtrlCreatePic($Icon_Folder & $XS_Istyle & $XS_b & ".bmp", ($XSIPos[2] - $XadjLt) - $XS_IPos1, $XadjDn, $XS_Isize, $XS_Isize, -1, $WS_EX_TOPMOST)
        EndIf
        GUICtrlSetState(-1, $GUI_DISABLE)
        $XS_winB[$XS_b] = GUICtrlCreateButton("", ($XSIPos[2] - $XadjLt) - $XS_IPos1, $XadjDn, $XS_Isize, $XS_Isize, $WS_CLIPSIBLINGS)
        $XS_IPos1 += $XS_Isize
    Next
    Return $XS_winB
EndFunc   ;==>XSkinIcon
Edited by wraithdu
Link to comment
Share on other sites

I have a pretty big update for _ButtonHover and XSkin. I've added support for _HoverButton's where each can have it's own Normal/Over/Press states. I also fixed a bug in _ButtonHover that was causing major problems. For the bug, try this -

In one word... Awesome!!!

I should have noticed the == portion but, I really like that addition to allow different buttons. I still like the Theme approach, However, being able to have your own pic buttons has been asked for many times.

Good Stuff!

thx

8)

Edited by Valuater

NEWHeader1.png

Link to comment
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
 Share

  • Recently Browsing   0 members

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