Jump to content

Steam Window layout (GUI with fade out effect)


Dreamfire
 Share

Recommended Posts

Here you go.

If you like it, use it. :)

Posted Image

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
#include <ComboConstants.au3>

__steam_window('STEAM - username', 1000, 600) ; WIDTH NOT SMALLER THEN 400 | HEIGHT NOT SMALLER THEN 200 === TRUST ME

Func __steam_window($sWINDOW_TITLE, $iWINDOW_WIDTH, $iWINDOW_HEIGHT)
    Local $oWINDOW = GUICreate($sWINDOW_TITLE, $iWINDOW_WIDTH, $iWINDOW_HEIGHT, -1, -1, BitOR($WS_POPUP, $WS_SYSMENU, $WS_MINIMIZEBOX), $WS_EX_LAYERED) ; BitOR($WS_EX_TOOLWINDOW, $WS_EX_LAYERED))
    GUISetFont(8, 400, 0, 'Tahoma')
    GUISetBkColor(0x494E49)
    GUICtrlCreatePic('hdr.bmp', 0, 0, $iWINDOW_WIDTH - 16, 20, $SS_NOTIFY, $GUI_WS_EX_PARENTDRAG)
    GUICtrlCreatePic('hdr.bmp', $iWINDOW_WIDTH - 16, 0, 11, 5, $SS_NOTIFY, $GUI_WS_EX_PARENTDRAG)
    GUICtrlCreatePic('hdr.bmp', $iWINDOW_WIDTH - 16, 16, 11, 4, $SS_NOTIFY, $GUI_WS_EX_PARENTDRAG)
    GUICtrlCreatePic('hdr.bmp', $iWINDOW_WIDTH - 5, 0, 5, 20, $SS_NOTIFY, $GUI_WS_EX_PARENTDRAG)
    GUICtrlCreateGraphic(0, 20, 1, $iWINDOW_HEIGHT)
    GUICtrlSetColor(-1, 0x686A65)
    GUICtrlCreateGraphic($iWINDOW_WIDTH - 1, 20, 1, $iWINDOW_HEIGHT)
    GUICtrlSetColor(-1, 0x686A65)
    GUICtrlCreateGraphic(0, $iWINDOW_HEIGHT - 1, $iWINDOW_WIDTH, 1)
    GUICtrlSetColor(-1, 0x686A65)
    Local $oCLOSE = GUICtrlCreatePic('cls.bmp', $iWINDOW_WIDTH - 16, 5, 11, 11, $SS_NOTIFY, $GUI_WS_EX_PARENTDRAG)
    Local $oLABELHEADER = GUICtrlCreateLabel($sWINDOW_TITLE, 6, 0, $iWINDOW_WIDTH - 22, 20, $SS_CENTERIMAGE)
    GUICtrlSetColor(-1, 0xD8DED3)
    GUICtrlSetBkColor(-1, 0x5A6A50)
    
    #cs ==============================
    EXAMPLE SECTION ==================
    #ce ==============================
    
    Local $oBUTTON_1 = GUICtrlCreateButton('Button 1', 10, 30, 140, 20)
    GUICtrlSetFont(-1, 8, 800, 0, 'Tahoma')
    
    Local $oBUTTON_2 = GUICtrlCreateButton('Button 2', 10, 60, 140, 20)
    GUICtrlSetFont(-1, 8, 800, 0, 'Tahoma')
    
    Local $oBUTTON_3 = GUICtrlCreateButton('Button 3', 10, 90, 140, 20)
    GUICtrlSetFont(-1, 8, 800, 0, 'Tahoma')
    
    Local $oBUTTON_4 = GUICtrlCreateButton('Button 4', 10, 120, 140, 20)
    GUICtrlSetFont(-1, 8, 800, 0, 'Tahoma')
    
    Local $oBUTTON_5 = GUICtrlCreateButton('Button 5', 10, 150, 140, 20)
    GUICtrlSetFont(-1, 8, 800, 0, 'Tahoma')
    
    GUICtrlCreateGraphic(1, 20, 160, $iWINDOW_HEIGHT - 21)
    GUICtrlSetColor(-1, 0x464646)
    GUICtrlSetBkColor(-1, 0x464646)
    GUICtrlCreateGraphic(158, 20, 1, $iWINDOW_HEIGHT - 21)
    GUICtrlSetColor(-1, 0x3D423D)
    GUICtrlCreateGraphic(159, 20, 1, $iWINDOW_HEIGHT - 21)
    GUICtrlSetColor(-1, 0x424742)
    GUICtrlCreateGraphic(160, 20, 1, $iWINDOW_HEIGHT - 21)
    GUICtrlSetColor(-1, 0x454A45)

    $oLABELTOP = GUICtrlCreateLabel('HEADER TEXT', 180, 31, $iWINDOW_WIDTH - 200, 20, $SS_CENTERIMAGE)
    GUICtrlSetFont(-1, 8, 800, 0, 'Tahoma')
    GUICtrlSetColor(-1, 0xC4B550)
    
    GUICtrlCreateGraphic(170, 51, $iWINDOW_WIDTH - 180, 1)
    GUICtrlSetColor(-1, 0x636763)
    
    GUICtrlCreateLabel('combo control', 190, 70, 100, 20, BitOR($SS_RIGHT,$SS_CENTERIMAGE))
    GUICtrlSetColor(-1, 0xE6ECE0)
    GUICtrlCreateCombo('', 300, 70, 200, 20, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, 'Combo Item 1|Combo Item 2|Combo Item 3')
    
    GUICtrlCreateLabel('input control', 190, 100, 100, 20, BitOR($SS_RIGHT,$SS_CENTERIMAGE))
    GUICtrlSetColor(-1, 0xE6ECE0)
    GUICtrlCreateInput('', 300, 100, 200, 20)
    
    GUICtrlCreateGraphic(170, 30, $iWINDOW_WIDTH - 180, $iWINDOW_HEIGHT - 40) ; THIS CONTROL NEEDS TO BE LAST DUE TO OVERLAY ISSUES
    GUICtrlSetColor(-1, 0x686A65)
    
    #cs ==============================
    EXAMPLE SECTION ==================
    #ce ==============================
    
    GUICtrlCreatePic('cnr.bmp', 0, 0, 1, 1, $SS_NOTIFY, $GUI_WS_EX_PARENTDRAG)
    GUICtrlCreatePic('cnr.bmp', $iWINDOW_WIDTH - 1, 0, 1, 1, $SS_NOTIFY, $GUI_WS_EX_PARENTDRAG)
    GUICtrlCreatePic('cnr.bmp', 0, $iWINDOW_HEIGHT - 1, 1, 1, $SS_NOTIFY, $GUI_WS_EX_PARENTDRAG)
    GUICtrlCreatePic('cnr.bmp', $iWINDOW_WIDTH - 1, $iWINDOW_HEIGHT - 1, 1, 1, $SS_NOTIFY, $GUI_WS_EX_PARENTDRAG)
    GUISetState(@SW_SHOW)
    While 1
        Local $eMSG = GUIGetMsg()
        Switch $eMSG
            Case $GUI_EVENT_CLOSE
