Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; GUI Module for Skills
- #Include <WindowsConstants.au3>
- #include <EditConstants.au3>
- Opt("GUIOnEventMode", 1)
- Func _GUIs_LoginScreen(ByRef $hWin, ByRef $arr_hControls, $arr_sTranslation)
- #cs
- Funzione per la creazione della prima schermata, dove verranno mostrati due campi per il
- login con il proprio profilo e un pulsante per la creazione di un nuovo profilo.
- Parametri:
- 1 - Variabile già dichiarata per l'handle della GUICreate
- 2 - Array bidimensionale già dichiarato con dimensione $[4][7]
- 3 - Array della traduzione
- 4 - Array delle informazioni addizionali
- Verrà utilizzato in questo modo:
- $[0][*]
- *0: Input - Username
- *1: Input - Password
- $[1][*]
- *0: Button - Login
- *1: Button - Nuovo profilo
- $[2][*]
- *0: Pic - Sfondo
- $[3][*]
- *0: Label - Username
- *1: Label - Password
- *3: Label - Titolo
- *4: Label - Sottotitolo
- *5: Label - Copyright
- *6: Label - Versione
- #ce
- $iCentralElementWidth = 300
- $sT1Font = "Courier New"
- $hWin = GUICreate( _
- $arr_sTranslation[$TR_LOGIN_GAMETITLE], _ ; GUI Title
- @DesktopWidth, _ ; Width
- @DesktopHeight, _ ; Height
- 0, _ ; Left
- 0, _ ; Top
- $WS_POPUP _ ; Style
- )
- $arr_hControls[0][0] = GUICtrlCreateInput( _
- "", _ ; Text
- @DesktopWidth / 2 - 300 / 2, _ ; Left
- @DesktopHeight / 2 + 22, _ ; Top
- $iCentralElementWidth _ ; Width
- )
- $arr_hControls[0][1] = GUICtrlCreateInput( _
- "", _ ; Text
- @DesktopWidth / 2 - 300 / 2, _ ; Left
- @DesktopHeight / 2 + 104, _ ; Top
- $iCentralElementWidth, _ ; Width
- Default, _ ; Height
- $ES_PASSWORD _ ; Style
- )
- $arr_hControls[3][0] = GUICtrlCreateLabel( _
- $arr_sTranslation[$TR_LOGIN_USERNAME], _ ; Text
- @DesktopWidth / 2 - $iCentralElementWidth / 2, _ ; Left
- @DesktopHeight / 2, _ ; Top
- $iCentralElementWidth _ ; Width
- )
- $arr_hControls[3][1] = GUICtrlCreateLabel( _
- $arr_sTranslation[$TR_LOGIN_PASSWORD], _ ; Text
- @DesktopWidth / 2 - $iCentralElementWidth / 2, _ ; Left
- @DesktopHeight / 2 + 80, _ ; Top
- $iCentralElementWidth _ ; Width
- )
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- $arr_hControls[3][5] = GUICtrlCreateLabel( _
- $arr_sTranslation[$TR_LOGIN_COPYRIGHT], _ ; Text
- 15, _ ; Left
- @DesktopHeight - 25, _ ; Top
- @DesktopWidth - 15 * 2 _ ; Width
- )
- GUISetBkColor(0x000000, $hWin)
- GUICtrlSetColor($arr_hControls[3][0], 0xFFFFFF)
- GUICtrlSetColor($arr_hControls[3][1], 0xFFFFFF)
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- GUICtrlSetColor($arr_hControls[3][5], 0xFFFFFF)
- GUICtrlSetFont($arr_hControls[0][0], 9.5, 400, 0, $sT1Font)
- GUICtrlSetFont($arr_hControls[0][1], 9.5, 400, 0, $sT1Font)
- GUICtrlSetFont($arr_hControls[3][0], 9.5, 400, 0, $sT1Font)
- GUICtrlSetFont($arr_hControls[3][1], 9.5, 400, 0, $sT1Font)
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- GUICtrlSetFont($arr_hControls[3][5], 11, 400, 0, $sT1Font)
- GUISetCursor(3, 1, $hWin)
- GUISetState(@SW_SHOW, $hWin)
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement