Re: [Class] ImageButton - 1.5.00.00 - 20201230
Posted: 30 Dec 2020, 11:28
Thanks for the update!
Let's help each other out
https://www.autohotkey.com/boards/
README.mdGamesOfFreak wrote:I need an Tutorial how to implement the Images.
Code: Select all
Gui, Add, Button, w60 h18 hwndB1 vB1, B1
Opt1 := {0:1, 1: 0x9b451d, 2:0x9b451d, 3:0x9b451d, 4:"White", 5:8, 6:0x211b18}
; opt2: hover
Opt2 := {2: 0xe6b553, 3:0xe6b553, 4: "White"}
; opt3: click
Opt3 := {4: "White"}
If !ImageButton.Create(B1, Opt1, Opt2, Opt3)
MsgBox, 0, ImageButton Error Btn2, % ImageButton.LastError
; -----------------------------------
GuiControlGet, hwnd, Hwnd , B1
GuiControlGet, text,,B1
ControlGetText, text2, , ahk_id %hwnd%
; blank output here ->
fileappend hwnd:%hwnd% text:%text% text2: %text2%`n,*
; -----------------------------------
Gui, Add, Button, w60 h18 hwndB2 vB2, B2
; -----------------------------------
GuiControlGet, hwnd, Hwnd , B2
GuiControlGet, text,,B2
ControlGetText, text2, , ahk_id %hwnd%
fileappend hwnd:%hwnd% text:%text% text2: %text2%`n,*
; -----------------------------------
gui,show
Code: Select all
; Hide buttons's caption
ControlSetText, , , ahk_id %HWND%
But sometimes the controls lose all the colors and style, and when i click for example a tab, it does restore the colors, have you seen this before?
Code: Select all
; Draw the text
DllCall("Gdiplus.dll\GdipDrawString", "Ptr", PGRAPHICS, "WStr", BtnCaption, "Int", -1
, "Ptr", PFONT, "Ptr", &RECT, "Ptr", HFORMAT, "Ptr", PBRUSH)
Code: Select all
if (oCaption := Option.caption)
{
; get the current button font and size
GetFont := GetFont(hwnd)
fname := % getfont.fontname
fsize := % getfont.size
fileappend > font:%fname%`nsize:%fsize% hwnd:%hwnd% `n`n,*
StringWidth := StringWidth(BtnCaption,GetFont.FontName,GetFont.Size)
_left += StringWidth
;fileappend StringWidth:%StringWidth% _left:%_left% `n`n,*
for textColor,text in oCaption
{
; add space between the text
BtnCaption := " "
BtnCaption .= text
; try to measure the current caption size
StringWidth := StringWidth(BtnCaption,GetFont.FontName,GetFont.Size)
NumPut( _left , RECT, 0, "Float")
_left += StringWidth
;Len := Round(StringWidth/StrLen(BtnCaption))
NumPut(BtnH, RECT, 12, "Float")
DllCall("Gdiplus.dll\GdipCreateSolidFill", "UInt", textColor, "PtrP", PBRUSH)
; Draw the text
DllCall("Gdiplus.dll\GdipDrawString", "Ptr", PGRAPHICS, "WStr", BtnCaption, "Int", -1
, "Ptr", PFONT, "Ptr", &RECT, "Ptr", HFORMAT, "Ptr", PBRUSH)
}
}
; -----------------------------------------
; FUNCTIONS
StringWidth(String, Font:="", FontSize:=10)
{
;fileappend font -> %Font% `n,*
Gui,StringWidth: -DPIScale
Gui StringWidth:Font, s%FontSize%, %Font%
Gui StringWidth:Add, Text, R1, %String%
GuiControlGet T, StringWidth:Pos, Static1
Gui StringWidth:Destroy
return TW
}
GetFont(hWnd) {
static WM_GETFONT := 0x31
hFont := DllCall("SendMessage", "Ptr", hWnd, "UInt", WM_GETFONT, "Ptr", 0, "Ptr", 0, "Ptr")
if !hFont {
Gui, %hWnd%: Add, Text, xp yp wp hp Hidden hwndhText
hFont := DllCall("SendMessage", "Ptr", hText, "UInt", WM_GETFONT, "Ptr", 0, "Ptr", 0, "Ptr")
DllCall("DestroyWindow", "Ptr", hText)
}
sizeLF := DllCall("GetObject", "Ptr", hFont, "Int", 0, "Ptr", 0)
VarSetCapacity(LOGFONT, sizeLF, 0)
DllCall("GetObject", "Ptr", hFont, "Int", sizeLF, "Ptr", &LOGFONT)
Size :=-NumGet(LOGFONT, "Int")*72//A_ScreenDPI
Weight := NumGet(LOGFONT, 16, "Int")
Italic := NumGet(LOGFONT, 20, "Char")
Underline := NumGet(LOGFONT, 21, "Char")
Strike := NumGet(LOGFONT, 22, "Char")
Quality := NumGet(LOGFONT, 26, "Char")
FontName := StrGet(&LOGFONT + 28)
res := {}
for k, v in ["Size", "Weight", "Italic", "Underline", "Strike", "Quality", "FontName"]
res[v] := %v%
Return res
}
; -----------------------------------------
Code: Select all
gui,font,s22,consolas
gui,add,button,w400 h20 hwndHwnd left,button test
Opt1 := { 1:5, 2:0x070707, caption:{ 0xFF1cc400:"some", 0xFFff0000:"text" }, 3:0x070707, 4:0xffffff, 7:0x070707 }
ImageButton.Create(hwnd,Opt1)
gui,show,h200
return
Code: Select all
ms:= Gdip_MeasureString(pGraphics, BtnCaption, hFont, hFormat, ByRef RectF)
fileappend ms:%ms% `n`n,*
Code: Select all
DllCall("Gdiplus.dll\GdipDrawString"
Code: Select all
Gui +ToolWindow
Gui, Add, Button, w100 h25 gStartStop vButtonText, Start
Gui, Show, , Test
Return
StartStop:
GuiControlGet, ButtonText
If ( ButtonText = "Start" )
{
GuiControl,, ButtonText, Stop
GoSub, Start
}
Else
{
GuiControl,, ButtonText, Start
GoSub, Stop
}
Return
Start:
Return
Stop:
Return
GuiClose:
ExitApp
GuiContextMenu:
reload
Code: Select all
#NoEnv
SetBatchLines, -1
; Class ImageButton by just me
; https://www.autohotkey.com/boards/viewtopic.php?t=1103
#Include Class_ImageButton.ahk
; for v1.5 add UseGDIP.ahk or Include them into Class_ImageButton.ahk
; #Include UseGDIP.ahk
Gui, Margin, 20, 20
Gui, Font, s11 normal, Segoe UI
; ---------------------------------------------------------------------------------------
Gui, Add, Button, xm ym w80 h24 hWndhBtn11, % "Critical"
IBBtnStyles := [ [0, 0x80F0F0F0, , , 0, , 0x80D43F3A, 1] ; normal
, [0, 0x80F0B9B8, , , 0, , 0x80D43F3A, 1] ; hover
, [0, 0x80E27C79, , , 0, , 0x80D43F3A, 1] ; pressed
, [0, 0x80F0F0F0, , , 0, , 0x80D43F3A, 1] ]
ImageButton.Create(hBtn11, IBBtnStyles*)
Gui, Add, Button, x+20 yp w80 h24 hWndhBtn12, % "Warning"
IBBtnStyles := [ [0, 0x80F0F0F0, , , 0, , 0x80F0AD4E, 1] ; normal
, [0, 0x80FCEFDC, , , 0, , 0x80F0AD4E, 1] ; hover
, [0, 0x80F6CE95, , , 0, , 0x80F0AD4E, 1] ; pressed
, [0, 0x80F0F0F0, , , 0, , 0x80F0AD4E, 1] ]
ImageButton.Create(hBtn12, IBBtnStyles*)
Gui, Add, Button, x+20 yp w80 h24 hWndhBtn13, % "Success"
IBBtnStyles := [ [0, 0x80F0F0F0, , , 0, , 0x805CB85C, 1] ; normal
, [0, 0x80C6E6C6, , , 0, , 0x805CB85C, 1] ; hover
, [0, 0x8091CF91, , , 0, , 0x805CB85C, 1] ; pressed
, [0, 0x80F0F0F0, , , 0, , 0x805CB85C, 1] ]
ImageButton.Create(hBtn13, IBBtnStyles*)
Gui, Add, Button, x+20 yp w80 h24 hWndhBtn14, % "Info"
IBBtnStyles := [ [0, 0x80F0F0F0, , , 0, , 0x8046B8DA, 1] ; normal
, [0, 0x80C6E9F4, , , 0, , 0x8046B8DA, 1] ; hover
, [0, 0x8086D0E7, , , 0, , 0x8046B8DA, 1] ; pressed
, [0, 0x80F0F0F0, , , 0, , 0x8046B8DA, 1] ]
ImageButton.Create(hBtn14, IBBtnStyles*)
; ---------------------------------------------------------------------------------------
Gui, Add, Button, x+20 yp w80 h24 hWndhBtn21, % "Critical"
IBBtnStyles := [ [0, 0x80F0B9B8, , , 0, , 0x80D43F3A, 1] ; normal
, [0, 0x80E27C79, , , 0, , 0x80D43F3A, 1] ; hover
, [0, 0x80D43F3A, , , 0, , 0x80D43F3A, 1] ; pressed
, [0, 0x80F0F0F0, , , 0, , 0x80D43F3A, 1] ]
ImageButton.Create(hBtn21, IBBtnStyles*)
Gui, Add, Button, x+20 yp w80 h24 hWndhBtn22, % "Warning"
IBBtnStyles := [ [0, 0x80FCEFDC, , , 0, , 0x80F0AD4E, 1] ; normal
, [0, 0x80F6CE95, , , 0, , 0x80F0AD4E, 1] ; hover
, [0, 0x80F0AD4E, , , 0, , 0x80F0AD4E, 1] ; pressed
, [0, 0x80F0F0F0, , , 0, , 0x80F0AD4E, 1] ]
ImageButton.Create(hBtn22, IBBtnStyles*)
Gui, Add, Button, x+20 yp w80 h24 hWndhBtn23, % "Success"
IBBtnStyles := [ [0, 0x80C6E6C6, , , 0, , 0x805CB85C, 1] ; normal
, [0, 0x8091CF91, , , 0, , 0x805CB85C, 1] ; hover
, [0, 0x805CB85C, , , 0, , 0x805CB85C, 1] ; pressed
, [0, 0x80F0F0F0, , , 0, , 0x805CB85C, 1] ]
ImageButton.Create(hBtn23, IBBtnStyles*)
Gui, Add, Button, x+20 yp w80 h24 hWndhBtn24, % "Info"
IBBtnStyles := [ [0, 0x80C6E9F4, , , 0, , 0x8046B8DA, 1] ; normal
, [0, 0x8086D0E7, , , 0, , 0x8046B8DA, 1] ; hover
, [0, 0x8046B8DA, , , 0, , 0x8046B8DA, 1] ; pressed
, [0, 0x80F0F0F0, , , 0, , 0x8046B8DA, 1] ]
ImageButton.Create(hBtn24, IBBtnStyles*)
; ---------------------------------------------------------------------------------------
Gui, Add, Button, xm y+20 w80 h24 hWndhBtn31, % "Critical"
IBBtnStyles := [ [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x80D43F3A, 1] ; normal
, [0, 0x80F0B9B8, , , 8, 0xFFF0F0F0, 0x80D43F3A, 1] ; hover
, [0, 0x80E27C79, , , 8, 0xFFF0F0F0, 0x80D43F3A, 1] ; pressed
, [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x80D43F3A, 1] ]
ImageButton.Create(hBtn31, IBBtnStyles*)
Gui, Add, Button, x+20 yp w80 h24 hWndhBtn32, % "Warning"
IBBtnStyles := [ [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x80F0AD4E, 1] ; normal
, [0, 0x80FCEFDC, , , 8, 0xFFF0F0F0, 0x80F0AD4E, 1] ; hover
, [0, 0x80F6CE95, , , 8, 0xFFF0F0F0, 0x80F0AD4E, 1] ; pressed
, [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x80F0AD4E, 1] ]
ImageButton.Create(hBtn32, IBBtnStyles*)
Gui, Add, Button, x+20 yp w80 h24 hWndhBtn33, % "Success"
IBBtnStyles := [ [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x805CB85C, 1] ; normal
, [0, 0x80C6E6C6, , , 8, 0xFFF0F0F0, 0x805CB85C, 1] ; hover
, [0, 0x8091CF91, , , 8, 0xFFF0F0F0, 0x805CB85C, 1] ; pressed
, [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x805CB85C, 1] ]
ImageButton.Create(hBtn33, IBBtnStyles*)
Gui, Add, Button, x+20 yp w80 h24 hWndhBtn34, % "Info"
IBBtnStyles := [ [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x8046B8DA, 1] ; normal
, [0, 0x80C6E9F4, , , 8, 0xFFF0F0F0, 0x8046B8DA, 1] ; hover
, [0, 0x8086D0E7, , , 8, 0xFFF0F0F0, 0x8046B8DA, 1] ; pressed
, [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x8046B8DA, 1] ]
ImageButton.Create(hBtn34, IBBtnStyles*)
; ---------------------------------------------------------------------------------------
Gui, Add, Button, x+20 yp w80 h24 hWndhBtn41, % "Critical"
IBBtnStyles := [ [0, 0x80F0B9B8, , , 8, 0xFFF0F0F0, 0x80D43F3A, 1] ; normal
, [0, 0x80E27C79, , , 8, 0xFFF0F0F0, 0x80D43F3A, 1] ; hover
, [0, 0x80D43F3A, , , 8, 0xFFF0F0F0, 0x80D43F3A, 1] ; pressed
, [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x80D43F3A, 1] ]
ImageButton.Create(hBtn41, IBBtnStyles*)
Gui, Add, Button, x+20 yp w80 h24 hWndhBtn42, % "Warning"
IBBtnStyles := [ [0, 0x80FCEFDC, , , 8, 0xFFF0F0F0, 0x80F0AD4E, 1] ; normal
, [0, 0x80F6CE95, , , 8, 0xFFF0F0F0, 0x80F0AD4E, 1] ; hover
, [0, 0x80F0AD4E, , , 8, 0xFFF0F0F0, 0x80F0AD4E, 1] ; pressed
, [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x80F0AD4E, 1] ]
ImageButton.Create(hBtn42, IBBtnStyles*)
Gui, Add, Button, x+20 yp w80 h24 hWndhBtn43, % "Success"
IBBtnStyles := [ [0, 0x80C6E6C6, , , 8, 0xFFF0F0F0, 0x805CB85C, 1] ; normal
, [0, 0x8091CF91, , , 8, 0xFFF0F0F0, 0x805CB85C, 1] ; hover
, [0, 0x805CB85C, , , 8, 0xFFF0F0F0, 0x805CB85C, 1] ; pressed
, [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x805CB85C, 1] ]
ImageButton.Create(hBtn43, IBBtnStyles*)
Gui, Add, Button, x+20 yp w80 h24 hWndhBtn44, % "Info"
IBBtnStyles := [ [0, 0x80C6E9F4, , , 8, 0xFFF0F0F0, 0x8046B8DA, 1] ; normal
, [0, 0x8086D0E7, , , 8, 0xFFF0F0F0, 0x8046B8DA, 1] ; hover
, [0, 0x8046B8DA, , , 8, 0xFFF0F0F0, 0x8046B8DA, 1] ; pressed
, [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x8046B8DA, 1] ]
ImageButton.Create(hBtn44, IBBtnStyles*)
; ---------------------------------------------------------------------------------------
Gui, Add, Button, xm y+20 w200 h40 hWndhBtn51, % "Critical"
IBBtnStyles := [ [0, 0x80F0F0F0, , , 0, , 0x80D43F3A, 2] ; normal
, [0, 0x80F0B9B8, , , 0, , 0x80D43F3A, 2] ; hover
, [0, 0x80E27C79, , , 0, , 0x80D43F3A, 2] ; pressed
, [0, 0x80F0F0F0, , , 0, , 0x80D43F3A, 2] ]
ImageButton.Create(hBtn51, IBBtnStyles*)
Gui, Add, Button, x+20 yp w200 h40 hWndhBtn52, % "Warning"
IBBtnStyles := [ [0, 0x80F0F0F0, , , 0, , 0x80F0AD4E, 2] ; normal
, [0, 0x80FCEFDC, , , 0, , 0x80F0AD4E, 2] ; hover
, [0, 0x80F6CE95, , , 0, , 0x80F0AD4E, 2] ; pressed
, [0, 0x80F0F0F0, , , 0, , 0x80F0AD4E, 2] ]
ImageButton.Create(hBtn52, IBBtnStyles*)
Gui, Add, Button, x+20 yp w200 h40 hWndhBtn53, % "Success"
IBBtnStyles := [ [0, 0x80F0F0F0, , , 0, , 0x805CB85C, 2] ; normal
, [0, 0x80C6E6C6, , , 0, , 0x805CB85C, 2] ; hover
, [0, 0x8091CF91, , , 0, , 0x805CB85C, 2] ; pressed
, [0, 0x80F0F0F0, , , 0, , 0x805CB85C, 2] ]
ImageButton.Create(hBtn53, IBBtnStyles*)
Gui, Add, Button, x+20 yp w200 h40 hWndhBtn54, % "Info"
IBBtnStyles := [ [0, 0x80F0F0F0, , , 0, , 0x8046B8DA, 2] ; normal
, [0, 0x80C6E9F4, , , 0, , 0x8046B8DA, 2] ; hover
, [0, 0x8086D0E7, , , 0, , 0x8046B8DA, 2] ; pressed
, [0, 0x80F0F0F0, , , 0, , 0x8046B8DA, 2] ]
ImageButton.Create(hBtn54, IBBtnStyles*)
; ---------------------------------------------------------------------------------------
Gui, Add, Button, xm y+20 w200 h40 hWndhBtn61, % "Critical"
IBBtnStyles := [ [0, 0x80F0B9B8, , , 0, , 0x80D43F3A, 2] ; normal
, [0, 0x80E27C79, , , 0, , 0x80D43F3A, 2] ; hover
, [0, 0x80D43F3A, , , 0, , 0x80D43F3A, 2] ; pressed
, [0, 0x80F0F0F0, , , 0, , 0x80D43F3A, 2] ]
ImageButton.Create(hBtn61, IBBtnStyles*)
Gui, Add, Button, x+20 yp w200 h40 hWndhBtn62, % "Warning"
IBBtnStyles := [ [0, 0x80FCEFDC, , , 0, , 0x80F0AD4E, 2] ; normal
, [0, 0x80F6CE95, , , 0, , 0x80F0AD4E, 2] ; hover
, [0, 0x80F0AD4E, , , 0, , 0x80F0AD4E, 2] ; pressed
, [0, 0x80F0F0F0, , , 0, , 0x80F0AD4E, 2] ]
ImageButton.Create(hBtn62, IBBtnStyles*)
Gui, Add, Button, x+20 yp w200 h40 hWndhBtn63, % "Success"
IBBtnStyles := [ [0, 0x80C6E6C6, , , 0, , 0x805CB85C, 2] ; normal
, [0, 0x8091CF91, , , 0, , 0x805CB85C, 2] ; hover
, [0, 0x805CB85C, , , 0, , 0x805CB85C, 2] ; pressed
, [0, 0x80F0F0F0, , , 0, , 0x805CB85C, 2] ]
ImageButton.Create(hBtn63, IBBtnStyles*)
Gui, Add, Button, x+20 yp w200 h40 hWndhBtn64, % "Info"
IBBtnStyles := [ [0, 0x80C6E9F4, , , 0, , 0x8046B8DA, 2] ; normal
, [0, 0x8086D0E7, , , 0, , 0x8046B8DA, 2] ; hover
, [0, 0x8046B8DA, , , 0, , 0x8046B8DA, 2] ; pressed
, [0, 0x80F0F0F0, , , 0, , 0x8046B8DA, 2] ]
ImageButton.Create(hBtn64, IBBtnStyles*)
; ---------------------------------------------------------------------------------------
Gui, Add, Button, xm y+20 w200 h40 hWndhBtn71, % "Critical"
IBBtnStyles := [ [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x80D43F3A, 2] ; normal
, [0, 0x80F0B9B8, , , 8, 0xFFF0F0F0, 0x80D43F3A, 2] ; hover
, [0, 0x80E27C79, , , 8, 0xFFF0F0F0, 0x80D43F3A, 2] ; pressed
, [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x80D43F3A, 2] ]
ImageButton.Create(hBtn71, IBBtnStyles*)
Gui, Add, Button, x+20 yp w200 h40 hWndhBtn72, % "Warning"
IBBtnStyles := [ [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x80F0AD4E, 2] ; normal
, [0, 0x80FCEFDC, , , 8, 0xFFF0F0F0, 0x80F0AD4E, 2] ; hover
, [0, 0x80F6CE95, , , 8, 0xFFF0F0F0, 0x80F0AD4E, 2] ; pressed
, [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x80F0AD4E, 2] ]
ImageButton.Create(hBtn72, IBBtnStyles*)
Gui, Add, Button, x+20 yp w200 h40 hWndhBtn73, % "Success"
IBBtnStyles := [ [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x805CB85C, 2] ; normal
, [0, 0x80C6E6C6, , , 8, 0xFFF0F0F0, 0x805CB85C, 2] ; hover
, [0, 0x8091CF91, , , 8, 0xFFF0F0F0, 0x805CB85C, 2] ; pressed
, [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x805CB85C, 2] ]
ImageButton.Create(hBtn73, IBBtnStyles*)
Gui, Add, Button, x+20 yp w200 h40 hWndhBtn74, % "Info"
IBBtnStyles := [ [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x8046B8DA, 2] ; normal
, [0, 0x80C6E9F4, , , 8, 0xFFF0F0F0, 0x8046B8DA, 2] ; hover
, [0, 0x8086D0E7, , , 8, 0xFFF0F0F0, 0x8046B8DA, 2] ; pressed
, [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x8046B8DA, 2] ]
ImageButton.Create(hBtn74, IBBtnStyles*)
; ---------------------------------------------------------------------------------------
Gui, Show,, Image Buttons
return
GuiClose:
GuiEscape:
ExitApp
What a mad lad, thank you for your example, hoping to see this with AHK 2 (unlikely but one can only hope lol)jNizM wrote: ↑09 Jul 2021, 07:59Example of Bootstrap like Buttons
Code: Select all
#NoEnv SetBatchLines, -1 ; Class ImageButton by just me ; https://www.autohotkey.com/boards/viewtopic.php?t=1103 #Include Class_ImageButton.ahk Gui, Margin, 20, 20 Gui, Font, s11 normal, Segoe UI ; --------------------------------------------------------------------------------------- Gui, Add, Button, xm ym w80 h24 hWndhBtn11, % "Critical" IBBtnStyles := [ [0, 0x80F0F0F0, , , 0, , 0x80D43F3A, 1] ; normal , [0, 0x80F0B9B8, , , 0, , 0x80D43F3A, 1] ; hover , [0, 0x80E27C79, , , 0, , 0x80D43F3A, 1] ; pressed , [0, 0x80F0F0F0, , , 0, , 0x80D43F3A, 1] ] ImageButton.Create(hBtn11, IBBtnStyles*) Gui, Add, Button, x+20 yp w80 h24 hWndhBtn12, % "Warning" IBBtnStyles := [ [0, 0x80F0F0F0, , , 0, , 0x80F0AD4E, 1] ; normal , [0, 0x80FCEFDC, , , 0, , 0x80F0AD4E, 1] ; hover , [0, 0x80F6CE95, , , 0, , 0x80F0AD4E, 1] ; pressed , [0, 0x80F0F0F0, , , 0, , 0x80F0AD4E, 1] ] ImageButton.Create(hBtn12, IBBtnStyles*) Gui, Add, Button, x+20 yp w80 h24 hWndhBtn13, % "Success" IBBtnStyles := [ [0, 0x80F0F0F0, , , 0, , 0x805CB85C, 1] ; normal , [0, 0x80C6E6C6, , , 0, , 0x805CB85C, 1] ; hover , [0, 0x8091CF91, , , 0, , 0x805CB85C, 1] ; pressed , [0, 0x80F0F0F0, , , 0, , 0x805CB85C, 1] ] ImageButton.Create(hBtn13, IBBtnStyles*) Gui, Add, Button, x+20 yp w80 h24 hWndhBtn14, % "Info" IBBtnStyles := [ [0, 0x80F0F0F0, , , 0, , 0x8046B8DA, 1] ; normal , [0, 0x80C6E9F4, , , 0, , 0x8046B8DA, 1] ; hover , [0, 0x8086D0E7, , , 0, , 0x8046B8DA, 1] ; pressed , [0, 0x80F0F0F0, , , 0, , 0x8046B8DA, 1] ] ImageButton.Create(hBtn14, IBBtnStyles*) ; --------------------------------------------------------------------------------------- Gui, Add, Button, x+20 yp w80 h24 hWndhBtn21, % "Critical" IBBtnStyles := [ [0, 0x80F0B9B8, , , 0, , 0x80D43F3A, 1] ; normal , [0, 0x80E27C79, , , 0, , 0x80D43F3A, 1] ; hover , [0, 0x80D43F3A, , , 0, , 0x80D43F3A, 1] ; pressed , [0, 0x80F0F0F0, , , 0, , 0x80D43F3A, 1] ] ImageButton.Create(hBtn21, IBBtnStyles*) Gui, Add, Button, x+20 yp w80 h24 hWndhBtn22, % "Warning" IBBtnStyles := [ [0, 0x80FCEFDC, , , 0, , 0x80F0AD4E, 1] ; normal , [0, 0x80F6CE95, , , 0, , 0x80F0AD4E, 1] ; hover , [0, 0x80F0AD4E, , , 0, , 0x80F0AD4E, 1] ; pressed , [0, 0x80F0F0F0, , , 0, , 0x80F0AD4E, 1] ] ImageButton.Create(hBtn22, IBBtnStyles*) Gui, Add, Button, x+20 yp w80 h24 hWndhBtn23, % "Success" IBBtnStyles := [ [0, 0x80C6E6C6, , , 0, , 0x805CB85C, 1] ; normal , [0, 0x8091CF91, , , 0, , 0x805CB85C, 1] ; hover , [0, 0x805CB85C, , , 0, , 0x805CB85C, 1] ; pressed , [0, 0x80F0F0F0, , , 0, , 0x805CB85C, 1] ] ImageButton.Create(hBtn23, IBBtnStyles*) Gui, Add, Button, x+20 yp w80 h24 hWndhBtn24, % "Info" IBBtnStyles := [ [0, 0x80C6E9F4, , , 0, , 0x8046B8DA, 1] ; normal , [0, 0x8086D0E7, , , 0, , 0x8046B8DA, 1] ; hover , [0, 0x8046B8DA, , , 0, , 0x8046B8DA, 1] ; pressed , [0, 0x80F0F0F0, , , 0, , 0x8046B8DA, 1] ] ImageButton.Create(hBtn24, IBBtnStyles*) ; --------------------------------------------------------------------------------------- Gui, Add, Button, xm y+20 w80 h24 hWndhBtn31, % "Critical" IBBtnStyles := [ [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x80D43F3A, 1] ; normal , [0, 0x80F0B9B8, , , 8, 0xFFF0F0F0, 0x80D43F3A, 1] ; hover , [0, 0x80E27C79, , , 8, 0xFFF0F0F0, 0x80D43F3A, 1] ; pressed , [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x80D43F3A, 1] ] ImageButton.Create(hBtn31, IBBtnStyles*) Gui, Add, Button, x+20 yp w80 h24 hWndhBtn32, % "Warning" IBBtnStyles := [ [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x80F0AD4E, 1] ; normal , [0, 0x80FCEFDC, , , 8, 0xFFF0F0F0, 0x80F0AD4E, 1] ; hover , [0, 0x80F6CE95, , , 8, 0xFFF0F0F0, 0x80F0AD4E, 1] ; pressed , [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x80F0AD4E, 1] ] ImageButton.Create(hBtn32, IBBtnStyles*) Gui, Add, Button, x+20 yp w80 h24 hWndhBtn33, % "Success" IBBtnStyles := [ [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x805CB85C, 1] ; normal , [0, 0x80C6E6C6, , , 8, 0xFFF0F0F0, 0x805CB85C, 1] ; hover , [0, 0x8091CF91, , , 8, 0xFFF0F0F0, 0x805CB85C, 1] ; pressed , [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x805CB85C, 1] ] ImageButton.Create(hBtn33, IBBtnStyles*) Gui, Add, Button, x+20 yp w80 h24 hWndhBtn34, % "Info" IBBtnStyles := [ [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x8046B8DA, 1] ; normal , [0, 0x80C6E9F4, , , 8, 0xFFF0F0F0, 0x8046B8DA, 1] ; hover , [0, 0x8086D0E7, , , 8, 0xFFF0F0F0, 0x8046B8DA, 1] ; pressed , [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x8046B8DA, 1] ] ImageButton.Create(hBtn34, IBBtnStyles*) ; --------------------------------------------------------------------------------------- Gui, Add, Button, x+20 yp w80 h24 hWndhBtn41, % "Critical" IBBtnStyles := [ [0, 0x80F0B9B8, , , 8, 0xFFF0F0F0, 0x80D43F3A, 1] ; normal , [0, 0x80E27C79, , , 8, 0xFFF0F0F0, 0x80D43F3A, 1] ; hover , [0, 0x80D43F3A, , , 8, 0xFFF0F0F0, 0x80D43F3A, 1] ; pressed , [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x80D43F3A, 1] ] ImageButton.Create(hBtn41, IBBtnStyles*) Gui, Add, Button, x+20 yp w80 h24 hWndhBtn42, % "Warning" IBBtnStyles := [ [0, 0x80FCEFDC, , , 8, 0xFFF0F0F0, 0x80F0AD4E, 1] ; normal , [0, 0x80F6CE95, , , 8, 0xFFF0F0F0, 0x80F0AD4E, 1] ; hover , [0, 0x80F0AD4E, , , 8, 0xFFF0F0F0, 0x80F0AD4E, 1] ; pressed , [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x80F0AD4E, 1] ] ImageButton.Create(hBtn42, IBBtnStyles*) Gui, Add, Button, x+20 yp w80 h24 hWndhBtn43, % "Success" IBBtnStyles := [ [0, 0x80C6E6C6, , , 8, 0xFFF0F0F0, 0x805CB85C, 1] ; normal , [0, 0x8091CF91, , , 8, 0xFFF0F0F0, 0x805CB85C, 1] ; hover , [0, 0x805CB85C, , , 8, 0xFFF0F0F0, 0x805CB85C, 1] ; pressed , [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x805CB85C, 1] ] ImageButton.Create(hBtn43, IBBtnStyles*) Gui, Add, Button, x+20 yp w80 h24 hWndhBtn44, % "Info" IBBtnStyles := [ [0, 0x80C6E9F4, , , 8, 0xFFF0F0F0, 0x8046B8DA, 1] ; normal , [0, 0x8086D0E7, , , 8, 0xFFF0F0F0, 0x8046B8DA, 1] ; hover , [0, 0x8046B8DA, , , 8, 0xFFF0F0F0, 0x8046B8DA, 1] ; pressed , [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x8046B8DA, 1] ] ImageButton.Create(hBtn44, IBBtnStyles*) ; --------------------------------------------------------------------------------------- Gui, Add, Button, xm y+20 w200 h40 hWndhBtn51, % "Critical" IBBtnStyles := [ [0, 0x80F0F0F0, , , 0, , 0x80D43F3A, 2] ; normal , [0, 0x80F0B9B8, , , 0, , 0x80D43F3A, 2] ; hover , [0, 0x80E27C79, , , 0, , 0x80D43F3A, 2] ; pressed , [0, 0x80F0F0F0, , , 0, , 0x80D43F3A, 2] ] ImageButton.Create(hBtn51, IBBtnStyles*) Gui, Add, Button, x+20 yp w200 h40 hWndhBtn52, % "Warning" IBBtnStyles := [ [0, 0x80F0F0F0, , , 0, , 0x80F0AD4E, 2] ; normal , [0, 0x80FCEFDC, , , 0, , 0x80F0AD4E, 2] ; hover , [0, 0x80F6CE95, , , 0, , 0x80F0AD4E, 2] ; pressed , [0, 0x80F0F0F0, , , 0, , 0x80F0AD4E, 2] ] ImageButton.Create(hBtn52, IBBtnStyles*) Gui, Add, Button, x+20 yp w200 h40 hWndhBtn53, % "Success" IBBtnStyles := [ [0, 0x80F0F0F0, , , 0, , 0x805CB85C, 2] ; normal , [0, 0x80C6E6C6, , , 0, , 0x805CB85C, 2] ; hover , [0, 0x8091CF91, , , 0, , 0x805CB85C, 2] ; pressed , [0, 0x80F0F0F0, , , 0, , 0x805CB85C, 2] ] ImageButton.Create(hBtn53, IBBtnStyles*) Gui, Add, Button, x+20 yp w200 h40 hWndhBtn54, % "Info" IBBtnStyles := [ [0, 0x80F0F0F0, , , 0, , 0x8046B8DA, 2] ; normal , [0, 0x80C6E9F4, , , 0, , 0x8046B8DA, 2] ; hover , [0, 0x8086D0E7, , , 0, , 0x8046B8DA, 2] ; pressed , [0, 0x80F0F0F0, , , 0, , 0x8046B8DA, 2] ] ImageButton.Create(hBtn54, IBBtnStyles*) ; --------------------------------------------------------------------------------------- Gui, Add, Button, xm y+20 w200 h40 hWndhBtn61, % "Critical" IBBtnStyles := [ [0, 0x80F0B9B8, , , 0, , 0x80D43F3A, 2] ; normal , [0, 0x80E27C79, , , 0, , 0x80D43F3A, 2] ; hover , [0, 0x80D43F3A, , , 0, , 0x80D43F3A, 2] ; pressed , [0, 0x80F0F0F0, , , 0, , 0x80D43F3A, 2] ] ImageButton.Create(hBtn61, IBBtnStyles*) Gui, Add, Button, x+20 yp w200 h40 hWndhBtn62, % "Warning" IBBtnStyles := [ [0, 0x80FCEFDC, , , 0, , 0x80F0AD4E, 2] ; normal , [0, 0x80F6CE95, , , 0, , 0x80F0AD4E, 2] ; hover , [0, 0x80F0AD4E, , , 0, , 0x80F0AD4E, 2] ; pressed , [0, 0x80F0F0F0, , , 0, , 0x80F0AD4E, 2] ] ImageButton.Create(hBtn62, IBBtnStyles*) Gui, Add, Button, x+20 yp w200 h40 hWndhBtn63, % "Success" IBBtnStyles := [ [0, 0x80C6E6C6, , , 0, , 0x805CB85C, 2] ; normal , [0, 0x8091CF91, , , 0, , 0x805CB85C, 2] ; hover , [0, 0x805CB85C, , , 0, , 0x805CB85C, 2] ; pressed , [0, 0x80F0F0F0, , , 0, , 0x805CB85C, 2] ] ImageButton.Create(hBtn63, IBBtnStyles*) Gui, Add, Button, x+20 yp w200 h40 hWndhBtn64, % "Info" IBBtnStyles := [ [0, 0x80C6E9F4, , , 0, , 0x8046B8DA, 2] ; normal , [0, 0x8086D0E7, , , 0, , 0x8046B8DA, 2] ; hover , [0, 0x8046B8DA, , , 0, , 0x8046B8DA, 2] ; pressed , [0, 0x80F0F0F0, , , 0, , 0x8046B8DA, 2] ] ImageButton.Create(hBtn64, IBBtnStyles*) ; --------------------------------------------------------------------------------------- Gui, Add, Button, xm y+20 w200 h40 hWndhBtn71, % "Critical" IBBtnStyles := [ [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x80D43F3A, 2] ; normal , [0, 0x80F0B9B8, , , 8, 0xFFF0F0F0, 0x80D43F3A, 2] ; hover , [0, 0x80E27C79, , , 8, 0xFFF0F0F0, 0x80D43F3A, 2] ; pressed , [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x80D43F3A, 2] ] ImageButton.Create(hBtn71, IBBtnStyles*) Gui, Add, Button, x+20 yp w200 h40 hWndhBtn72, % "Warning" IBBtnStyles := [ [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x80F0AD4E, 2] ; normal , [0, 0x80FCEFDC, , , 8, 0xFFF0F0F0, 0x80F0AD4E, 2] ; hover , [0, 0x80F6CE95, , , 8, 0xFFF0F0F0, 0x80F0AD4E, 2] ; pressed , [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x80F0AD4E, 2] ] ImageButton.Create(hBtn72, IBBtnStyles*) Gui, Add, Button, x+20 yp w200 h40 hWndhBtn73, % "Success" IBBtnStyles := [ [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x805CB85C, 2] ; normal , [0, 0x80C6E6C6, , , 8, 0xFFF0F0F0, 0x805CB85C, 2] ; hover , [0, 0x8091CF91, , , 8, 0xFFF0F0F0, 0x805CB85C, 2] ; pressed , [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x805CB85C, 2] ] ImageButton.Create(hBtn73, IBBtnStyles*) Gui, Add, Button, x+20 yp w200 h40 hWndhBtn74, % "Info" IBBtnStyles := [ [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x8046B8DA, 2] ; normal , [0, 0x80C6E9F4, , , 8, 0xFFF0F0F0, 0x8046B8DA, 2] ; hover , [0, 0x8086D0E7, , , 8, 0xFFF0F0F0, 0x8046B8DA, 2] ; pressed , [0, 0x80F0F0F0, , , 8, 0xFFF0F0F0, 0x8046B8DA, 2] ] ImageButton.Create(hBtn74, IBBtnStyles*) ; --------------------------------------------------------------------------------------- Gui, Show,, Image Buttons return GuiClose: GuiEscape: ExitApp