;~              Local $iWINDOW_TRANS
;~              For $iWINDOW_TRANS = 255 To 0 Step -10
;~                  If $iWINDOW_TRANS > 0 Then WinSetTrans($oWINDOW,'',$iWINDOW_TRANS)
;~                  Sleep(10)
;~              Next
                Exit
            Case $oCLOSE
;~              Local $iWINDOW_TRANS
;~              For $iWINDOW_TRANS = 255 To 0 Step -10
;~                  If $iWINDOW_TRANS > 0 Then WinSetTrans($oWINDOW,'',$iWINDOW_TRANS)
;~                  Sleep(10)
;~              Next
                Exit
        EndSwitch
    WEnd
EndFunc

[uPDATE] << -- Check attachment (STEAM.au3)

- Added sample controls

- Enabled sys_menu

Dreamfire,

hdr.bmp

cnr.bmp

cls.bmp

STEAM.au3

Edited by Dreamfire
Link to comment
Share on other sites

When trying to add the code

Opt("GUIOnEventMode",1)

for items in your window that I need to make clickable.. it maxes out the CPU.

Can you post an example, i'd like the recreate what you mean.

[EDIT 1]

My CPU stays at around 27% (QuadCore) if i use Opt("GUIOnEventMode",1).

CPU stays idle with GUIGetMsg() loop, maybe someone knows?

Edited by Dreamfire
Link to comment
Share on other sites

maybe you should either use the helpfile... or search the general help forums its very simple

Link to comment
Share on other sites

  • 9 months later...

I dont like steam for sticking its nose into recent games :mellow:

But the fact that GUI's like those are possible in AUTOIT is great news to me :(

I wonder if AUTOIT could make a GUI like this Posted Image

or similar ?

If so, how much of a performance issue are we talking about ? Am just curious if those cool GUI's are only possible in C family languages.

Link to comment
Share on other sites

@dirty:

Whatever language was used to make this 'cool' GUI used the Windows API to do it, which is fully available in AutoIt with DLLCalls. Performance would not be my major concern: GUI code is lightweight in comparison to most workloads, and this won't change because you added exotic backgrounds or controls.

Link to comment
Share on other sites

I dont like steam for sticking its nose into recent games :mellow:

But the fact that GUI's like those are possible in AUTOIT is great news to me :(

I wonder if AUTOIT could make a GUI like this Posted Image

or similar ?

If so, how much of a performance issue are we talking about ? Am just curious if those cool GUI's are only possible in C family languages.

There's a cool little UDF that will use BMP's as transparent UI's. So that particular ui you mentioned isn't that far fetched. And the performance isn't hindered either.

-_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë 맧ëñ§ë øƒ !ïƒë.

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...