Button Class:
.
- Button Demo 1.png (133.22 KiB) Viewed 8570 times
Spoiler
.
The first steps to use the button class are to take this class and save it somewhere you will remember.
Next make sure that you have the gdi+ lib on your computer.
viewtopic.php?f=6&t=6517
Now it is just a matter of adding new buttons to your script, which you do with this line.
Other than what is shown here, you can change the values of many of the buttons properties by passing as little as the property you want to change from the default value. This is passed in one of the remaining 4 parameters whose order are
You can also set the defaults that the class will use for the session (the script you are writing for example) with the following code.
Each of the parameters are objects that have somewhere around 25 properties each. Only values that are different than the vanilla defaults need to be passed. At the very bottom of the class you will find a prototype of the 4 objects. If needed you can copy and alter them as you want, even cutting out any value not changing.
Even with the prototype objects ready to copy it can take a fair bit of time and patience to edit the raw text objects which is where the editor comes in to play.
Two last things.
1. It should be possible to seperate the button controller class from the button type class. This is important because it would then be possible to just use the class to get the bitmaps for the buttons to use in another control system or perhaps with @just me's Image Button class. I think that a pointer to a bitmap can be used? Can you use pBitmaps or hBitmaps in your class?
2. Here is a functioning example of using the buttons on a gui. Just edit the #Includes to what you need to.
Enjoy!
Code: Select all
;****************************************************************************************************************************************************************************************
;****************************************************************************************************************************************************************************************
;****************************************************************************************************************************************************************************************
;****************************************************************************************************************************************************************************************
;****************************************************************************************************************************************************************************************
Class HButton {
;Gen 3 Button Class By Hellbent
static init , Button := [] , Active , LastControl , HoldCtrl
__New( Input := "" , All := "" , Default := "" , Hover := "" , Pressed := "" ){
local hwnd
;If this is the first time the class is being used.
if( !HButton.init && HButton.init := 1 )
;Set a timer to watch to see if the cursor goes over one of the controls.
HButton._SetHoverTimer()
This._CreateNewButtonObject( hwnd := This._CreateControl( Input ) , Input )
This._BindButton( hwnd , Input )
This._GetButtonBitmaps( hwnd , Input , All , Default , Hover , Pressed )
This._DisplayButton( hwnd , HButton.Button[hwnd].Bitmaps.Default.hBitmap )
return hwnd
}
_DisplayButton( hwnd , hBitmap){
SetImage( hwnd , hBitmap )
}
_GetButtonBitmaps( hwnd , Input := "" , All := "" , Default := "" , Hover := "" , Pressed := "" ){
HButton.Button[hwnd].Bitmaps := GuiButtonType1.CreateButtonBitmapSet( Input , All , Default , Hover , Pressed )
}
_CreateNewButtonObject( hwnd , Input ){
local k , v
HButton.Button[ hwnd ] := {}
for k , v in Input
HButton.Button[ hwnd ][ k ] := v
HButton.Button[ hwnd ].Hwnd := hwnd
}
_CreateControl( Input ){
local hwnd
Gui , % Input.Owner ":Add" , Pic , % "x" Input.X " y" Input.Y " w" Input.W " h" Input.H " hwndhwnd 0xE"
return hwnd
}
_BindButton( hwnd , Input ){
local bd
bd := This._OnClick.Bind( This )
GuiControl, % Input.Owner ":+G" , % hwnd , % bd
}
_SetHoverTimer( timer := "" ){
local HoverTimer
if( !HButton.HoverTimer )
HButton.HoverTimer := ObjBindMethod( HButton , "_OnHover" )
HoverTimer := HButton.HoverTimer
SetTimer , % HoverTimer , % ( Timer ) ? ( Timer ) : ( 100 )
}
_OnHover(){
local Ctrl
MouseGetPos,,,,ctrl,2
if( HButton.Button[ ctrl ] && !HButton.Active ){
HButton.Active := 1
HButton.LastControl := ctrl
HButton._DisplayButton( ctrl , HButton.Button[ ctrl ].Bitmaps.Hover.hBitmap )
}else if( HButton.Active && ctrl != HButton.LastControl ){
HButton.Active := 0
HButton._DisplayButton( HButton.LastControl , HButton.Button[ HButton.LastControl ].Bitmaps.Default.hBitmap )
}
}
_OnClick(){
local Ctrl, last
HButton._SetHoverTimer( "Off" )
MouseGetPos,,,, Ctrl , 2
last := ctrl
HButton._SetFocus( ctrl )
HButton._DisplayButton( last , HButton.Button[ last ].Bitmaps.Pressed.hBitmap )
While(GetKeyState("LButton"))
sleep, 60
HButton._SetHoverTimer()
loop, 2
This._OnHover()
MouseGetPos,,,, Ctrl , 2
if(ctrl!=last){
HButton._DisplayButton( last , HButton.Button[ last ].Bitmaps.Default.hBitmap )
}else{
HButton._DisplayButton( last , HButton.Button[ last ].Bitmaps.Hover.hBitmap )
if( HButton.Button[ last ].Label ){
if(IsFunc( HButton.Button[ last ].Label ) )
fn := Func( HButton.Button[ last ].Label )
, fn.Call()
else
gosub, % HButton.Button[ last ].Label
}
}
}
_SetFocus( ctrl ){
GuiControl, % HButton.Button[ ctrl ].Owner ":Focus" , % ctrl
}
DeleteButton( hwnd ){
for k , v in HButton.Button[ hwnd ].Bitmaps
Gdip_DisposeImage( HButton.Button[hwnd].Bitmaps[k].pBitmap )
, DeleteObject( HButton.Button[ hwnd ].Bitmaps[k].hBitmap )
GuiControl , % HButton.Button[ hwnd ].Owner ":Move", % hwnd , % "x-1 y-1 w0 h0"
HButton.Button[ hwnd ] := ""
}
}
;****************************************************************************************************************************************************************************************
;****************************************************************************************************************************************************************************************
;****************************************************************************************************************************************************************************************
;****************************************************************************************************************************************************************************************
;****************************************************************************************************************************************************************************************
Class GuiButtonType1 {
static List := [ "Default" , "Hover" , "Pressed" ]
_CreatePressedBitmap(){
local arr := [] , Bitmap := {} , fObj := This.CurrentBitmapData.Pressed
Bitmap.pBitmap := Gdip_CreateBitmap( fObj.W , fObj.H ) , G := Gdip_GraphicsFromImage( Bitmap.pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
Brush := Gdip_BrushCreateSolid( fObj.BackgroundColor ) , Gdip_FillRectangle( G , Brush , -1 , -1 , fObj.W+2 , fObj.H+2 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( fObj.ButtonOuterBorderColor ) , Gdip_FillRoundedRectangle( G , Brush , 3 , 4 , fObj.W-7 , fObj.H-7 , 5 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , fObj.W , fObj.H , fObj.ButtonInnerBorderColor1 , fObj.ButtonInnerBorderColor2 , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 2 , 3 , fObj.W-5 , fObj.H-8 , 5 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , fObj.W-7 , fObj.H-10 , fObj.ButtonMainColor1 , fObj.ButtonMainColor2 , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 5 , 5 , fObj.W-11 , fObj.H-12 , 5 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 0 , 2 , fObj.W , fObj.H , fObj.TextBottomColor1 , fObj.TextBottomColor2 , 1 , 1 )
arr := [ { X: -1 , Y: -1 } , { X: 0 , Y: -1 } , { X: 1 , Y: -1 } , { X: -1 , Y: 0 } , { X: 1 , Y: 0 } , { X: -1 , Y: 1 } , { X: 0 , Y: 1 } , { X: 1 , Y: 1 } ]
Loop, % 8
Gdip_TextToGraphics( G , fObj.Text , "s" fObj.FontSize " " fObj.FontOptions " c" Brush " x" 1 + arr[A_Index].X + fObj.TextOffsetX " y" 3 + arr[A_Index].Y + fObj.TextOffsetY , fObj.Font , fObj.W + fObj.TextOffsetW , fObj.H + fObj.TextOffsetH )
Brush := Gdip_CreateLineBrushFromRect( 0 , 2 , fObj.W , fObj.H , fObj.TextTopColor1 , fObj.TextTopColor2 , 1 , 1 )
Gdip_TextToGraphics( G , fObj.Text , "s" fObj.FontSize " " fObj.FontOptions " c" Brush " x" 1 + fObj.TextOffsetX " y" 3 + fObj.TextOffsetY , fObj.Font , fObj.W + fObj.TextOffsetW , fObj.H + fObj.TextOffsetH )
if( fObj.ButtonAddGlossy ){
Brush := Gdip_BrushCreateSolid( fObj.GlossTopColor ) , Gdip_FillRectangle( G , Brush , 5 , 10 , fObj.W-11 , ( fObj.H / 2 ) - 10 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( fObj.GlossTopAccentColor ) , Gdip_FillRectangle( G , Brush , 10 , 12 , fObj.W-21 , fObj.H / 15 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( fObj.GlossBottomColor ) , Gdip_FillRectangle( G , Brush , 5 , 10 + ( fObj.H / 2 ) - 10 , fObj.W-11 , ( fObj.H / 2 ) - 7 ) , Gdip_DeleteBrush( Brush )
}
Gdip_DeleteGraphics( G )
Bitmap.hBitmap := Gdip_CreateHBITMAPFromBitmap( Bitmap.pBitmap )
return Bitmap
}
_CreateHoverBitmap(){
local arr := [] , Bitmap := {} , fObj := This.CurrentBitmapData.Hover
Bitmap.pBitmap := Gdip_CreateBitmap( fObj.W , fObj.H ) , G := Gdip_GraphicsFromImage( Bitmap.pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
Brush := Gdip_BrushCreateSolid( fObj.BackgroundColor ) , Gdip_FillRectangle( G , Brush , -1 , -1 , fObj.W+2 , fObj.H+2 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( fObj.ButtonOuterBorderColor ) , Gdip_FillRoundedRectangle( G , Brush , 2 , 3 , fObj.W-5 , fObj.H-7 , 5 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( fObj.ButtonCenterBorderColor ) , Gdip_FillRoundedRectangle( G , Brush , 3 , 4 , fObj.W-7 , fObj.H-9 , 5 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , fObj.W , fObj.H-10 , fObj.ButtonInnerBorderColor1 , fObj.ButtonInnerBorderColor2 , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 4 , 5 , fObj.W-9 , fObj.H-11 , 5 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 5 , 7 , fObj.W-11 , fObj.H-14 , fObj.ButtonMainColor1 , fObj.ButtonMainColor2 , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 5 , 7 , fObj.W-11 , fObj.H-14 , 5 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 0 , 2 , fObj.W , fObj.H , fObj.TextBottomColor1 , fObj.TextBottomColor2 , 1 , 1 )
arr := [ { X: -1 , Y: -1 } , { X: 0 , Y: -1 } , { X: 1 , Y: -1 } , { X: -1 , Y: 0 } , { X: 1 , Y: 0 } , { X: -1 , Y: 1 } , { X: 0 , Y: 1 } , { X: 1 , Y: 1 } ]
Loop, % 8
Gdip_TextToGraphics( G , fObj.Text , "s" fObj.FontSize " " fObj.FontOptions " c" Brush " x" 0 + arr[A_Index].X + fObj.TextOffsetX " y" 2 + arr[A_Index].Y + fObj.TextOffsetY , fObj.Font , fObj.W + fObj.TextOffsetW , fObj.H + fObj.TextOffsetH )
Brush := Gdip_CreateLineBrushFromRect( 0 , 2 , fObj.W , fObj.H , fObj.TextTopColor1 , fObj.TextTopColor2 , 1 , 1 )
Gdip_TextToGraphics( G , fObj.Text , "s" fObj.FontSize " " fObj.FontOptions " c" Brush " x" 0 + fObj.TextOffsetX " y" 2 + fObj.TextOffsetY , fObj.Font , fObj.W + fObj.TextOffsetW , fObj.H + fObj.TextOffsetH )
if( fObj.ButtonAddGlossy = 1 ){
Brush := Gdip_BrushCreateSolid( fObj.GlossTopColor ) , Gdip_FillRectangle( G , Brush , 6 , 10 , fObj.W-13 , ( fObj.H / 2 ) - 10 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( fObj.GlossTopAccentColor ) , Gdip_FillRectangle( G , Brush , 10 , 12 , fObj.W-21 , fObj.H / 15 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( fObj.GlossBottomColor ) , Gdip_FillRectangle( G , Brush , 6 , 10 + ( fObj.H / 2 ) - 10 , fObj.W-13 , ( fObj.H / 2 ) - 7 ) , Gdip_DeleteBrush( Brush )
}
Gdip_DeleteGraphics( G )
Bitmap.hBitmap := Gdip_CreateHBITMAPFromBitmap( Bitmap.pBitmap )
return Bitmap
}
_CreateDefaultBitmap(){
local arr := [] , Bitmap := {} , fObj := This.CurrentBitmapData.Default
Bitmap.pBitmap := Gdip_CreateBitmap( fObj.W , fObj.H ) , G := Gdip_GraphicsFromImage( Bitmap.pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
Brush := Gdip_BrushCreateSolid( fObj.BackgroundColor ) , Gdip_FillRectangle( G , Brush , -1 , -1 , fObj.W+2 , fObj.H+2 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( fObj.ButtonOuterBorderColor ) , Gdip_FillRoundedRectangle( G , Brush , 2 , 3 , fObj.W-5 , fObj.H-7 , 5 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( fObj.ButtonCenterBorderColor ) , Gdip_FillRoundedRectangle( G , Brush , 3 , 4 , fObj.W-7 , fObj.H-9 , 5 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , fObj.W , fObj.H-10 , fObj.ButtonInnerBorderColor1 , fObj.ButtonInnerBorderColor2 , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 4 , 5 , fObj.W-9 , fObj.H-11 , 5 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 5 , 7 , fObj.W-11 , fObj.H-14 , fObj.ButtonMainColor1 , fObj.ButtonMainColor2 , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 5 , 7 , fObj.W-11 , fObj.H-14 , 5 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 0 , 2 , fObj.W , fObj.H , fObj.TextBottomColor1 , fObj.TextBottomColor2 , 1 , 1 )
arr := [ { X: -1 , Y: -1 } , { X: 0 , Y: -1 } , { X: 1 , Y: -1 } , { X: -1 , Y: 0 } , { X: 1 , Y: 0 } , { X: -1 , Y: 1 } , { X: 0 , Y: 1 } , { X: 1 , Y: 1 } ]
Loop, % 8
Gdip_TextToGraphics( G , fObj.Text , "s" fObj.FontSize " " fObj.FontOptions " c" Brush " x" 0 + arr[A_Index].X + fObj.TextOffsetX " y" 2 + arr[A_Index].Y + fObj.TextOffsetY , fObj.Font , fObj.W + fObj.TextOffsetW , fObj.H + fObj.TextOffsetH )
Brush := Gdip_CreateLineBrushFromRect( 0 , 2 , fObj.W , fObj.H , fObj.TextTopColor1 , fObj.TextTopColor2 , 1 , 1 )
Gdip_TextToGraphics( G , fObj.Text , "s" fObj.FontSize " " fObj.FontOptions " c" Brush " x" 0 + fObj.TextOffsetX " y" 2 + fObj.TextOffsetY , fObj.Font , fObj.W + fObj.TextOffsetW , fObj.H + fObj.TextOffsetH )
if( fObj.ButtonAddGlossy ){
Brush := Gdip_BrushCreateSolid( fObj.GlossTopColor ) , Gdip_FillRectangle( G , Brush , 6 , 10 , fObj.W-13 , ( fObj.H / 2 ) - 10 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( fObj.GlossTopAccentColor ) , Gdip_FillRectangle( G , Brush , 10 , 12 , fObj.W-21 , fObj.H / 15 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( fObj.GlossBottomColor ) , Gdip_FillRectangle( G , Brush , 6 , 10 + ( fObj.H / 2 ) - 10 , fObj.W-13 , ( fObj.H / 2 ) - 7 ) , Gdip_DeleteBrush( Brush )
}
Gdip_DeleteGraphics( G )
Bitmap.hBitmap := Gdip_CreateHBITMAPFromBitmap( Bitmap.pBitmap )
return Bitmap
}
_GetMasterDefaultValues(){ ;Default State
local Default := {}
Default.pBitmap := ""
, Default.hBitmap := ""
, Default.Font := "Arial"
, Default.FontOptions := " Bold Center vCenter "
, Default.FontSize := "12"
, Default.Text := "Button"
, Default.W := 10
, Default.H := 10
, Default.TextBottomColor1 := "0x0002112F"
, Default.TextBottomColor2 := Default.TextBottomColor1
, Default.TextTopColor1 := "0xFFFFFFFF"
, Default.TextTopColor2 := "0xFF000000"
, Default.TextOffsetX := 0
, Default.TextOffsetY := 0
, Default.TextOffsetW := 0
, Default.TextOffsetH := 0
, Default.BackgroundColor := "0xFF22262A"
, Default.ButtonOuterBorderColor := "0xFF161B1F"
, Default.ButtonCenterBorderColor := "0xFF262B2F"
, Default.ButtonInnerBorderColor1 := "0xFF3F444A"
, Default.ButtonInnerBorderColor2 := "0xFF24292D"
, Default.ButtonMainColor1 := "0xFF272C32"
, Default.ButtonMainColor2 := "" Default.ButtonMainColor1
, Default.ButtonAddGlossy := 0
, Default.GlossTopColor := "0x11FFFFFF"
, Default.GlossTopAccentColor := "0x05FFFFFF"
, Default.GlossBottomColor := "0x33000000"
return Default
}
_GetMasterHoverValues(){ ;Hover State
local Default := {}
Default.pBitmap := ""
, Default.hBitmap := ""
, Default.Font := "Arial"
, Default.FontOptions := " Bold Center vCenter "
, Default.FontSize := "12"
, Default.Text := "Button"
, Default.W := 10
, Default.H := 10
, Default.TextBottomColor1 := "0x0002112F"
, Default.TextBottomColor2 := Default.TextBottomColor1
, Default.TextTopColor1 := "0xFFFFFFFF"
, Default.TextTopColor2 := "0xFF000000"
, Default.TextOffsetX := 0
, Default.TextOffsetY := 0
, Default.TextOffsetW := 0
, Default.TextOffsetH := 0
, Default.BackgroundColor := "0xFF22262A"
, Default.ButtonOuterBorderColor := "0xFF161B1F"
, Default.ButtonCenterBorderColor := "0xFF262B2F"
, Default.ButtonInnerBorderColor1 := "0xFF3F444A"
, Default.ButtonInnerBorderColor2 := "0xFF24292D"
, Default.ButtonMainColor1 := "0xFF373C42"
, Default.ButtonMainColor2 := "" Default.ButtonMainColor1
, Default.ButtonAddGlossy := 0
, Default.GlossTopColor := "0x11FFFFFF"
, Default.GlossTopAccentColor := "0x05FFFFFF"
, Default.GlossBottomColor := "0x33000000"
return Default
}
_GetMasterPressedValues(){ ;Pressed State
local Default := {}
Default.pBitmap := ""
, Default.hBitmap := ""
, Default.Font := "Arial"
, Default.FontOptions := " Bold Center vCenter "
, Default.FontSize := "12"
, Default.Text := "Button"
, Default.W := 10
, Default.H := 10
, Default.TextBottomColor1 := "0x0002112F"
, Default.TextBottomColor2 := Default.TextBottomColor1
, Default.TextTopColor1 := "0xFFFFFFFF"
, Default.TextTopColor2 := "0xFF000000"
, Default.TextOffsetX := 0
, Default.TextOffsetY := 0
, Default.TextOffsetW := 0
, Default.TextOffsetH := 0
, Default.BackgroundColor := "0xFF22262A"
, Default.ButtonOuterBorderColor := "0xFF62666a"
, Default.ButtonCenterBorderColor := "0xFF262B2F"
, Default.ButtonInnerBorderColor1 := "0xFF151A20"
, Default.ButtonInnerBorderColor2 := "0xFF151A20"
, Default.ButtonMainColor1 := "0xFF12161a"
, Default.ButtonMainColor2 := "0xFF33383E"
, Default.ButtonAddGlossy := 0
, Default.GlossTopColor := "0x11FFFFFF"
, Default.GlossTopAccentColor := "0x05FFFFFF"
, Default.GlossBottomColor := "0x33000000"
return Default
}
SetSessionDefaults( All := "" , Default := "" , Hover := "" , Pressed := "" ){ ;Set the default values based on user input
This.SessionBitmapData := {}
, This.Preset := 1
, This.init := 0
This._LoadDefaults("SessionBitmapData")
This._SetSessionData( All , Default , Hover , Pressed )
}
_SetSessionData( All := "" , Default := "" , Hover := "" , Pressed := "" ){
local index , k , v , i , j
if( IsObject( All ) ){
Loop, % GuiButtonType1.List.Length() {
index := A_Index
For k , v in All
This.SessionBitmapData[ GuiButtonType1.List[ index ] ][ k ] := v
}
}
For k , v in GuiButtonType1.List
if( isObject( %v% ) )
For i , j in %v%
This.SessionBitmapData[ GuiButtonType1.List[ k ] ][ i ] := j
}
_LoadDefaults( input := "" ){
This.CurrentBitmapData := "" , This.CurrentBitmapData := {}
For k , v in This.SessionBitmapData
This.CurrentBitmapData[k] := {}
This[ input ].Default := This._GetMasterDefaultValues()
, This[ input ].Hover := This._GetMasterHoverValues()
, This[ input ].Pressed := This._GetMasterPressedValues()
}
_SetCurrentBitmapDataFromSessionData(){
local k , v , i , j
This.CurrentBitmapData := "" , This.CurrentBitmapData := {}
For k , v in This.SessionBitmapData
{
This.CurrentBitmapData[k] := {}
For i , j in This.SessionBitmapData[k]
This.CurrentBitmapData[k][i] := j
}
}
_UpdateCurrentBitmapData( All := "" , Default := "" , Hover := "" , Pressed := "" ){
local k , v , i , j
if( IsObject( All ) ){
Loop, % GuiButtonType1.List.Length() {
index := A_Index
For k , v in All
This.CurrentBitmapData[ GuiButtonType1.List[ index ] ][ k ] := v
}
}
For k , v in GuiButtonType1.List
if( isObject( %v% ) )
For i , j in %v%
This.CurrentBitmapData[ GuiButtonType1.List[ k ] ][ i ] := j
}
_UpdateInstanceData( obj := ""){
For k , v in GuiButtonType1.List
This.CurrentBitmapData[v].Text := obj.Text
, This.CurrentBitmapData[v].W := obj.W
, This.CurrentBitmapData[v].H := obj.H
}
CreateButtonBitmapSet( obj := "" , All := "" , Default := "" , Hover := "" , Pressed := "" ){ ;Create a new button
local Bitmaps := {}
if( This.Preset )
This._SetCurrentBitmapDataFromSessionData()
else
This._LoadDefaults( "CurrentBitmapData" )
This._UpdateCurrentBitmapData( All , Default , Hover , Pressed )
This._UpdateInstanceData( obj )
Bitmaps.Default := This._CreateDefaultBitmap()
, Bitmaps.Hover := This._CreateHoverBitmap()
, Bitmaps.Pressed := This._CreatePressedBitmap()
return Bitmaps
}
}
;****************************************************************************************************************************************************************************************
;****************************************************************************************************************************************************************************************
;****************************************************************************************************************************************************************************************
;****************************************************************************************************************************************************************************************
;****************************************************************************************************************************************************************************************
/* ;Template for setting button session defaults
MasterTheme(){
local Theme := {}
Theme.All := {}
Theme.All.pBitmap := ""
, Theme.All.hBitmap := ""
, Theme.All.Font := "Arial"
, Theme.All.FontOptions := " Bold Center vCenter "
, Theme.All.FontSize := "12"
, Theme.All.Text := "Button"
, Theme.All.W := 10
, Theme.All.H := 10
, Theme.All.TextBottomColor1 := "0x0002112F"
, Theme.All.TextBottomColor2 := Theme.All.TextBottomColor1
, Theme.All.TextTopColor1 := "0xFFFFFFFF"
, Theme.All.TextTopColor2 := "0xFF000000"
, Theme.All.TextOffsetX := 0
, Theme.All.TextOffsetY := 0
, Theme.All.TextOffsetW := 0
, Theme.All.TextOffsetH := 0
, Theme.All.BackgroundColor := "0xFF22262A"
, Theme.All.ButtonOuterBorderColor := "0xFF62666a"
, Theme.All.ButtonCenterBorderColor := "0xFF262B2F"
, Theme.All.ButtonInnerBorderColor1 := "0xFF151A20"
, Theme.All.ButtonInnerBorderColor2 := "0xFF151A20"
, Theme.All.ButtonMainColor1 := "0xFF12161a"
, Theme.All.ButtonMainColor2 := "0xFF33383E"
, Theme.All.ButtonAddGlossy := 0
, Theme.All.GlossTopColor := "0x11FFFFFF"
, Theme.All.GlossTopAccentColor := "0x05FFFFFF"
, Theme.All.GlossBottomColor := "0x33000000"
;<*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&
;<<<<<>>>>>(_____)<<<<<>>>>><<<<<>>>>>(_____)<<<<<>>>>><<<<<>>>>>(____)<<<<<>>>>><<<<<>>>>>(_____)<<<<<>>>>><<<<<>>>>>(____)<<<<<>>>>><<<<<>>>>>(_____)<<<<<>>>>><<<<<>>>>>(_____)<<<<<>>>>>
;<*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&
Theme.Default := {}
Theme.Default.pBitmap := ""
, Theme.Default.hBitmap := ""
, Theme.Default.Font := "Arial"
, Theme.Default.FontOptions := " Bold Center vCenter "
, Theme.Default.FontSize := "12"
, Theme.Default.Text := "Button"
, Theme.Default.W := 10
, Theme.Default.H := 10
, Theme.Default.TextBottomColor1 := "0x0002112F"
, Theme.Default.TextBottomColor2 := Theme.Default.TextBottomColor1
, Theme.Default.TextTopColor1 := "0xFFFFFFFF"
, Theme.Default.TextTopColor2 := "0xFF000000"
, Theme.Default.TextOffsetX := 0
, Theme.Default.TextOffsetY := 0
, Theme.Default.TextOffsetW := 0
, Theme.Default.TextOffsetH := 0
, Theme.Default.BackgroundColor := "0xFF22262A"
, Theme.Default.ButtonOuterBorderColor := "0xFF161B1F"
, Theme.Default.ButtonCenterBorderColor := "0xFF262B2F"
, Theme.Default.ButtonInnerBorderColor1 := "0xFF3F444A"
, Theme.Default.ButtonInnerBorderColor2 := "0xFF24292D"
, Theme.Default.ButtonMainColor1 := "0xFF272C32"
, Theme.Default.ButtonMainColor2 := "" Theme.Default.ButtonMainColor1
, Theme.Default.ButtonAddGlossy := 0
, Theme.Default.GlossTopColor := "0x11FFFFFF"
, Theme.Default.GlossTopAccentColor := "0x05FFFFFF"
, Theme.Default.GlossBottomColor := "0x33000000"
;<*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&
;<<<<<>>>>>(_____)<<<<<>>>>><<<<<>>>>>(_____)<<<<<>>>>><<<<<>>>>>(____)<<<<<>>>>><<<<<>>>>>(_____)<<<<<>>>>><<<<<>>>>>(____)<<<<<>>>>><<<<<>>>>>(_____)<<<<<>>>>><<<<<>>>>>(_____)<<<<<>>>>>
;<*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&
Theme.Hover := {}
Theme.Hover.pBitmap := ""
, Theme.Hover.hBitmap := ""
, Theme.Hover.Font := "Arial"
, Theme.Hover.FontOptions := " Bold Center vCenter "
, Theme.Hover.FontSize := "12"
, Theme.Hover.Text := "Button"
, Theme.Hover.W := 10
, Theme.Hover.H := 10
, Theme.Hover.TextBottomColor1 := "0x0002112F"
, Theme.Hover.TextBottomColor2 := Theme.Hover.TextBottomColor1
, Theme.Hover.TextTopColor1 := "0xFFFFFFFF"
, Theme.Hover.TextTopColor2 := "0xFF000000"
, Theme.Hover.TextOffsetX := 0
, Theme.Hover.TextOffsetY := 0
, Theme.Hover.TextOffsetW := 0
, Theme.Hover.TextOffsetH := 0
, Theme.Hover.BackgroundColor := "0xFF22262A"
, Theme.Hover.ButtonOuterBorderColor := "0xFF161B1F"
, Theme.Hover.ButtonCenterBorderColor := "0xFF262B2F"
, Theme.Hover.ButtonInnerBorderColor1 := "0xFF3F444A"
, Theme.Hover.ButtonInnerBorderColor2 := "0xFF24292D"
, Theme.Hover.ButtonMainColor1 := "0xFF373C42"
, Theme.Hover.ButtonMainColor2 := "" Theme.Hover.ButtonMainColor1
, Theme.Hover.ButtonAddGlossy := 0
, Theme.Hover.GlossTopColor := "0x11FFFFFF"
, Theme.Hover.GlossTopAccentColor := "0x05FFFFFF"
, Theme.Hover.GlossBottomColor := "0x33000000"
;<*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&
;<<<<<>>>>>(_____)<<<<<>>>>><<<<<>>>>>(_____)<<<<<>>>>><<<<<>>>>>(____)<<<<<>>>>><<<<<>>>>>(_____)<<<<<>>>>><<<<<>>>>>(____)<<<<<>>>>><<<<<>>>>>(_____)<<<<<>>>>><<<<<>>>>>(_____)<<<<<>>>>>
;<*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&
Theme.Pressed := {}
Theme.Pressed.pBitmap := ""
, Theme.Pressed.hBitmap := ""
, Theme.Pressed.Font := "Arial"
, Theme.Pressed.FontOptions := " Bold Center vCenter "
, Theme.Pressed.FontSize := "12"
, Theme.Pressed.Text := "Button"
, Theme.Pressed.W := 10
, Theme.Pressed.H := 10
, Theme.Pressed.TextBottomColor1 := "0x0002112F"
, Theme.Pressed.TextBottomColor2 := Theme.Pressed.TextBottomColor1
, Theme.Pressed.TextTopColor1 := "0xFFFFFFFF"
, Theme.Pressed.TextTopColor2 := "0xFF000000"
, Theme.Pressed.TextOffsetX := 0
, Theme.Pressed.TextOffsetY := 0
, Theme.Pressed.TextOffsetW := 0
, Theme.Pressed.TextOffsetH := 0
, Theme.Pressed.BackgroundColor := "0xFF22262A"
, Theme.Pressed.ButtonOuterBorderColor := "0xFF62666a"
, Theme.Pressed.ButtonCenterBorderColor := "0xFF262B2F"
, Theme.Pressed.ButtonInnerBorderColor1 := "0xFF151A20"
, Theme.Pressed.ButtonInnerBorderColor2 := "0xFF151A20"
, Theme.Pressed.ButtonMainColor1 := "0xFF12161a"
, Theme.Pressed.ButtonMainColor2 := "0xFF33383E"
, Theme.Pressed.ButtonAddGlossy := 0
, Theme.Pressed.GlossTopColor := "0x11FFFFFF"
, Theme.Pressed.GlossTopAccentColor := "0x05FFFFFF"
, Theme.Pressed.GlossBottomColor := "0x33000000"
;<*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&
;<<<<<>>>>>(_____)<<<<<>>>>><<<<<>>>>>(_____)<<<<<>>>>><<<<<>>>>>(____)<<<<<>>>>><<<<<>>>>>(_____)<<<<<>>>>><<<<<>>>>>(____)<<<<<>>>>><<<<<>>>>>(_____)<<<<<>>>>><<<<<>>>>>(_____)<<<<<>>>>>
;<*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&
return Theme
}
viewtopic.php?f=6&t=6517
Now it is just a matter of adding new buttons to your script, which you do with this line.
Code: Select all
;A button can take between 1 and 5 objects, any and all are optional with the exception of the first one.
;The first object sets the values that are unique to that button, such as which window does it belong to, where is it positioned, etc.
MyFirstButton := New HButton( { Owner: 1 , X: 10 , Y: 10 , W: 100 , H: 35 , Text: "OK" , Label: "TestFunction" } )
Other than what is shown here, you can change the values of many of the buttons properties by passing as little as the property you want to change from the default value. This is passed in one of the remaining 4 parameters whose order are
Code: Select all
( Input , All , Default , Hover , Pressed )
Code: Select all
GuiButtonType1.SetSessionDefaults( All := "" , Default := "" , Hover := "" , Pressed := "" )
Even with the prototype objects ready to copy it can take a fair bit of time and patience to edit the raw text objects which is where the editor comes in to play.
Two last things.
1. It should be possible to seperate the button controller class from the button type class. This is important because it would then be possible to just use the class to get the bitmaps for the buttons to use in another control system or perhaps with @just me's Image Button class. I think that a pointer to a bitmap can be used? Can you use pBitmaps or hBitmaps in your class?
2. Here is a functioning example of using the buttons on a gui. Just edit the #Includes to what you need to.
Code: Select all
;***************************************************************************************************
#Include <My Altered Gdip Lib> ; <----------- GDIP LIB
#Include <Gen 3 Buttons> ; <---------- HButton class
;***************************************************************************************************
#SingleInstance, Force
Gdip_Startup()
MyFirstButton := New HButton( { Owner: 1 , X: 10 , Y: 10 , W: 100 , H: 35 , Text: "OK" , Label: "TestFunction" } , { BackgroundColor: "0xFFF0F0F0"} )
Gui, 1:Show
return
GuiClose:
ExitApp
TestFunction(){
ToolTip, In the test function
SoundBeep, 500
}
Editor:
.
- 20210217014330.png (113.9 KiB) Viewed 8570 times
Spoiler
Here is the editors code. Save and run it as its own script/file. *Change the path in the #Include to your copy of gdip.
Use the editor to clipboard a function to paste in your script or to save a set of pngs for your button. Or both.
Here is an example of what it puts in your clipboard.
That can be used to set a single button in your script or it can be used to set the session defaults before you add your first button.
Here is a functioning example of setting the class to use the buttons designed in the editor. *Edit the #Include
.
.
.
Enjoy!
Code: Select all
;***************************************************************************************************
#Include <My Altered Gdip Lib> ;GDI+ LIB
;***************************************************************************************************
#SingleInstance, Force
SetControlDelay, -1
SetBatchLines, -1
#NoEnv
global CurrentTab , DemoHwnd , Active := 0 , isPressed := 0 , DisplayHwnd
ptoken := GDIp_Startup()
SetIcon()
MainObj := {}
MainObj.ButtonHandles := []
MainObj.Edits := {}
MainObj.EditHandles := []
MainObj.Count := 1
SetDefaults( MainObj )
Main := New Custom_Window( x:= "" , y:= "" , w:= 1100 , h:= 590 , Name:= "1" , Options:= "+AlwaysOnTop -Caption -DPIScale" , Title:= "HB Button Maker v1.01" , Background_Bitmap:= Background() )
Gui,1:Add,Text,x10 y5 w610 h30 BackgroundTrans gMoveWindow
Gui, 1:Add, Text, x0 y0 w0 h0 BackgroundTrans hwndDemoHwnd gDemoPress
Gui,1:Color,22262a,071111
AddButtonOptionsPanel( MainObj )
AddFontPanel( MainObj )
AddTextColorPanel( MainObj )
AddGlossyPanel( MainObj )
AddButtonColorPanel( MainObj )
AddTabsPanel( MainObj )
AddControlPanel( MainObj )
AddDropDown( MainObj )
AddClosePanel( MainObj )
w:=460 , h:= 363
Gui, 1:Add, Pic, x320 y95 w%w% h%h% 0xE hwndPichwnd
SetImage( Pichwnd , handle := CenterPanel( w , h , MainObj.Tab[CurrentTab] , MainObj[MainObj.Tab[CurrentTab]] , MainObj ) ) , DeleteObject( handle )
Main.Show_Window()
lock := 1
For k, v in MainObj[MainObj.Tab[CurrentTab]] {
GuiControl, 1:, % MainObj.Edits[k], % v
}
lock := 0
Gui, 1:Add, Edit,c00aacc x485 y50 w210 h22 -E0x200 Center hwndhwnd , MyButtonDesign
MainObj.ProjectName := hwnd
SetTimer, Hover, 60
return
GuiClose:
;~ GuiContextMenu:
;~ *ESC::
ExitApp
MinimizeWindow:
Gui, 1:Minimize
return
GotoThreadTopic:
soundbeep, 500
return
SetIcon(){
pBitmap := HB_BITMAP_MAKER()
hIcon := Gdip_CreateHICONFromBitmap(pBitmap)
Gdip_DisposeImage(pBitmap)
Menu, Tray, Icon, HICON:%hIcon%
}
HB_BITMAP_MAKER(){
;Bitmap Created Using: HB Bitmap Maker
pBitmap := Gdip_CreateBitmap( 32 , 32 ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
Brush := Gdip_CreateLineBrush( 10 , 13 , 19 , 25 , "0xFF004444" , "0xFF0D0D0D" , 1 ) , Gdip_FillEllipse( G , Brush , 1 , 1 , 29 , 29 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawEllipse( G , Pen , 1 , 1 , 29 , 29 ) , Gdip_DeletePen( Pen )
Pen := Gdip_CreatePen( "0xFF000000" , 1 ) , Gdip_DrawEllipse( G , Pen , 2 , 2 , 27 , 27 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G , "HB" , "s14 Center vCenter Bold c" Brush " x1 y2" , "Segoe ui" , 29 , 29 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF22262a" ) , Gdip_TextToGraphics( G , "HB" , "s14 Center vCenter Bold c" Brush " x3 y4" , "Segoe ui" , 29 , 29 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF009999" ) , Gdip_TextToGraphics( G , "HB" , "s14 Center vCenter Bold c" Brush " x2 y3" , "Segoe ui" , 29 , 29 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 7 , 9 , 17 , 12 , "0x66009999" , "0x66000000" , 1 , 1 ) , Gdip_TextToGraphics( G , "HB" , "s14 Center vCenter Bold c" Brush " x2 y3" , "Segoe ui" , 29 , 29 ) , Gdip_DeleteBrush( Brush )
Gdip_DeleteGraphics( G )
return pBitmap
}
Export:
if( MainObj.Count = 1 ){
;~ ToolTip, % "Save PNG Set"
SaveImage( MainObj )
}else if( MainObj.Count = 2 ){
;~ ToolTip, % "Clipboard Button Object"
ClipButton( MainObj )
}
return
SaveImage( obj ){
local Default , Hover , Pressed , All , G
All := Gdip_CreateBitmap( obj.Default.ButtonPanelWidthEdit + obj.Hover.ButtonPanelWidthEdit + obj.Pressed.ButtonPanelWidthEdit , ( obj.Default.ButtonPanelHeightEdit >= obj.Hover.ButtonPanelHeightEdit ) ? ( ( obj.Default.ButtonPanelHeightEdit >= obj.Pressed.ButtonPanelHeightEdit ) ? ( obj.Default.ButtonPanelHeightEdit ) : ( obj.Pressed.ButtonPanelHeightEdit >= obj.Hover.ButtonPanelHeightEdit ) ? ( obj.Pressed.ButtonPanelHeightEdit ) : ( obj.Hover.ButtonPanelHeightEdit ) ) : ( ( obj.Pressed.ButtonPanelHeightEdit >= obj.Hover.ButtonPanelHeightEdit ) ? ( obj.Pressed.ButtonPanelHeightEdit ) : ( obj.Hover.ButtonPanelHeightEdit ) ) ) , G := Gdip_GraphicsFromImage( All ) , Gdip_SetSmoothingMode( G , 2 )
IfNotExist, % A_ScriptDir "\Saved Buttons"
FileCreateDir, % A_ScriptDir "\Saved Buttons"
Default := _CreateDefaultBitmap( obj.Default.ButtonPanelWidthEdit , obj.Default.ButtonPanelHeightEdit , obj.Default )
Gdip_SaveBitmapToFile( Default , A_ScriptDir "\Saved Buttons\" A_Now "_" obj.ProjectName "_Default.png" , 100 )
Gdip_DrawImage( G , Default , 0, 0, obj.Default.ButtonPanelWidthEdit , obj.Default.ButtonPanelHeightEdit )
Gdip_DisposeImage( Default )
Hover := _CreateDefaultBitmap( obj.Hover.ButtonPanelWidthEdit , obj.Hover.ButtonPanelHeightEdit , obj.Hover )
Gdip_SaveBitmapToFile( Hover , A_ScriptDir "\Saved Buttons\" A_Now "_" obj.ProjectName "_Hover.png" , 100 )
Gdip_DrawImage( G , Hover , obj.Default.ButtonPanelWidthEdit , 0 , obj.Hover.ButtonPanelWidthEdit , obj.Hover.ButtonPanelHeightEdit )
Gdip_DisposeImage( Hover )
Pressed := _CreateDefaultBitmap( obj.Pressed.ButtonPanelWidthEdit , obj.Pressed.ButtonPanelHeightEdit , obj.Pressed )
Gdip_SaveBitmapToFile( Pressed , A_ScriptDir "\Saved Buttons\" A_Now "_" obj.ProjectName "_Pressed.png" , 100 )
Gdip_DrawImage( G , Pressed , obj.Default.ButtonPanelWidthEdit + obj.Hover.ButtonPanelWidthEdit , 0 , obj.Pressed.ButtonPanelWidthEdit , obj.Pressed.ButtonPanelHeightEdit )
Gdip_DisposeImage( Pressed )
Gdip_SaveBitmapToFile( All , A_ScriptDir "\Saved Buttons\" A_Now "_" obj.ProjectName "_All.png" , 100 )
Gdip_DisposeImage( All )
SoundBeep, 500
SoundBeep, 500
}
AutoTimer:
if(MainObj.Tab[CurrentTab]="All")
return
GetEdits( MainObj , CurrentTab )
SetImage( Pichwnd , handle := CenterPanel( w , h , MainObj.Tab[CurrentTab] , MainObj[MainObj.Tab[CurrentTab]] , MainObj ) )
DeleteObject( handle )
SetDisplayWindow( MainObj )
return
AutoUpdate:
if( MainObj.AutoSwitchState := !MainObj.AutoSwitchState ){
SetImage( MainObj.AutoSwitch , handle := AutoSwitchOn() ) , DeleteObject( handle )
SetTimer, AutoTimer, 5000
gosub, AutoTimer
}else{
SetImage( MainObj.AutoSwitch , handle := AutoSwitchOff() ) , DeleteObject( handle )
SetTimer, AutoTimer, Off
}
return
DemoPress:
SetTimer, Hover, Off
isPressed := 1
SetImage( Pichwnd , handle := CenterPanel( w , h , "Pressed" , MainObj.Pressed , MainObj ) ) , DeleteObject( handle )
While(GetKeyState("LButton"))
sleep, 30
isPressed := 0
MouseGetPos,,,,ctrl,2
if(Ctrl!=DemoHwnd){
Active := 0
SetImage( Pichwnd , handle := CenterPanel( w , h , "All" , MainObj.Default , MainObj ) ) , DeleteObject( handle )
}else{
SetImage( Pichwnd , handle := CenterPanel( w , h , "Hover" , MainObj.Hover , MainObj ) ) , DeleteObject( handle )
}
SetTimer, Hover, On
return
Hover:
MouseGetPos,,,,Ctrl,2
if(DemoHwnd=ctrl&&!Active){
Active := 1
SetImage( Pichwnd , handle := CenterPanel( w , h , "Hover" , MainObj.Hover , MainObj ) ) , DeleteObject( handle )
}else if(DemoHwnd!=ctrl&&Active){
Active := 0
SetImage( Pichwnd , handle := CenterPanel( w , h , "All" , MainObj.Default , MainObj ) ) , DeleteObject( handle )
}
return
SwitchTabs:
MouseGetPos,,,,ctrl,2
if(CurrentTab = ctrl)
return
lock := 1
SetImage( MainObj.TabsPanelHwnd , handle := Tabs( MainObj.Tab[ctrl] ) )
DeleteObject( handle )
GetEdits( MainObj , CurrentTab )
CurrentTab := ctrl
if(MainObj.Tab[CurrentTab]="All")
SetTimer, Hover, 60
else
SetTimer, Hover, Off
SetImage( MainObj.GlossyPanelHwnd , handle := Glossy( MainObj[MainObj.Tab[CurrentTab]].GlossyPanelUseGlossyCheckbox ) ) , DeleteObject( handle )
For k, v in MainObj[MainObj.Tab[CurrentTab]]
GuiControl, 1:, % MainObj.Edits[k], % v
lock := 0
guiControl,1:Focus, % MainObj.Edits.ButtonPanelTextEdit
SendMessage, 0xB1, -2, -1,, % "ahk_id " MainObj.Edits.ButtonPanelTextEdit
SetImage( Pichwnd , handle := CenterPanel( w , h , MainObj.Tab[CurrentTab] , MainObj[MainObj.Tab[CurrentTab]] , MainObj ) ) , DeleteObject( handle )
return
GetEdits( ByRef Obj , CT ){
For k , v in obj.Edits {
GuiControlGet, out, 1:, % v
Obj[Obj.Tab[CT]][k] := "" Out
}
}
SubmitEdit:
if(lock)
return
GuiControlGet,hwnd,1: hwnd
MainObj[MainObj.Tab[CurrentTab]][MainObj.EditHandles[hwnd]] := A_GuiControl
return
AdjustSave:
arr := ["Save PNG Set","Clipboard Button Object"]
MouseGetPos,,,, ctrl3 , 2
if( MainObj.DDLList[ ctrl3 ] = "Plus" ){
if( ++MainObj.Count > arr.Length() )
MainObj.Count := 1
}else if( MainObj.DDLList[ ctrl3 ] = "Minus" ){
if( --MainObj.Count < 1 )
MainObj.Count := arr.Length()
}
SetImage( MainObj.DropDown , handle := DropDown( arr[ MainObj.Count ]) ) , DeleteObject( handle )
arr := ""
return
AddDropDown( Obj ){
obj.DDLList := []
Gui, 1:Add, Pic, x720 y46 w300 h26 0xE BackgroundTrans hwndhwnd
obj.DropDown := hwnd
Gui, 1:Add, Text, x730 y46 w30 h26 BackgroundTrans gAdjustSave hwndhwnd ;Border
obj.DDLList[hwnd] := "Minus"
Gui, 1:Add, Text, x980 y46 w30 h26 BackgroundTrans gAdjustSave hwndhwnd ;Border
obj.DDLList[hwnd] := "Plus"
SetImage( obj.DropDown , handle := DropDown() ) , DeleteObject( handle )
Gui, 1:Add, Pic, x1025 y46 w100 h30 0xE BackgroundTrans hwndhwnd gExport
obj.GB := hwnd
SetImage( obj.GB , handle := GB() ) , DeleteObject( handle )
}
GB( Text := "GO" ){
;Bitmap Created Using: HB Bitmap Maker
pBitmap := Gdip_CreateBitmap( w:=60 , h:=30 ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , -1 , -1 , w + 2 , h + 2 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , w , h , "0xFF2d2d2d" , "0xFF0d0d0d" , 1 , 1 ) , Gdip_FillRectangle( G , Brush , 3 , 3 , w - 7 , h - 7 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 3 , 3 , w - 7 , h + 5 , "0xFF006666" , "0xFF121212" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush )
Gdip_DrawRectangle( G , Pen , 3 , 3 , w - 7 , h - 7 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , w , h , "0xFF00aaaa" , "0xFF006666" , 1 , 1 ) , Gdip_TextToGraphics( G , Text , "s12 Center vCenter Bold c" Brush " x4 y4" , "Segoe ui" , w - 7 , h - 7 ) , Gdip_DeleteBrush( Brush )
Gdip_DeleteGraphics( G )
hBitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
Gdip_DisposeImage( pBitmap )
return hBitmap
}
DropDown( Input := "Save PNG Set" ){
;Bitmap Created Using: HB Bitmap Maker
pBitmap := Gdip_CreateBitmap( 300 , 26 ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , -1 , -1 , 302 , 30 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF02060a" ) , Gdip_FillRectangle( G , Brush , 11 , 3 , 28 , 20 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 14 , 4 , 23 , 18 , "0x77006666" , "0xaa002222" , 1 , 1 ) , Gdip_FillRectangle( G , Brush , 12 , 4 , 26 , 18 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF02060a" ) , Gdip_FillPie( G , Brush , 1 , 3 , 20 , 20 , 90 , 180 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 2 , 4 , 9 , 19 , "0x77006666" , "0xaa002222" , 1 , 1 ) , Gdip_FillPie( G , Brush , 2 , 4 , 18 , 18 , 90 , 180 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 19 , 9 , 13 , 8 , "0xFF009999" , "0xFF02060a" , 1 , 1 ) , Gdip_FillPolygon( G , Brush , "17,13|31,8|31,18|17,13|" ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 19 , 9 , 11 , 10 , "0xFF22262a" , "0xFF02060A" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawLines( G , Pen , "17,13|31,8|31,18|17,13|" ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF02060A" ) , Gdip_FillRectangle( G , Brush , 39 , 3 , 225 , 20 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 40 , 4 , 218 , 17 , "0x77006666" , "0xaa002222" , 1 , 1 ) , Gdip_FillRectangle( G , Brush , 39 , 4 , 222 , 18 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF02060a" ) , Gdip_FillRectangle( G , Brush , 260 , 3 , 28 , 20 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 260 , 3 , 27 , 22 , "0x77006666" , "0xaa002222" , 1 , 1 ) , Gdip_FillRectangle( G , Brush , 261 , 4 , 26 , 18 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF02060A" ) , Gdip_FillPie( G , Brush , 278 , 3 , 20 , 20 , 270 , 180 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 287 , 3 , 9 , 18 , "0x77006666" , "0xaa002222" , 1 , 1 ) , Gdip_FillPie( G , Brush , 279 , 4 , 18 , 18 , 270 , 180 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 269 , 8 , 14 , 9 , "0xFF009999" , "0xFF02060a" , 1 , 1 ) , Gdip_FillPolygon( G , Brush , "283,13|269,8|269,18|283,13|" ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 269 , 8 , 11 , 9 , "0xFF22262a" , "0xFF02060a" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawLines( G , Pen , "283,13|269,8|269,18|283,13|" ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 41 , 5 , 217 , 21 , "0xFFF0F0F0" , "0xFF009999" , 1 , 1 ) , Gdip_TextToGraphics( G , Input , "s16 Center vCenter Bold c" Brush " x40 y5" , "Segoe UI" , 219 , 18 ) , Gdip_DeleteBrush( Brush )
Gdip_DeleteGraphics( G )
hBitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
Gdip_DisposeImage( pBitmap )
return hBitmap
}
TAG(obj){
;Bitmap Created Using: HB Bitmap Maker
pBitmap := Gdip_CreateBitmap( 200 , 200 ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
;~ Brush := Gdip_CreateLineBrushFromRect( 1 , 1 , 199 , 197 , "0xFF52565a" , "0xFF22262a" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 10 , 10 , 180 , 180 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 1 , 1 , 199 , 197 , "0xFF52565a" , "0xFF02060a" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 10 , 10 , 180 , 180 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 26 , 36 , 100 , 25 , "0x6632363a" , "0x6622262a" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 10 , 10 , 180 , 180 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrush( 26 , 65 , 34 , 153 , "0x6652565a" , "0x6622262a" , 1 ) , Gdip_FillEllipse( G , Brush , 10 , 10 , 180 , 180 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 0 , 2 , 202 , 197 , "0xFFF0F0F0" , "0xFF000000" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawEllipse( G , Pen , 10 , 10 , 180 , 180 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G , "HB" , "s112 Center vCenter Bold c" Brush " x-2 y78" , "Segoe ui" , 200 , 50 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF62666a" ) , Gdip_TextToGraphics( G , "HB" , "s112 Center vCenter Bold c" Brush " x2 y82" , "Segoe ui" , 200 , 50 ) , Gdip_DeleteBrush( Brush )
;~ Brush := Gdip_CreateLineBrush( 43 , 59 , 65 , 126 , "0xFF004444" , "0xFF000000" , 1 ) , Gdip_TextToGraphics( G , "HB" , "s112 Center vCenter Bold c" Brush " x0 y80" , "Segoe ui" , 200 , 50 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrush( 43 , 59 , 65 , 126 , "0xFF" Obj.ALL.ButtonPanelBackgroundColorEdit , "0xFF000000" , 1 ) , Gdip_TextToGraphics( G , "HB" , "s112 Center vCenter Bold c" Brush " x0 y80" , "Segoe ui" , 200 , 50 ) , Gdip_DeleteBrush( Brush )
Gdip_DeleteGraphics( G )
return pBitmap
}
_CreatePressedBitmap( W , H , Obj ){
local arr := []
;@
pBitmap := Gdip_CreateBitmap( W , H ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
;@
Brush := Gdip_BrushCreateSolid( "0xFF" obj.ButtonPanelBackgroundColorEdit ) , Gdip_FillRectangle( G , Brush , -1 , -1 , W + 2 , H + 2 ) , Gdip_DeleteBrush( Brush )
;@
Brush := Gdip_BrushCreateSolid( "0x" . obj.ButtonColorPanelOuterBorderColorAlphaEdit . obj.ButtonColorPanelOuterBorderColorEdit ) , Gdip_FillRoundedRectangle( G , Brush , 3 , 4 , W - 7 , H - 7 , 5 ) , Gdip_DeleteBrush( Brush )
;@
Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , W , H , "0x" . obj.ButtonColorPanelInnerBorderColor1AlphaEdit . obj.ButtonColorPanelInnerBorderColor1Edit , "0x" . obj.ButtonColorPanelInnerBorderColor2AlphaEdit . obj.ButtonColorPanelInnerBorderColor2Edit , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 2 , 3 , W - 5 , H - 8 , 5 ) , Gdip_DeleteBrush( Brush )
;@
Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , W - 7 , H - 10 , "0x" . obj.ButtonColorPanelMainColor1AlphaEdit . obj.ButtonColorPanelMainColor1Edit , "0x" . obj.ButtonColorPanelMainColor2AlphaEdit . obj.ButtonColorPanelMainColor2Edit , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 5 , 5 , W - 11 , H - 12 , 5 ) , Gdip_DeleteBrush( Brush )
;@
Brush := Gdip_CreateLineBrushFromRect( 0 , 2 , W , H , "0x" . obj.TextColorPanelBottomColor1AlphaEdit . obj.TextColorPanelBottomColor1Edit , "0x" . obj.TextColorPanelBottomColor2AlphaEdit . obj.TextColorPanelBottomColor2Edit , 1 , 1 )
arr := [ { X: -1 , Y: -1 } , { X: 0 , Y: -1 } , { X: 1 , Y: -1 } , { X: -1 , Y: 0 } , { X: 1 , Y: 0 } , { X: -1 , Y: 1 } , { X: 0 , Y: 1 } , { X: 1 , Y: 1 } ]
Loop, % 8
;@
Gdip_TextToGraphics( G , obj.ButtonPanelTextEdit , "s" obj.FontPanelFontSizeEdit " " obj.FontPanelFontOptionsEdit " c" Brush " x" 1 + arr[A_Index].X + Obj.FontPanelXOffsetEdit " y" 3 + arr[A_Index].Y + Obj.FontPanelYOffsetEdit , Obj.FontPanelFontEdit , W + Obj.FontPanelWOffsetEdit , H + Obj.FontPanelHOffsetEdit )
Gdip_DeleteBrush( Brush )
;@
Brush := Gdip_CreateLineBrushFromRect( 0 , 2 , W , H , "0x" . obj.TextColorPanelTopColor1AlphaEdit . obj.TextColorPanelTopColor1Edit , "0x" . obj.TextColorPanelTopColor2AlphaEdit . obj.TextColorPanelTopColor2Edit , 1 , 1 )
;@
Gdip_TextToGraphics( G , obj.ButtonPanelTextEdit , "s" obj.FontPanelFontSizeEdit " " obj.FontPanelFontOptionsEdit " c" Brush " x" 1 + Obj.FontPanelXOffsetEdit " y" 3 + Obj.FontPanelYOffsetEdit , Obj.FontPanelFontEdit , W + Obj.FontPanelWOffsetEdit , H + Obj.FontPanelHOffsetEdit )
Gdip_DeleteBrush( Brush )
;@
if( Obj.GlossyPanelUseGlossyCheckbox ){
;@
Brush := Gdip_BrushCreateSolid( "0x" . obj.GlossyPanelTopColorAlphaEdit . obj.GlossyPanelTopColorEdit ) , Gdip_FillRectangle( G , Brush , 5 , 10 , W - 11 , ( H / 2 ) - 10 ) , Gdip_DeleteBrush( Brush )
;@
Brush := Gdip_BrushCreateSolid( "0x" . obj.GlossyPanelAccentColorAlphaEdit . obj.GlossyPanelAccentColorEdit ) , Gdip_FillRectangle( G , Brush , 10 , 12 , W - 21 , H / 15 ) , Gdip_DeleteBrush( Brush )
;@
Brush := Gdip_BrushCreateSolid( "0x" . obj.GlossyPanelBottomColorAlphaEdit . obj.GlossyPanelBottomColorEdit ) , Gdip_FillRectangle( G , Brush , 5 , 10 + ( H / 2 ) - 10 , W - 11 , ( H / 2 ) - 7 ) , Gdip_DeleteBrush( Brush )
}
Gdip_DeleteGraphics( G )
return pBitmap
}
_CreateHoverBitmap( W , H , Obj ){
local arr := []
if( W = null )
W := 100
if( H = null )
H := 40
;@
pBitmap := Gdip_CreateBitmap( W , H ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
;@
Brush := Gdip_BrushCreateSolid( "0xFF" obj.ButtonPanelBackgroundColorEdit ) , Gdip_FillRectangle( G , Brush , -1 , -1 , W + 2 , H + 2 ) , Gdip_DeleteBrush( Brush )
;@
Brush := Gdip_BrushCreateSolid( "0x" . obj.ButtonColorPanelOuterBorderColorAlphaEdit . obj.ButtonColorPanelOuterBorderColorEdit ) , Gdip_FillRoundedRectangle( G , Brush , 2 , 3 , W - 5 , H - 7 , 5 ) , Gdip_DeleteBrush( Brush )
;@
Brush := Gdip_BrushCreateSolid( "0x" . obj.ButtonColorPanelCenterBorderColorAlphaEdit . obj.ButtonColorPanelCenterBorderColorEdit ) , Gdip_FillRoundedRectangle( G , Brush , 3 , 4 , W - 7 , H - 9 , 5 ) , Gdip_DeleteBrush( Brush )
;@
Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , W , H-10 , "0x" . obj.ButtonColorPanelInnerBorderColor1AlphaEdit . obj.ButtonColorPanelInnerBorderColor1Edit , "0x" . obj.ButtonColorPanelInnerBorderColor2AlphaEdit . obj.ButtonColorPanelInnerBorderColor2Edit , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 4 , 5 , W - 9 , H - 11 , 5 ) , Gdip_DeleteBrush( Brush )
;@
Brush := Gdip_CreateLineBrushFromRect( 5 , 7 , W-11 , H-14 , "0x" . obj.ButtonColorPanelMainColor1AlphaEdit . obj.ButtonColorPanelMainColor1Edit , "0x" . obj.ButtonColorPanelMainColor2AlphaEdit . obj.ButtonColorPanelMainColor2Edit , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 5 , 7 , W - 11 , H - 14 , 5 ) , Gdip_DeleteBrush( Brush )
;@
Brush := Gdip_CreateLineBrushFromRect( 0 , 2 , W , H , "0x" . obj.TextColorPanelBottomColor1AlphaEdit . obj.TextColorPanelBottomColor1Edit , "0x" . obj.TextColorPanelBottomColor2AlphaEdit . obj.TextColorPanelBottomColor2Edit , 1 , 1 )
arr := [ { X: -1 , Y: -1 } , { X: 0 , Y: -1 } , { X: 1 , Y: -1 } , { X: -1 , Y: 0 } , { X: 1 , Y: 0 } , { X: -1 , Y: 1 } , { X: 0 , Y: 1 } , { X: 1 , Y: 1 } ]
Loop, % 8
;@
Gdip_TextToGraphics( G , obj.ButtonPanelTextEdit , "s" obj.FontPanelFontSizeEdit " " obj.FontPanelFontOptionsEdit " c" Brush " x" 0 + arr[A_Index].X + obj.FontPanelXOffsetEdit " y" 2 + arr[A_Index].Y + obj.FontPanelYOffsetEdit , obj.FontPanelFontEdit , W + obj.FontPanelWOffsetEdit , H + obj.FontPanelHOffsetEdit )
;@
Brush := Gdip_CreateLineBrushFromRect( 0 , 2 , W , H , "0x" . obj.TextColorPanelTopColor1AlphaEdit . obj.TextColorPanelTopColor1Edit , "0x" . obj.TextColorPanelTopColor2AlphaEdit . obj.TextColorPanelTopColor2Edit , 1 , 1 )
;@
Gdip_TextToGraphics( G , obj.ButtonPanelTextEdit , "s" obj.FontPanelFontSizeEdit " " obj.FontPanelFontOptionsEdit " c" Brush " x" 0 + obj.FontPanelXOffsetEdit " y" 2 + obj.FontPanelYOffsetEdit , obj.FontPanelFontEdit , W + obj.FontPanelWOffsetEdit , H + obj.FontPanelHOffsetEdit )
;@
if( obj.GlossyPanelUseGlossyCheckbox = 1 ){
;@
Brush := Gdip_BrushCreateSolid( "0x" . obj.GlossyPanelTopColorAlphaEdit . obj.GlossyPanelTopColorEdit ) , Gdip_FillRectangle( G , Brush , 6 , 10 , W-13 , ( H / 2 ) - 10 ) , Gdip_DeleteBrush( Brush )
;@
Brush := Gdip_BrushCreateSolid( "0x" . obj.GlossyPanelAccentColorAlphaEdit . obj.GlossyPanelAccentColorEdit ) , Gdip_FillRectangle( G , Brush , 10 , 12 , W - 21 , H / 15 ) , Gdip_DeleteBrush( Brush )
;@
Brush := Gdip_BrushCreateSolid( "0x" . obj.GlossyPanelBottomColorAlphaEdit . obj.GlossyPanelBottomColorEdit ) , Gdip_FillRectangle( G , Brush , 6 , 10 + ( H / 2 ) - 10 , W - 13 , ( H / 2 ) - 7 ) , Gdip_DeleteBrush( Brush )
}
Gdip_DeleteGraphics( G )
return pBitmap
}
_CreateDefaultBitmap( W , H , Obj ){
local arr := []
if( W = null )
W := 100
if( H = null )
H := 40
;@
pBitmap := Gdip_CreateBitmap( W , H ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
;@
Brush := Gdip_BrushCreateSolid( "0xFF" Obj.ButtonPanelBackgroundColorEdit ) , Gdip_FillRectangle( G , Brush , -1 , -1 , W + 2 , H + 2 ) , Gdip_DeleteBrush( Brush )
;@
Brush := Gdip_BrushCreateSolid( "0x" . Obj.ButtonColorPanelOuterBorderColorAlphaEdit . Obj.ButtonColorPanelOuterBorderColorEdit ) , Gdip_FillRoundedRectangle( G , Brush , 2 , 3 , W - 5 , H - 7 , 5 ) , Gdip_DeleteBrush( Brush )
;@
Brush := Gdip_BrushCreateSolid( "0x" . Obj.ButtonColorPanelCenterBorderColorAlphaEdit . Obj.ButtonColorPanelCenterBorderColorEdit ) , Gdip_FillRoundedRectangle( G , Brush , 3 , 4 , W - 7 , H - 9 , 5 ) , Gdip_DeleteBrush( Brush )
;@
Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , W , H - 10 , "0x" . Obj.ButtonColorPanelInnerBorderColor1AlphaEdit . Obj.ButtonColorPanelInnerBorderColor1Edit , "0x" . Obj.ButtonColorPanelInnerBorderColor2AlphaEdit . Obj.ButtonColorPanelInnerBorderColor2Edit , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 4 , 5 , W - 9 , H - 11 , 5 ) , Gdip_DeleteBrush( Brush )
;@
Brush := Gdip_CreateLineBrushFromRect( 5 , 7 , W - 11 , H - 14 , "0x" . Obj.ButtonColorPanelMainColor1AlphaEdit . Obj.ButtonColorPanelMainColor1Edit , "0x" . Obj.ButtonColorPanelMainColor2AlphaEdit . Obj.ButtonColorPanelMainColor2Edit , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 5 , 7 , W - 11 , H - 14 , 5 ) , Gdip_DeleteBrush( Brush )
;@
Brush := Gdip_CreateLineBrushFromRect( 0 , 2 , W , H , "0x" . Obj.TextColorPanelBottomColor1AlphaEdit . Obj.TextColorPanelBottomColor1Edit , "0x" . Obj.TextColorPanelBottomColor2AlphaEdit . Obj.TextColorPanelBottomColor2Edit , 1 , 1 )
arr := [ { X: -1 , Y: -1 } , { X: 0 , Y: -1 } , { X: 1 , Y: -1 } , { X: -1 , Y: 0 } , { X: 1 , Y: 0 } , { X: -1 , Y: 1 } , { X: 0 , Y: 1 } , { X: 1 , Y: 1 } ]
Loop, % 8
;@
Gdip_TextToGraphics( G , Obj.ButtonPanelTextEdit , "s" Obj.FontPanelFontSizeEdit " " Obj.FontPanelFontOptionsEdit " c" Brush " x" 0 + arr[A_Index].X + Obj.FontPanelXOffsetEdit " y" 2 + arr[A_Index].Y + Obj.FontPanelYOffsetEdit , Obj.FontPanelFontEdit , W + Obj.FontPanelWOffsetEdit , H + Obj.FontPanelHOffsetEdit )
;@
Brush := Gdip_CreateLineBrushFromRect( 0 , 2 , W , H , "0x" . Obj.TextColorPanelTopColor1AlphaEdit . Obj.TextColorPanelTopColor1Edit , "0x" . Obj.TextColorPanelTopColor2AlphaEdit . Obj.TextColorPanelTopColor2Edit , 1 , 1 )
;@
Gdip_TextToGraphics( G , Obj.ButtonPanelTextEdit , "s" Obj.FontPanelFontSizeEdit " " Obj.FontPanelFontOptionsEdit " c" Brush " x" 0 + Obj.FontPanelXOffsetEdit " y" 2 + Obj.FontPanelYOffsetEdit , Obj.FontPanelFontEdit , W + Obj.FontPanelWOffsetEdit , H + Obj.FontPanelHOffsetEdit )
;@
if( Obj.GlossyPanelUseGlossyCheckbox ){
Brush := Gdip_BrushCreateSolid( "0x" . Obj.GlossyPanelTopColorAlphaEdit . Obj.GlossyPanelTopColorEdit ) , Gdip_FillRectangle( G , Brush , 6 , 10 , W - 13 , ( H / 2 ) - 10 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0x" . Obj.GlossyPanelAccentColorAlphaEdit . Obj.GlossyPanelAccentColorEdit ) , Gdip_FillRectangle( G , Brush , 10 , 12 , W - 21 , H / 15 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0x" . Obj.GlossyPanelBottomColorAlphaEdit . Obj.GlossyPanelBottomColorEdit ) , Gdip_FillRectangle( G , Brush , 6 , 10 + ( H / 2 ) - 10 , W - 13 , ( H / 2 ) - 7 ) , Gdip_DeleteBrush( Brush )
}
Gdip_DeleteGraphics( G )
return pBitmap
}
SetDisplayWindow( obj ){
DisplayMasterBitmap := Gdip_CreateBitmap( 640 , 85 ) , G := Gdip_GraphicsFromImage( DisplayMasterBitmap ) , Gdip_SetSmoothingMode( G , 2 )
Brush := Gdip_BrushCreateSolid( "0xFF" . Obj.ALL.ButtonPanelBackgroundColorEdit ) , Gdip_FillRectangle( G , Brush , -1 , -1 , 642 , 87 ) , Gdip_DeleteBrush( Brush )
DisplayDefaultBitmap := _CreateDefaultBitmap( 200 , 65 , obj.Default )
DisplayHoverBitmap := _CreateHoverBitmap( 200 , 65 , obj.Hover )
DisplayPressedBitmap := _CreatePressedBitmap( 200 , 65 , obj.Pressed )
Gdip_DrawImage(G, DisplayDefaultBitmap , 10 , 10 , 200 , 65 ) , Gdip_DisposeImage( DisplayDefaultBitmap )
Gdip_DrawImage(G, DisplayHoverBitmap , 220 , 10 , 200 , 65 ) , Gdip_DisposeImage( DisplayHoverBitmap )
Gdip_DrawImage(G, DisplayPressedBitmap , 430 , 10 , 200 , 65 ) , Gdip_DisposeImage( DisplayPressedBitmap )
Gdip_DeleteGraphics( G )
hBitmap := Gdip_CreateHBITMAPFromBitmap( DisplayMasterBitmap )
Gdip_DisposeImage( DisplayMasterBitmap )
SetImage( DisplayHwnd , hBitmap )
DeleteObject( hBitmap )
}
AddControlPanel( obj ){
local hwnd
Gui,1:Add,Pic,x982 y480 w80 h24 0xE hwndhwnd gAutoUpdate
obj.AutoSwitch := Hwnd
obj.AutoSwitchState := 0
SetImage( obj.AutoSwitch , handle := AutoSwitchOff() ) , DeleteObject( handle )
Gui, 1:Add, Text,cTeal x980 y515 w80 h30 BackgroundTrans center 0x200 gUpdateButton,
Gui, 1:Add, Pic, x325 y470 w640 h85 HwndDisplayHwnd 0xE
SetDisplayWindow(obj)
}
AutoSwitchOn(){
;Bitmap Created Using: HB Bitmap Maker
pBitmap := Gdip_CreateBitmap( 80 , 24 ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
Brush := Gdip_BrushCreateSolid( "0xFF171717" ) , Gdip_FillRectangle( G , Brush , -1 , -1 , 143 , 28 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF000808" ) , Gdip_FillRoundedRectangle( G , Brush , 3 , 4 , 32 , 16 , 5 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF002222" ) , Gdip_FillRoundedRectangle( G , Brush , 4 , 5 , 30 , 14 , 5 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF004444" ) , Gdip_FillRoundedRectangle( G , Brush , 4 , 8 , 30 , 11 , 5 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF000808" ) , Gdip_FillEllipse( G , Brush , 17 , 0 , 22 , 22 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 5 , 0 , 24 , 20 , "0xff004444" , "0xff02060a" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 18 , 1 , 20 , 20 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 1 , 1 , 135 , 21 , "0xFF009999" , "0xFF004444" , 1 , 1 ) , Gdip_TextToGraphics( G , "Auto" , "s12 Center vCenter Bold NoWrap c" Brush " x14 y1" , "Segoe ui" , 90 , 24 ) , Gdip_DeleteBrush( Brush )
Gdip_DeleteGraphics( G )
hBitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
Gdip_DisposeImage( pBitmap )
return hBitmap
}
AutoSwitchOff(){
;Bitmap Created Using: HB Bitmap Maker
pBitmap := Gdip_CreateBitmap( 80 , 24 ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
Brush := Gdip_BrushCreateSolid( "0xFF171717" ) , Gdip_FillRectangle( G , Brush , -1 , -1 , 143 , 28 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF000808" ) , Gdip_FillRoundedRectangle( G , Brush , 3 , 4 , 32 , 16 , 5 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRoundedRectangle( G , Brush , 4 , 5 , 30 , 14 , 5 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF1D1D1D" ) , Gdip_FillRoundedRectangle( G , Brush , 4 , 8 , 30 , 11 , 5 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF000808" ) , Gdip_FillEllipse( G , Brush , 1 , 0 , 22 , 22 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 5 , 0 , 24 , 20 , "0xff004444" , "0xff02060a" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 2 , 1 , 20 , 20 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 1 , 1 , 135 , 21 , "0xFF009999" , "0xFF004444" , 1 , 1 ) , Gdip_TextToGraphics( G , "Auto" , "s12 Center vCenter Bold NoWrap c" Brush " x14 y1" , "Segoe ui" , 90 , 24 ) , Gdip_DeleteBrush( Brush )
Gdip_DeleteGraphics( G )
hBitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
Gdip_DisposeImage( pBitmap )
return hBitmap
}
AddTabsPanel( obj ){
local hwnd , handle
Gui, 1:Add, Pic, x16 y45 w343 h30 0xE hwndhwnd
obj.TabsPanelHwnd := hwnd
SetImage( hwnd , handle := Tabs("ALL") )
DeleteObject( handle )
;****************************************************************************************************
;All Tab
Gui, 1:Add, Text,cWhite x20 y50 w80 h20 BackgroundTrans hwndhwnd gSwitchTabs ;Border
Obj.Tab[hwnd] := "ALL"
CurrentTab := hwnd
;****************************************************************************************************
;Default Tab
Gui, 1:Add, Text,cWhite x105 y50 w80 h20 BackgroundTrans hwndhwnd gSwitchTabs ;Border
Obj.Tab[hwnd] := "Default"
;****************************************************************************************************
;Hover Tab
Gui, 1:Add, Text,cWhite x190 y50 w80 h20 BackgroundTrans hwndhwnd gSwitchTabs ;Border
Obj.Tab[hwnd] := "Hover"
;****************************************************************************************************
;Pressed Tab
Gui, 1:Add, Text,cWhite x275 y50 w80 h20 BackgroundTrans hwndhwnd gSwitchTabs ;Border
Obj.Tab[hwnd] := "Pressed"
}
AddButtonColorPanel( obj ){
local hwnd
Gui, 1:Add, Pic, x785 y245 w300 h220 0xE hwndhwnd
obj.ButtonColorPanelHwnd := hwnd
SetImage( hwnd , handle := ButtonColors() )
DeleteObject( handle )
;****************************************************************************************************
;Outer Border Color Alpha
Gui, 1:Add, Edit, cWhite x889 y283 w28 h18 -E0x200 Center hwndhwnd Limit2 gSubmitEdit
Obj.Edits.ButtonColorPanelOuterBorderColorAlphaEdit := hwnd
Obj.EditHandles[hwnd] := "ButtonColorPanelOuterBorderColorAlphaEdit"
;Outer Border Color
Gui, 1:Add, Edit, cWhite x929 y283 w88 h18 -E0x200 Center hwndhwnd Limit6 gSubmitEdit
Obj.Edits.ButtonColorPanelOuterBorderColorEdit := hwnd
Obj.EditHandles[hwnd] := "ButtonColorPanelOuterBorderColorEdit"
;Button
Gui, 1:Add, Text,cWhite x1022 y280 w49 h24 BackgroundTrans hwndhwnd gGetColor
Obj.ButtonHandles[hwnd] := Obj.Edits.ButtonColorPanelOuterBorderColorEdit
;****************************************************************************************************
;Center Border Color Alpha
Gui, 1:Add, Edit, cWhite x889 y313 w28 h18 -E0x200 Center hwndhwnd Limit2 gSubmitEdit
Obj.Edits.ButtonColorPanelCenterBorderColorAlphaEdit := hwnd
Obj.EditHandles[hwnd] := "ButtonColorPanelCenterBorderColorAlphaEdit"
;Outer Border Color
Gui, 1:Add, Edit, cWhite x929 y313 w88 h18 -E0x200 Center hwndhwnd Limit6 gSubmitEdit
Obj.Edits.ButtonColorPanelCenterBorderColorEdit := hwnd
Obj.EditHandles[hwnd] := "ButtonColorPanelCenterBorderColorEdit"
;Button
Gui, 1:Add, Text,cWhite x1022 y310 w49 h24 BackgroundTrans hwndhwnd gGetColor
Obj.ButtonHandles[hwnd] := Obj.Edits.ButtonColorPanelCenterBorderColorEdit
;****************************************************************************************************
;Inner Border Color 1 Alpha
Gui, 1:Add, Edit, cWhite x889 y343 w28 h18 -E0x200 Center hwndhwnd Limit2 gSubmitEdit
Obj.Edits.ButtonColorPanelInnerBorderColor1AlphaEdit := hwnd
Obj.EditHandles[hwnd] := "ButtonColorPanelInnerBorderColor1AlphaEdit"
;Inner Border Color 1
Gui, 1:Add, Edit, cWhite x929 y343 w88 h18 -E0x200 Center hwndhwnd Limit6 gSubmitEdit
Obj.Edits.ButtonColorPanelInnerBorderColor1Edit := hwnd
Obj.EditHandles[hwnd] := "ButtonColorPanelInnerBorderColor1Edit"
;Button
Gui, 1:Add, Text,cWhite x1022 y340 w49 h24 BackgroundTrans hwndhwnd gGetColor
Obj.ButtonHandles[hwnd] := Obj.Edits.ButtonColorPanelInnerBorderColor1Edit
;****************************************************************************************************
;Inner Border Color 2 Alpha
Gui, 1:Add, Edit, cWhite x889 y373 w28 h18 -E0x200 Center hwndhwnd Limit2 gSubmitEdit
Obj.Edits.ButtonColorPanelInnerBorderColor2AlphaEdit := hwnd
Obj.EditHandles[hwnd] := "ButtonColorPanelInnerBorderColor2AlphaEdit"
;Inner Border Color 2
Gui, 1:Add, Edit, cWhite x929 y373 w88 h18 -E0x200 Center hwndhwnd Limit6 gSubmitEdit
Obj.Edits.ButtonColorPanelInnerBorderColor2Edit := hwnd
Obj.EditHandles[hwnd] := "ButtonColorPanelInnerBorderColor2Edit"
;Button
Gui, 1:Add, Text,cWhite x1022 y370 w49 h24 BackgroundTrans hwndhwnd gGetColor
Obj.ButtonHandles[hwnd] := Obj.Edits.ButtonColorPanelInnerBorderColor2Edit
;****************************************************************************************************
;Main Color 1 Alpha
Gui, 1:Add, Edit, cWhite x889 y403 w28 h18 -E0x200 Center hwndhwnd Limit2 gSubmitEdit
Obj.Edits.ButtonColorPanelMainColor1AlphaEdit := hwnd
Obj.EditHandles[hwnd] := "ButtonColorPanelMainColor1AlphaEdit"
;Main Color 1
Gui, 1:Add, Edit, cWhite x929 y403 w88 h18 -E0x200 Center hwndhwnd Limit6 gSubmitEdit
Obj.Edits.ButtonColorPanelMainColor1Edit := hwnd
Obj.EditHandles[hwnd] := "ButtonColorPanelMainColor1Edit"
;Button
Gui, 1:Add, Text,cWhite x1022 y400 w49 h24 BackgroundTrans hwndhwnd gGetColor
Obj.ButtonHandles[hwnd] := Obj.Edits.ButtonColorPanelMainColor1Edit
;****************************************************************************************************
;Main Color 2 Alpha
Gui, 1:Add, Edit, cWhite x889 y433 w28 h18 -E0x200 Center hwndhwnd Limit2 gSubmitEdit
Obj.Edits.ButtonColorPanelMainColor2AlphaEdit := hwnd
Obj.EditHandles[hwnd] := "ButtonColorPanelMainColor2AlphaEdit"
;Main Color 2
Gui, 1:Add, Edit, cWhite x929 y433 w88 h18 -E0x200 Center hwndhwnd Limit6 gSubmitEdit
Obj.Edits.ButtonColorPanelMainColor2Edit := hwnd
Obj.EditHandles[hwnd] := "ButtonColorPanelMainColor2Edit"
;Button
Gui, 1:Add, Text,cWhite x1022 y430 w49 h24 BackgroundTrans hwndhwnd gGetColor
Obj.ButtonHandles[hwnd] := Obj.Edits.ButtonColorPanelMainColor2Edit
;****************************************************************************************************
}
AddGlossyPanel( obj ){
local hwnd
Gui, 1:Add, Pic, x785 y81 w300 h165 0xE hwndhwnd
obj.GlossyPanelHwnd := hwnd
SetImage( hwnd , handle := Glossy() )
DeleteObject( handle )
;****************************************************************************************************
;Use Glossy Checkbox
Gui, 1:Add, Text, x807 y118 w120 h20 BackgroundTrans gToggleGlossy
;****************************************************************************************************
;Top Color Alpha
Gui, 1:Add, Edit, cWhite x889 y152 w28 h18 -E0x200 Center hwndhwnd Limit2 gSubmitEdit
Obj.Edits.GlossyPanelTopColorAlphaEdit := hwnd
Obj.EditHandles[hwnd] := "GlossyPanelTopColorAlphaEdit"
;Top Color
Gui, 1:Add, Edit, cWhite x929 y152 w88 h18 -E0x200 Center hwndhwnd Limit6 gSubmitEdit
Obj.Edits.GlossyPanelTopColorEdit := hwnd
Obj.EditHandles[hwnd] := "GlossyPanelTopColorEdit"
;Button
Gui, 1:Add, Text,cWhite x1022 y148 w49 h24 BackgroundTrans hwndhwnd gGetColor
Obj.ButtonHandles[hwnd] := Obj.Edits.GlossyPanelTopColorEdit
;****************************************************************************************************
;Bottom Color Alpha
Gui, 1:Add, Edit, cWhite x889 y182 w28 h18 -E0x200 Center hwndhwnd Limit2 gSubmitEdit
Obj.Edits.GlossyPanelBottomColorAlphaEdit := hwnd
Obj.EditHandles[hwnd] := "GlossyPanelBottomColorAlphaEdit"
;Bottom Color
Gui, 1:Add, Edit, cWhite x929 y182 w88 h18 -E0x200 Center hwndhwnd Limit6 gSubmitEdit
Obj.Edits.GlossyPanelBottomColorEdit := hwnd
Obj.EditHandles[hwnd] := "GlossyPanelBottomColorEdit"
;Button
Gui, 1:Add, Text,cWhite x1022 y178 w49 h24 BackgroundTrans hwndhwnd gGetColor
Obj.ButtonHandles[hwnd] := Obj.Edits.GlossyPanelBottomColorEdit
;****************************************************************************************************
;Accent Color Alpha
Gui, 1:Add, Edit, cWhite x889 y212 w28 h18 -E0x200 Center hwndhwnd Limit2 gSubmitEdit
Obj.Edits.GlossyPanelAccentColorAlphaEdit := hwnd
Obj.EditHandles[hwnd] := "GlossyPanelAccentColorAlphaEdit"
;Accent Color
Gui, 1:Add, Edit, cWhite x929 y212 w88 h18 -E0x200 Center hwndhwnd Limit6 gSubmitEdit
Obj.Edits.GlossyPanelAccentColorEdit := hwnd
Obj.EditHandles[hwnd] := "GlossyPanelAccentColorEdit"
;Button
Gui, 1:Add, Text,cWhite x1022 y208 w49 h24 BackgroundTrans hwndhwnd gGetColor
Obj.ButtonHandles[hwnd] := Obj.Edits.GlossyPanelAccentColorEdit
;****************************************************************************************************
}
AddTextColorPanel( obj ){
local hwnd
Gui, 1:Add, Pic, x16 y410 w300 h200 0xE hwndhwnd
obj.TextColorPanelHwnd := hwnd
SetImage( hwnd , handle := FontColor() )
DeleteObject( handle )
;****************************************************************************************************
;Top Color 1 Alpha
Gui, 1:Add, Edit, cWhite x120 y445 w28 h18 -E0x200 Center hwndhwnd Limit2 gSubmitEdit
Obj.Edits.TextColorPanelTopColor1AlphaEdit := hwnd
Obj.EditHandles[hwnd] := "TextColorPanelTopColor1AlphaEdit"
;Top Color 1
Gui, 1:Add, Edit, cWhite x160 y445 w88 h18 -E0x200 Center hwndhwnd Limit6 gSubmitEdit
Obj.Edits.TextColorPanelTopColor1Edit := hwnd
Obj.EditHandles[hwnd] := "TextColorPanelTopColor1Edit"
;Button
Gui, 1:Add, Text,cWhite x253 y442 w48 h24 BackgroundTrans hwndhwnd gGetColor
Obj.ButtonHandles[hwnd] := Obj.Edits.TextColorPanelTopColor1Edit
;****************************************************************************************************
;Top Color 2 Alpha
Gui, 1:Add, Edit, cWhite x120 y475 w28 h18 -E0x200 Center hwndhwnd Limit2 gSubmitEdit
Obj.Edits.TextColorPanelTopColor2AlphaEdit := hwnd
Obj.EditHandles[hwnd] := "TextColorPanelTopColor2AlphaEdit"
;Top Color 2
Gui, 1:Add, Edit, cWhite x160 y475 w88 h18 -E0x200 Center hwndhwnd Limit6 gSubmitEdit
Obj.Edits.TextColorPanelTopColor2Edit := hwnd
Obj.EditHandles[hwnd] := "TextColorPanelTopColor2Edit"
;Button
Gui, 1:Add, Text,cWhite x253 y472 w48 h24 BackgroundTrans hwndhwnd gGetColor
Obj.ButtonHandles[hwnd] := Obj.Edits.TextColorPanelTopColor2Edit
;****************************************************************************************************
;Bottom Color 1 Alpha
Gui, 1:Add, Edit, cWhite x120 y505 w28 h18 -E0x200 Center hwndhwnd Limit2 gSubmitEdit
Obj.Edits.TextColorPanelBottomColor1AlphaEdit := hwnd
Obj.EditHandles[hwnd] := "TextColorPanelBottomColor1AlphaEdit"
;Bottom Color 1
Gui, 1:Add, Edit, cWhite x160 y505 w88 h18 -E0x200 Center hwndhwnd Limit6 gSubmitEdit
Obj.Edits.TextColorPanelBottomColor1Edit := hwnd
Obj.EditHandles[hwnd] := "TextColorPanelBottomColor1Edit"
;Button
Gui, 1:Add, Text,cWhite x253 y502 w48 h24 BackgroundTrans hwndhwnd gGetColor
Obj.ButtonHandles[hwnd] := Obj.Edits.TextColorPanelBottomColor1Edit
;****************************************************************************************************
;Bottom Color 2 Alpha
Gui, 1:Add, Edit, cWhite x120 y535 w28 h18 -E0x200 Center hwndhwnd Limit2 gSubmitEdit
Obj.Edits.TextColorPanelBottomColor2AlphaEdit := hwnd
Obj.EditHandles[hwnd] := "TextColorPanelBottomColor2AlphaEdit"
;Bottom Color 2
Gui, 1:Add, Edit, cWhite x160 y535 w88 h18 -E0x200 Center hwndhwnd Limit6 gSubmitEdit
Obj.Edits.TextColorPanelBottomColor2Edit := hwnd
Obj.EditHandles[hwnd] := "TextColorPanelBottomColor2Edit"
;Button
Gui, 1:Add, Text,cWhite x253 y532 w48 h24 BackgroundTrans hwndhwnd gGetColor
Obj.ButtonHandles[hwnd] := Obj.Edits.TextColorPanelBottomColor2Edit
;****************************************************************************************************
}
AddFontPanel( obj ){
local hwnd
Gui, 1:Add, Pic, x16 y215 w300 h200 0xE hwndhwnd
obj.FontPanelHwnd := hwnd
SetImage( hwnd , handle := FontOptions() )
DeleteObject( handle )
;Font Size
Gui, 1:Add, Edit, cWhite x95 y250 w55 h18 -E0x200 Center Limit3 Number hwndhwnd gSubmitEdit
Obj.Edits.FontPanelFontSizeEdit := hwnd
Obj.EditHandles[hwnd] := "FontPanelFontSizeEdit"
;Font
Gui, 1:Add, Edit, cWhite x70 y280 w225 h18 -E0x200 Center hwndhwnd gSubmitEdit
Obj.Edits.FontPanelFontEdit := hwnd
Obj.EditHandles[hwnd] := "FontPanelFontEdit"
;Font Options
Gui, 1:Add, Edit, cWhite x117 y310 w178 h18 -E0x200 Center hwndhwnd gSubmitEdit
Obj.Edits.FontPanelFontOptionsEdit := hwnd
Obj.EditHandles[hwnd] := "FontPanelFontOptionsEdit"
;X Offset
Gui, 1:Add, Edit, cWhite x87 y340 w70 h18 -E0x200 Center Limit4 hwndhwnd gSubmitEdit
Obj.Edits.FontPanelXOffsetEdit := hwnd
Obj.EditHandles[hwnd] := "FontPanelXOffsetEdit"
;Y Offset
Gui, 1:Add, Edit, cWhite x217 y340 w70 h18 -E0x200 Center Limit4 hwndhwnd gSubmitEdit
Obj.Edits.FontPanelYOffsetEdit := hwnd
Obj.EditHandles[hwnd] := "FontPanelYOffsetEdit"
;W Offset
Gui, 1:Add, Edit, cWhite x93 y370 w65 h18 -E0x200 Center Limit4 hwndhwnd gSubmitEdit
Obj.Edits.FontPanelWOffsetEdit := hwnd
Obj.EditHandles[hwnd] := "FontPanelWOffsetEdit"
;H Offset
Gui, 1:Add, Edit, cWhite x223 y370 w65 h18 -E0x200 Center Limit4 hwndhwnd gSubmitEdit
Obj.Edits.FontPanelHOffsetEdit := hwnd
Obj.EditHandles[hwnd] := "FontPanelHOffsetEdit"
}
AddButtonOptionsPanel( obj ){
local hwnd
Gui, 1:Add, Pic, x16 y81 w300 h140 0xE hwndhwnd
obj.ButtonOptionsPanelHwnd := hwnd
SetImage( hwnd , handle := ButtonOptions() )
DeleteObject( handle )
;text
Gui, 1:Add, Edit,cWhite x113 y119 w179 h18 -E0x200 Center hwndhwnd gSubmitEdit
Obj.Edits.ButtonPanelTextEdit := hwnd
Obj.EditHandles[hwnd] := "ButtonPanelTextEdit"
;width
Gui, 1:Add, Edit,cWhite x117 y148 w43 h18 -E0x200 Center Limit4 Number hwndhwnd gSubmitEdit
Obj.Edits.ButtonPanelWidthEdit := hwnd
Obj.EditHandles[hwnd] := "ButtonPanelWidthEdit"
;height
Gui, 1:Add, Edit,cWhite x255 y148 w43 h18 -E0x200 Center Limit4 Number hwndhwnd gSubmitEdit
Obj.Edits.ButtonPanelHeightEdit := hwnd
Obj.EditHandles[hwnd] := "ButtonPanelHeightEdit"
;Background Color
Gui, 1:Add, Edit,cWhite x142 y179 w111 h18 -E0x200 Center Limit6 hwndhwnd gSubmitEdit
Obj.Edits.ButtonPanelBackgroundColorEdit := hwnd
Obj.EditHandles[hwnd] := "ButtonPanelBackgroundColorEdit"
;Button
Gui, 1:Add, Text,cWhite x262 y177 w36 h21 BackgroundTrans hwndhwnd gGetColor
Obj.ButtonHandles[hwnd] := Obj.Edits.ButtonPanelBackgroundColorEdit
}
CenterPanel( w , h , tab , obj , main ){
pBitmap := Gdip_CreateBitmap( w , h ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
Brush := Gdip_BrushCreateSolid( "0xFF" Obj.ButtonPanelBackgroundColorEdit ) , Gdip_FillRectangle( G , Brush , -1 , -1 , w+2 , h+2 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 0 , 0 , w-1 , h-1 ) , Gdip_DeletePen( Pen )
if(isPressed){
Gdip_DrawImage(G, HBBitmap := TAG(main) , ( w / 2 ) - ( 200 / 2 ) , 20 , 200 , 200 ) , Gdip_DisposeImage( HBBitmap )
Gdip_DrawImage(G, HBBitmap := _CreatePressedBitmap( main.Pressed.ButtonPanelWidthEdit , main.Pressed.ButtonPanelHeightEdit , main.Pressed ) , ( w / 2 ) - ( main.Pressed.ButtonPanelWidthEdit / 2 ) , 230 , main.Pressed.ButtonPanelWidthEdit, main.Pressed.ButtonPanelHeightEdit ) , Gdip_DisposeImage( HBBitmap )
}else if(Active){
Gdip_DrawImage(G, HBBitmap := TAG(main) , ( w / 2 ) - ( 200 / 2 ) , 20 , 200 , 200 ) , Gdip_DisposeImage( HBBitmap )
Gdip_DrawImage(G, HBBitmap := _CreateHoverBitmap( main.Hover.ButtonPanelWidthEdit , main.Hover.ButtonPanelHeightEdit , main.Hover ) , ( w / 2 ) - ( main.Hover.ButtonPanelWidthEdit / 2 ) , 230 , main.Hover.ButtonPanelWidthEdit, main.Hover.ButtonPanelHeightEdit ) , Gdip_DisposeImage( HBBitmap )
}else if(tab="All"){
GuiControl, 1: Move , % DemoHwnd, % "x" ( w / 2 ) - ( main.Default.ButtonPanelWidthEdit / 2 ) + 320 " y" 230 + 95 " w" main.Default.ButtonPanelWidthEdit " h" main.Default.ButtonPanelHeightEdit
Gdip_DrawImage(G, HBBitmap := TAG(main) , ( w / 2 ) - ( 200 / 2 ) , 20 , 200 , 200 ) , Gdip_DisposeImage( HBBitmap )
Gdip_DrawImage(G, HBBitmap := _CreateDefaultBitmap( main.Default.ButtonPanelWidthEdit , main.Default.ButtonPanelHeightEdit , main.Default ) , ( w / 2 ) - ( main.Default.ButtonPanelWidthEdit / 2 ) , 230 , main.Default.ButtonPanelWidthEdit, main.Default.ButtonPanelHeightEdit ) , Gdip_DisposeImage( HBBitmap )
}else{
GuiControl, 1: Move , % DemoHwnd, x0 y0 w0 h0
Gdip_DrawImage(G, HBBitmap := _Create%Tab%Bitmap( Obj.ButtonPanelWidthEdit , Obj.ButtonPanelHeightEdit , Obj ) , ( w / 2 ) - ( Obj.ButtonPanelWidthEdit / 2 ) , ( h / 2 ) - ( Obj.ButtonPanelHeightEdit / 2 ) , Obj.ButtonPanelWidthEdit, Obj.ButtonPanelHeightEdit ) , Gdip_DisposeImage( HBBitmap )
}
;Extra
;___________________________________
Pen := Gdip_CreatePen( "0xFF121212" , 4 )
;~ Pen := Gdip_CreatePen( "0xFFff0000" , 4 )
;~ Gdip_DrawLine( G , Pen , 315 , 92 , 785 , 92 )
;~ Gdip_DrawLine( G , Pen , 317 , 89 , 317 , 125 )
Gdip_DrawRoundedRectangle( G , Pen , 3 , 3 , 453 , 356 , 0 ) , Gdip_DeletePen( Pen )
Pen := Gdip_CreatePen( "0xFF004444" , 1 )
Gdip_DrawRoundedRectangle( G , Pen , 5 , 5 , 449 , 352 , 0 ) , Gdip_DeletePen( Pen )
;x320 y95 w:=460 , h:= 363
Gdip_DeleteGraphics( G )
hBitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
Gdip_DisposeImage( pBitmap )
return hBitmap
}
Tabs( tab := "All" ){
;Bitmap Created Using: HB Bitmap Maker
pBitmap := Gdip_CreateBitmap( 343 , 30 ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , -1 , -1 , 352 , 32 ) , Gdip_DeleteBrush( Brush )
if(tab="All"){
Brush := Gdip_CreateLineBrushFromRect( 4 , 5 , 79 , 18 , "0xFF006666" , "0xFF000000" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 3 , 5 , 80 , 20 , 5 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 2 , 3 , 80 , 22 , "0xFF008888" , "0xFF002222" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRoundedRectangle( G , Pen , 3 , 5 , 80 , 20 , 5 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 4 , 5 , 78 , 20 , "0xFF006666" , "0xFFffffff" , 1 , 1 ) , Gdip_TextToGraphics( G , "ALL" , "s12 Center vCenter Bold c" Brush " x3 y6" , "Segoe ui" , 80 , 20 ) , Gdip_DeleteBrush( Brush )
;Highlight
Brush := Gdip_BrushCreateSolid( "0x11F0F0F0" ) , Gdip_FillRectangle( G , Brush , 5 , 7 , 75 , 8 ) , Gdip_DeleteBrush( Brush )
}else{
Brush := Gdip_CreateLineBrushFromRect( 3 , 5 , 80 , 20 , "0xFF1f1f1f" , "0xFF121212" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 3 , 5 , 80 , 20 , 5 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRoundedRectangle( G , Pen , 3 , 5 , 80 , 20 , 5 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF004444" ) , Gdip_TextToGraphics( G , "All" , "s12 Center vCenter Bold c" Brush " x3 y6" , "Segoe ui" , 80 , 20 ) , Gdip_DeleteBrush( Brush )
}
if(tab="Default"){
Brush := Gdip_CreateLineBrushFromRect( 88 , 5 , 80 , 20 , "0xFF006666" , "0xFF000000" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 88 , 5 , 80 , 20 , 5 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 88 , 5 , 80 , 20 , "0xFF008888" , "0xFF002222" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRoundedRectangle( G , Pen , 88 , 5 , 80 , 20 , 5 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 88 , 5 , 80 , 20 , "0xFF006666" , "0xFFffffff" , 1 , 1 ) , Gdip_TextToGraphics( G , "DEFAULT" , "s12 Center vCenter Bold c" Brush " x88 y6" , "Segoe ui" , 80 , 20 ) , Gdip_DeleteBrush( Brush )
;Highlight
Brush := Gdip_BrushCreateSolid( "0x11F0F0F0" ) , Gdip_FillRectangle( G , Brush , 90 , 7 , 75 , 8 ) , Gdip_DeleteBrush( Brush )
}else{
Brush := Gdip_CreateLineBrushFromRect( 88 , 5 , 80 , 20 , "0xFF1f1f1f" , "0xFF121212" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 88 , 5 , 80 , 20 , 5 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRoundedRectangle( G , Pen , 88 , 5 , 80 , 20 , 5 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF004444" ) , Gdip_TextToGraphics( G , "Default" , "s12 Center vCenter Bold c" Brush " x88 y6" , "Segoe ui" , 80 , 20 ) , Gdip_DeleteBrush( Brush )
}
if(tab="Hover"){
Brush := Gdip_CreateLineBrushFromRect( 173 , 5 , 80 , 20 , "0xFF006666" , "0xFF000000" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 173 , 5 , 80 , 20 , 5 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 173 , 5 , 80 , 20 , "0xFF008888" , "0xFF002222" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRoundedRectangle( G , Pen , 173 , 5 , 80 , 20 , 5 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 173 , 5 , 80 , 20 , "0xFF006666" , "0xFFffffff" , 1 , 1 ) , Gdip_TextToGraphics( G , "HOVER" , "s12 Center vCenter Bold c" Brush " x173 y6" , "Segoe ui" , 80 , 20 ) , Gdip_DeleteBrush( Brush )
;Highlight
Brush := Gdip_BrushCreateSolid( "0x11F0F0F0" ) , Gdip_FillRectangle( G , Brush , 175 , 7 , 75 , 8 ) , Gdip_DeleteBrush( Brush )
}else{
Brush := Gdip_CreateLineBrushFromRect( 89 , 5 , 77 , 20 , "0xFF1f1f1f" , "0xFF121212" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 173 , 5 , 80 , 20 , 5 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRoundedRectangle( G , Pen , 173 , 5 , 80 , 20 , 5 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF004444" ) , Gdip_TextToGraphics( G , "Hover" , "s12 Center vCenter Bold c" Brush " x173 y6" , "Segoe ui" , 80 , 20 ) , Gdip_DeleteBrush( Brush )
}
if(tab="Pressed"){
Brush := Gdip_CreateLineBrushFromRect( 258 , 5 , 80 , 20 , "0xFF006666" , "0xFF000000" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 258 , 5 , 80 , 20 , 5 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 258 , 5 , 80 , 20 , "0xFF008888" , "0xFF002222" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRoundedRectangle( G , Pen , 258 , 5 , 80 , 20 , 5 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 258 , 5 , 80 , 20 , "0xFF006666" , "0xFFffffff" , 1 , 1 ) , Gdip_TextToGraphics( G , "PRESSED" , "s12 Center vCenter Bold c" Brush " x258 y6" , "Segoe ui" , 80 , 20 ) , Gdip_DeleteBrush( Brush )
;Highlight
Brush := Gdip_BrushCreateSolid( "0x11F0F0F0" ) , Gdip_FillRectangle( G , Brush , 260 , 7 , 75 , 8 ) , Gdip_DeleteBrush( Brush )
}else{
Brush := Gdip_CreateLineBrushFromRect( 89 , 5 , 77 , 20 , "0xFF1f1f1f" , "0xFF121212" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 258 , 5 , 80 , 20 , 5 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRoundedRectangle( G , Pen , 258 , 5 , 80 , 20 , 5 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF004444" ) , Gdip_TextToGraphics( G , "Pressed" , "s12 Center vCenter Bold c" Brush " x258 y6" , "Segoe ui" , 80 , 20 ) , Gdip_DeleteBrush( Brush )
}
;~ ;Highlight
;~ Brush := Gdip_BrushCreateSolid( "0x11F0F0F0" ) , Gdip_FillRectangle( G , Brush , 5 , 7 , 75 , 8 ) , Gdip_DeleteBrush( Brush )
Gdip_DeleteGraphics( G )
hBitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
Gdip_DisposeImage( pBitmap )
return hBitmap
}
ButtonColors(){
local BackgroundColor := "0xFF171717" , HeaderColor := "0xFF071414"
;Bitmap Created Using: HB Bitmap Maker
pBitmap := Gdip_CreateBitmap( 300 , 220 ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
Brush := Gdip_BrushCreateSolid( "0xFF1D1D1D" ) , Gdip_FillRectangle( G , Brush , -1 , -1 , 302 , 222 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( BackgroundColor ) , Gdip_FillRectangle( G , Brush , 10 , 15 , 280 , 198 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 10 , 15 , 280 , 198 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( HeaderColor ) , Gdip_FillRectangle( G , Brush , 15 , 5 , 138 , 22 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 15 , 8 , 96 , 17 , "0xFF00aaaa" , "0xFF006666" , 1 , 1 ) , Gdip_TextToGraphics( G , "Button Colors" , "s12 Bold c" Brush " x42 y8" , "Segoe ui" , 122 , 22 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 15 , 5 , 138 , 22 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF006666" ) , Gdip_TextToGraphics( G , "Outer Border:" , "s12 c" Brush " x16 y38" , "Segoe ui" , 122 , 22 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 102 , 35 , 30 , 22 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 102 , 35 , 30 , 22 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 142 , 35 , 90 , 22 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 142 , 35 , 90 , 22 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 236 , 34 , 49 , 24 , "0xFF2d2d2d" , "0xFF0d0d0d" , 1 , 1 ) , Gdip_FillRectangle( G , Brush , 237 , 34 , 48 , 24 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 236 , 35 , 51 , 49 , "0xFF006666" , "0xFF121212" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRectangle( G , Pen , 237 , 34 , 48 , 24 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 15 , 8 , 96 , 17 , "0xFF00aaaa" , "0xFF006666" , 1 , 1 ) , Gdip_TextToGraphics( G , "Get" , "s12 Bold c" Brush " x249 y38" , "Segoe ui" , 122 , 22 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF006666" ) , Gdip_TextToGraphics( G , "Center Border:" , "s12 c" Brush " x16 y68" , "Segoe ui" , 122 , 22 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 102 , 65 , 30 , 22 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 102 , 65 , 30 , 22 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 142 , 65 , 90 , 22 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 142 , 65 , 90 , 22 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 238 , 63 , 47 , 25 , "0xFF2d2d2d" , "0xFF0d0d0d" , 1 , 1 ) , Gdip_FillRectangle( G , Brush , 237 , 64 , 48 , 24 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 236 , 61 , 51 , 49 , "0xFF006666" , "0xFF121212" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRectangle( G , Pen , 237 , 64 , 48 , 24 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 237 , 66 , 49 , 20 , "0xFF00aaaa" , "0xFF006666" , 1 , 1 ) , Gdip_TextToGraphics( G , "Get" , "s12 Bold c" Brush " x249 y68" , "Segoe ui" , 122 , 22 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF006666" ) , Gdip_TextToGraphics( G , "Inner Border 1:" , "s12 c" Brush " x16 y98" , "Segoe ui" , 122 , 22 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 102 , 95 , 30 , 22 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 102 , 95 , 30 , 22 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 142 , 95 , 90 , 22 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 142 , 95 , 90 , 22 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 237 , 94 , 47 , 24 , "0xFF2d2d2d" , "0xFF0d0d0d" , 1 , 1 ) , Gdip_FillRectangle( G , Brush , 237 , 94 , 48 , 24 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 236 , 94 , 50 , 40 , "0xFF006666" , "0xFF121212" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRectangle( G , Pen , 237 , 94 , 48 , 24 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 238 , 94 , 47 , 24 , "0xFF00aaaa" , "0xFF006666" , 1 , 1 ) , Gdip_TextToGraphics( G , "Get" , "s12 Bold c" Brush " x249 y98" , "Segoe ui" , 122 , 22 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF006666" ) , Gdip_TextToGraphics( G , "Inner Border 2:" , "s12 c" Brush " x16 y128" , "Segoe ui" , 122 , 22 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 102 , 125 , 30 , 22 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 102 , 125 , 30 , 22 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 142 , 125 , 90 , 22 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 142 , 125 , 90 , 22 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 238 , 124 , 47 , 23 , "0xFF2d2d2d" , "0xFF0d0d0d" , 1 , 1 ) , Gdip_FillRectangle( G , Brush , 237 , 124 , 48 , 24 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 238 , 124 , 47 , 43 , "0xFF006666" , "0xFF121212" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRectangle( G , Pen , 237 , 124 , 48 , 24 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 238 , 128 , 48 , 21 , "0xFF00aaaa" , "0xFF006666" , 1 , 1 ) , Gdip_TextToGraphics( G , "Get" , "s12 Bold c" Brush " x249 y128" , "Segoe ui" , 122 , 22 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF006666" ) , Gdip_TextToGraphics( G , "Main 1:" , "s12 c" Brush " x16 y158" , "Segoe ui" , 122 , 22 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 102 , 155 , 30 , 22 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 102 , 155 , 30 , 22 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 142 , 155 , 90 , 22 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 142 , 155 , 90 , 22 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 236 , 154 , 50 , 21 , "0xFF2d2d2d" , "0xFF0d0d0d" , 1 , 1 ) , Gdip_FillRectangle( G , Brush , 237 , 154 , 48 , 24 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 236 , 153 , 52 , 42 , "0xFF006666" , "0xFF121212" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRectangle( G , Pen , 237 , 154 , 48 , 24 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 237 , 154 , 48 , 23 , "0xFF00aaaa" , "0xFF006666" , 1 , 1 ) , Gdip_TextToGraphics( G , "Get" , "s12 Bold c" Brush " x249 y158" , "Segoe ui" , 122 , 22 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF006666" ) , Gdip_TextToGraphics( G , "Main 2:" , "s12 c" Brush " x16 y188" , "Segoe ui" , 122 , 22 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 102 , 185 , 30 , 22 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 102 , 185 , 30 , 22 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 142 , 185 , 90 , 22 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 142 , 185 , 90 , 22 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 237 , 184 , 48 , 24 , "0xFF2d2d2d" , "0xFF0d0d0d" , 1 , 1 ) , Gdip_FillRectangle( G , Brush , 237 , 184 , 48 , 24 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 236 , 182 , 51 , 51 , "0xFF006666" , "0xFF121212" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRectangle( G , Pen , 237 , 184 , 48 , 24 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 237 , 154 , 48 , 23 , "0xFF00aaaa" , "0xFF006666" , 1 , 1 ) , Gdip_TextToGraphics( G , "Get" , "s12 Bold c" Brush " x249 y188" , "Segoe ui" , 122 , 22 ) , Gdip_DeleteBrush( Brush )
Gdip_DeleteGraphics( G )
hBitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
Gdip_DisposeImage( pBitmap )
return hBitmap
}
Glossy( input := 0 ){
local BackgroundColor := "0xFF171717" , HeaderColor := "0xFF071414"
;Bitmap Created Using: HB Bitmap Maker
pBitmap := Gdip_CreateBitmap( 300 , 165 ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
Brush := Gdip_BrushCreateSolid( "0xFF1D1D1D" ) , Gdip_FillRectangle( G , Brush , -1 , -1 , 302 , 172 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( BackgroundColor ) , Gdip_FillRectangle( G , Brush , 10 , 15 , 280 , 145 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 10 , 15 , 280 , 145 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( HeaderColor ) , Gdip_FillRectangle( G , Brush , 15 , 6 , 120 , 22 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 15 , 6 , 120 , 22 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 15 , 6 , 120 , 21 , "0xFF00aaaa" , "0xFF004444" , 1 , 1 ) , Gdip_TextToGraphics( G , "Glossy" , "s12 Center vCenter Bold c" Brush " x15 y6" , "Segoe ui" , 120 , 22 ) , Gdip_DeleteBrush( Brush )
;Use Glossy Checkbox
Brush := Gdip_BrushCreateSolid( BackgroundColor ) , Gdip_FillRectangle( G , Brush , 18 , 38 , 122 , 19 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 21 , 41 , 13 , 13 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( (input=1)?("0xFF008888"):("0xFF003333") ) , Gdip_FillRectangle( G , Brush , 24 , 44 , 7 , 7 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF006666" ) , Gdip_TextToGraphics( G , "Use Glossy Effect" , "s12 c" Brush " x41 y40" , "Segoe ui" , 120 , 22 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF006666" ) , Gdip_TextToGraphics( G , "Top Color:" , "s12 c" Brush " x16 y70" , "Segoe ui" , 120 , 22 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF006666" ) , Gdip_TextToGraphics( G , "Btm Color:" , "s12 c" Brush " x16 y100" , "Segoe ui" , 120 , 22 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF006666" ) , Gdip_TextToGraphics( G , "Accent Color:" , "s12 c" Brush " x16 y130" , "Segoe ui" , 120 , 22 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 102 , 68 , 30 , 22 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 102 , 98 , 30 , 22 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 102 , 128 , 30 , 22 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 142 , 68 , 90 , 22 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 142 , 98 , 90 , 22 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 142 , 128 , 90 , 22 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 238 , 69 , 46 , 22 , "0xFF2d2d2d" , "0xFF0d0d0d" , 1 , 1 ) , Gdip_FillRectangle( G , Brush , 237 , 67 , 48 , 24 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 240 , 97 , 44 , 25 , "0xFF2d2d2d" , "0xFF0d0d0d" , 1 , 1 ) , Gdip_FillRectangle( G , Brush , 237 , 97 , 48 , 24 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 238 , 127 , 47 , 23 , "0xFF2d2d2d" , "0xFF0d0d0d" , 1 , 1 ) , Gdip_FillRectangle( G , Brush , 237 , 127 , 48 , 24 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 102 , 68 , 30 , 22 ) , Gdip_DeletePen( Pen )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 102 , 98 , 30 , 22 ) , Gdip_DeletePen( Pen )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 102 , 128 , 30 , 22 ) , Gdip_DeletePen( Pen )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 142 , 68 , 90 , 22 ) , Gdip_DeletePen( Pen )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 142 , 98 , 90 , 22 ) , Gdip_DeletePen( Pen )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 142 , 128 , 90 , 22 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 238 , 66 , 52 , 48 , "0xFF006666" , "0xFF121212" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRectangle( G , Pen , 237 , 67 , 48 , 24 ) , Gdip_DeletePen( Pen )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 237 , 97 , 48 , 24 ) , Gdip_DeletePen( Pen )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 237 , 127 , 48 , 24 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 238 , 67 , 45 , 23 , "0xFF00aaaa" , "0xFF006666" , 1 , 1 ) , Gdip_TextToGraphics( G , "Get" , "s12 Center vCenter Bold c" Brush " x236 y55" , "Segoe ui" , 50 , 50 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 238 , 97 , 46 , 24 , "0xFF00aaaa" , "0xFF006666" , 1 , 1 ) , Gdip_TextToGraphics( G , "Get" , "s12 Center vCenter Bold c" Brush " x236 y85" , "Segoe ui" , 50 , 50 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 239 , 128 , 46 , 24 , "0xFF00aaaa" , "0xFF006666" , 1 , 1 ) , Gdip_TextToGraphics( G , "Get" , "s12 Center vCenter Bold c" Brush " x236 y115" , "Segoe ui" , 50 , 50 ) , Gdip_DeleteBrush( Brush )
Gdip_DeleteGraphics( G )
hBitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
Gdip_DisposeImage( pBitmap )
return hBitmap
}
FontColor(){
local BackgroundColor := "0xFF171717" , HeaderColor := "0xFF071414"
;Bitmap Created Using: HB Bitmap Maker
pBitmap:=Gdip_CreateBitmap( 300 , 160 ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
Brush := Gdip_BrushCreateSolid( "0xFF1D1D1D" ),Gdip_FillRectangle( G , Brush , -1 , -1 , 302 , 162 ),Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( BackgroundColor ),Gdip_FillRectangle( G , Brush , 10 , 10 , 280 , 140 ),Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ),Gdip_DrawRectangle( G , Pen , 10 , 10 , 280 , 140 ),Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( HeaderColor ),Gdip_FillRectangle( G , Brush , 15 , 3 , 130 , 20 ),Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ),Gdip_DrawRectangle( G , Pen , 15 , 3 , 130 , 20 ),Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 16 , 4 , 169 , 19 , "0xFF00aaaa" , "0xFF004444" , 1 , 1 ),Gdip_TextToGraphics( G , "Text Colors" , "s12 Center vCenter Bold c" Brush " x15 y4" , "Segoe ui" , 130 , 20 ),Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF006666" ),Gdip_TextToGraphics( G , "Top Color 1:" , "s12 c" Brush " x17 y34" , "Segoe ui" , 130 , 20 ),Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF006666" ),Gdip_TextToGraphics( G , "Top Color 2:" , "s12 c" Brush " x17 y64" , "Segoe ui" , 130 , 20 ),Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF006666" ),Gdip_TextToGraphics( G , "Btm Color 1:" , "s12 c" Brush " x17 y94" , "Segoe ui" , 130 , 20 ),Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF006666" ),Gdip_TextToGraphics( G , "Btm Color 2:" , "s12 c" Brush " x17 y124" , "Segoe ui" , 130 , 20 ),Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ),Gdip_FillRectangle( G , Brush , 102 , 33 , 30 , 22 ),Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ),Gdip_FillRectangle( G , Brush , 142 , 33 , 90 , 22 ),Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ),Gdip_FillRectangle( G , Brush , 102 , 63 , 30 , 22 ),Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ),Gdip_FillRectangle( G , Brush , 142 , 63 , 90 , 22 ),Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ),Gdip_FillRectangle( G , Brush , 102 , 93 , 30 , 22 ),Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ),Gdip_FillRectangle( G , Brush , 142 , 93 , 90 , 22 ),Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ),Gdip_FillRectangle( G , Brush , 102 , 123 , 30 , 22 ),Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ),Gdip_FillRectangle( G , Brush , 142 , 123 , 90 , 22 ),Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ),Gdip_DrawRectangle( G , Pen , 102 , 33 , 30 , 22 ),Gdip_DeletePen( Pen )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ),Gdip_DrawRectangle( G , Pen , 142 , 33 , 90 , 22 ),Gdip_DeletePen( Pen )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ),Gdip_DrawRectangle( G , Pen , 102 , 63 , 30 , 22 ),Gdip_DeletePen( Pen )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ),Gdip_DrawRectangle( G , Pen , 142 , 63 , 90 , 22 ),Gdip_DeletePen( Pen )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ),Gdip_DrawRectangle( G , Pen , 102 , 93 , 30 , 22 ),Gdip_DeletePen( Pen )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ),Gdip_DrawRectangle( G , Pen , 102 , 123 , 30 , 22 ),Gdip_DeletePen( Pen )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ),Gdip_DrawRectangle( G , Pen , 142 , 93 , 90 , 22 ),Gdip_DeletePen( Pen )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ),Gdip_DrawRectangle( G , Pen , 142 , 123 , 90 , 22 ),Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 238 , 34 , 45 , 24 , "0xFF2d2d2d" , "0xFF0d0d0d" , 1 , 1 ),Gdip_FillRectangle( G , Brush , 237 , 32 , 47 , 24 ),Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 238 , 32 , 49 , 38 , "0xFF006666" , "0xFF121212" , 1 , 1 ),Pen := Gdip_CreatePenFromBrush( Brush , 1 ),Gdip_DeleteBrush( Brush ),Gdip_DrawRectangle( G , Pen , 237 , 32 , 47 , 24 ),Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 236 , 32 , 48 , 25 , "0xFF00aaaa" , "0xFF006666" , 1 , 1 ),Gdip_TextToGraphics( G , "Get" , "s12 Bold c" Brush " x248 y36" , "Segoe ui" , 70 , 50 ),Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 239 , 62 , 43 , 22 , "0xFF2d2d2d" , "0xFF0d0d0d" , 1 , 1 ),Gdip_FillRectangle( G , Brush , 237 , 62 , 47 , 24 ),Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 240 , 62 , 48 , 40 , "0xFF006666" , "0xFF121212" , 1 , 1 ),Pen := Gdip_CreatePenFromBrush( Brush , 1 ),Gdip_DeleteBrush( Brush ),Gdip_DrawRectangle( G , Pen , 237 , 62 , 47 , 24 ),Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 237 , 62 , 45 , 22 , "0xFF00aaaa" , "0xFF006666" , 1 , 1 ),Gdip_TextToGraphics( G , "Get" , "s12 Bold c" Brush " x248 y66" , "Segoe ui" , 70 , 50 ),Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 237 , 93 , 45 , 22 , "0xFF2d2d2d" , "0xFF0d0d0d" , 1 , 1 ),Gdip_FillRectangle( G , Brush , 237 , 92 , 47 , 24 ),Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 237 , 90 , 49 , 38 , "0xFF006666" , "0xFF121212" , 1 , 1 ),Pen := Gdip_CreatePenFromBrush( Brush , 1 ),Gdip_DeleteBrush( Brush ),Gdip_DrawRectangle( G , Pen , 237 , 92 , 47 , 24 ),Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 240 , 92 , 42 , 22 , "0xFF00aaaa" , "0xFF006666" , 1 , 1 ),Gdip_TextToGraphics( G , "Get" , "s12 Bold c" Brush " x248 y96" , "Segoe ui" , 70 , 50 ),Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 237 , 120 , 45 , 26 , "0xFF2d2d2d" , "0xFF0d0d0d" , 1 , 1 ),Gdip_FillRectangle( G , Brush , 237 , 122 , 47 , 24 ),Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 239 , 122 , 46 , 36 , "0xFF006666" , "0xFF121212" , 1 , 1 ),Pen := Gdip_CreatePenFromBrush( Brush , 1 ),Gdip_DeleteBrush( Brush ),Gdip_DrawRectangle( G , Pen , 237 , 122 , 47 , 24 ),Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 240 , 121 , 44 , 24 , "0xFF00aaaa" , "0xFF006666" , 1 , 1 ),Gdip_TextToGraphics( G , "Get" , "s12 Bold c" Brush " x248 y126" , "Segoe ui" , 70 , 50 ),Gdip_DeleteBrush( Brush )
Gdip_DeleteGraphics( G )
hBitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
Gdip_DisposeImage( pBitmap )
return hBitmap
}
FontOptions(){
local BackgroundColor := "0xFF171717" , HeaderColor := "0xFF071414"
;Bitmap Created Using: HB Bitmap Maker
pBitmap:=Gdip_CreateBitmap( 300 , 200 ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
Brush := Gdip_BrushCreateSolid( "0xFF1D1D1D" ) , Gdip_FillRectangle( G , Brush , -1 , -1 , 302 , 202 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( BackgroundColor ) , Gdip_FillRectangle( G , Brush , 10 , 15 , 280 , 175 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 10 , 15 , 280 , 175 ) , Gdip_DeletePen( Pen )
;~ Brush := Gdip_BrushCreateSolid( "0xFF1D1D1D" ) , Gdip_FillRectangle( G , Brush , 15 , 10 , 136 , 10 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( HeaderColor ) , Gdip_FillRectangle( G , Brush , 15 , 5 , 136 , 20 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 15 , 5 , 136 , 20 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 18 , 7 , 135 , 17 , "0xFF00aaaa" , "0xFF004444" , 1 , 1 ) , Gdip_TextToGraphics( G , "Font & Font Options" , "s12 Bold c" Brush " x23 y6" , "Segoe ui" , 140 , 50 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF006666" ) , Gdip_TextToGraphics( G , "Font:" , "s12 c" Brush " x17 y66" , "Segoe ui" , 140 , 50 ) , Gdip_DeleteBrush( Brush )
;Font Edit
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 52 , 63 , 228 , 22 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 52 , 63 , 228 , 22 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF006666" ) , Gdip_TextToGraphics( G , "Font Size:" , "s12 c" Brush " x17 y36" , "Segoe ui" , 140 , 50 ) , Gdip_DeleteBrush( Brush )
;Font Size Edit
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 77 , 33 , 58 , 22 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 76 , 33 , 59 , 22 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF006666" ) , Gdip_TextToGraphics( G , "Font Options:" , "s12 c" Brush " x17 y96" , "Segoe ui" , 140 , 50 ) , Gdip_DeleteBrush( Brush )
;Font Options Edit
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 100 , 93 , 180 , 22 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 99 , 93 , 181 , 22 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF006666" ) , Gdip_TextToGraphics( G , "X Offset:" , "s12 c" Brush " x17 y126" , "Segoe ui" , 140 , 50 ) , Gdip_DeleteBrush( Brush )
;X Offset Edit
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 70 , 123 , 72 , 22 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 69 , 123 , 73 , 22 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF006666" ) , Gdip_TextToGraphics( G , "Y Offset:" , "s12 c" Brush " x147 y126" , "Segoe ui" , 140 , 50 ) , Gdip_DeleteBrush( Brush )
;Y Offset Edit
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 200 , 123 , 72 , 22 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 199 , 123 , 73 , 22 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF006666" ) , Gdip_TextToGraphics( G , "W Offset:" , "s12 c" Brush " x17 y156" , "Segoe ui" , 140 , 50 ) , Gdip_DeleteBrush( Brush )
;W Offset Edit
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 75 , 153 , 67 , 22 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 75 , 153 , 68 , 22 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF006666" ) , Gdip_TextToGraphics( G , "H Offset:" , "s12 c" Brush " x147 y156" , "Segoe ui" , 140 , 50 ) , Gdip_DeleteBrush( Brush )
;H Offset Edit
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 205 , 153 , 67 , 22 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 205 , 153 , 68 , 22 ) , Gdip_DeletePen( Pen )
Gdip_DeleteGraphics( G )
hBitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
Gdip_DisposeImage( pBitmap )
return hBitmap
}
ButtonOptions(){
;Bitmap Created Using: HB Bitmap Maker
local BackgroundColor := "0xFF171717" , HeaderColor := "0xFF071414"
pBitmap := Gdip_CreateBitmap( 300 , 140 ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
Brush := Gdip_BrushCreateSolid( "0xFF1D1D1D" ) , Gdip_FillRectangle( G , Brush , -1 , -1 , 302 , 142 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( BackgroundColor ) , Gdip_FillRectangle( G , Brush , 10 , 15 , 280 , 115 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 10 , 15 , 280 , 115 ) , Gdip_DeletePen( Pen )
;~ Brush := Gdip_BrushCreateSolid( "0xFF1D1D1D" ) , Gdip_FillRectangle( G , Brush , 15 , 10 , 110 , 20 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( HeaderColor ) , Gdip_FillRectangle( G , Brush , 15 , 10 , 110 , 20 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 15 , 10 , 110 , 20 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 15 , 11 , 110 , 20 , "0xFF00aaaa" , "0xFF004444" , 1 , 1 ) , Gdip_TextToGraphics( G , "Button Options" , "s12 Bold Center vCenter c" Brush " x15 y11" , "Segoe ui" , 110 , 20 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF006666" ) , Gdip_TextToGraphics( G , "Button Text:" , "s12 c" Brush " x17 y38" , "Segoe ui" , 120 , 50 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 95 , 35 , 181 , 22 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 95 , 35 , 181 , 22 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF006666" ) , Gdip_TextToGraphics( G , "Button Width:" , "s12 c" Brush " x17 y68" , "Segoe ui" , 120 , 50 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 100 , 65 , 44 , 22 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 99 , 65 , 46 , 22 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF006666" ) , Gdip_TextToGraphics( G , "Button Height:" , "s12 c" Brush " x151 y68" , "Segoe ui" , 120 , 50 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 238 , 65 , 44 , 22 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 237 , 65 , 46 , 22 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF006666" ) , Gdip_TextToGraphics( G , "Background Color:" , "s12 c" Brush " x17 y98" , "Segoe ui" , 120 , 50 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 124 , 95 , 114 , 22 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 124 , 95 , 114 , 22 ) , Gdip_DeletePen( Pen )
;Color get button
Brush := Gdip_CreateLineBrushFromRect( 245 , 96 , 35 , 21 , "0xFF2d2d2d" , "0xFF0d0d0d" , 1 , 1 ) , Gdip_FillRectangle( G , Brush , 245 , 95 , 37 , 22 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 244 , 95 , 38 , 34 , "0xFF006666" , "0xFF121212" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRectangle( G , Pen , 245 , 95 , 37 , 22 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 247 , 95 , 33 , 22 , "0xFF00aaaa" , "0xFF006666" , 1 , 1 ) , Gdip_TextToGraphics( G , "Get" , "s12 Bold c" Brush " x252 y98" , "Segoe ui" , 50 , 50 ) , Gdip_DeleteBrush( Brush )
Gdip_DeleteGraphics( G )
hBitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
Gdip_DisposeImage( pBitmap )
return hBitmap
}
Background(){
local w
;Bitmap Created Using: HB Bitmap Maker
pBitmap:=Gdip_CreateBitmap( w:=1100 , h:=590 ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 ) , Gdip_SetInterpolationMode( G , 7)
Brush := Gdip_BrushCreateSolid( "0xFF0D0D0D" ) , Gdip_FillRectangle( G , Brush , -1 , -1 , 1102 , 592 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF000000" , 1 ) , Gdip_DrawRectangle( G , Pen , 0 , 0 , w-1 , h-1 ) , Gdip_DeletePen( Pen )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 2 , 2 , w-5 , h-5 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF121212" ) , Gdip_FillRectangle( G , Brush , 9 , 39 , 1082 , 542 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 10 , 40 , 1080 , 540 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 20 , 50 , 83 , 20 , "0xFF1f1f1f" , "0xFF121212" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 20 , 50 , 80 , 20 , 5 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRoundedRectangle( G , Pen , 20 , 50 , 80 , 20 , 5 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF004444" ) , Gdip_TextToGraphics( G , "ALL" , "s12 Center vCenter Bold c" Brush " x20 y51" , "Segoe ui" , 80 , 20 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 20 , 50 , 83 , 20 , "0xFF006666" , "0xFF000000" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 105 , 50 , 80 , 20 , 5 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRoundedRectangle( G , Pen , 105 , 50 , 80 , 20 , 5 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 107 , 52 , 77 , 16 , "0xFF006666" , "0xFFffffff" , 1 , 1 ) , Gdip_TextToGraphics( G , "DEFAULT" , "s12 Center vCenter Bold c" Brush " x105 y51" , "Segoe ui" , 80 , 20 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 20 , 50 , 83 , 20 , "0xFF1f1f1f" , "0xFF121212" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 190 , 50 , 80 , 20 , 5 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRoundedRectangle( G , Pen , 190 , 50 , 80 , 20 , 5 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF004444" ) , Gdip_TextToGraphics( G , "HOVER" , "s12 Center vCenter Bold c" Brush " x190 y51" , "Segoe ui" , 80 , 20 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 20 , 50 , 83 , 20 , "0xFF1F1F1F" , "0xFF121212" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 275 , 50 , 80 , 20 , 5 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRoundedRectangle( G , Pen , 275 , 50 , 80 , 20 , 5 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF004444" ) , Gdip_TextToGraphics( G , "PRESSED" , "s12 Center vCenter Bold c" Brush " x275 y51" , "Segoe ui" , 80 , 20 ) , Gdip_DeleteBrush( Brush )
;Banner
Brush := Gdip_BrushCreateSolid( "0xFF1D1D1D" ) , Gdip_FillRoundedRectangle( G , Brush , 10 , 5 , 610 , 30 , 7 ) , Gdip_DeleteBrush( Brush )
w := 10
loop ,% 610 / w {
Brush := Gdip_CreateLineBrushFromRect( 0 , 50 , w , 20 , "0x07006666" , "0x44121212" , 0 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 10 , 5 , 610 , 30 , 7 ) , Gdip_DeleteBrush( Brush )
w+=10
}
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRoundedRectangle( G , Pen , 10 , 5 , 610 , 30 , 7 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF000000" )
Gdip_TextToGraphics( G , "HB Button Maker v1.01" , "s24 Center vCenter Bold c" Brush " x12 y7" , "Segoe UI" , 610 , 30 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 10 , 5 , 610 , 30 , "0xFF002222" , "0xFF009999" , 1 , 1 )
Gdip_TextToGraphics( G , "HB Button Maker v1.01" , "s24 Center vCenter Bold c" Brush " x10 y5" , "Segoe UI" , 610 , 30 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF1D1D1D" ),Gdip_FillRectangle( G , Brush , 15 , 80 , 1070 , 495 ),Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 15 , 80 , 1070 , 495 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF1D1D1D" ) , Gdip_FillRectangle( G , Brush , 320 , 465 , 755 , 95 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 320 , 465 , 755 , 95 ) , Gdip_DeletePen( Pen )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 324 , 469 , 641 , 86 ) , Gdip_DeletePen( Pen )
;x975 y500 w90 h45
Brush := Gdip_BrushCreateSolid( "0xFF171717" ) , Gdip_FillRectangle( G , Brush , 970 , 472 , 100 , 82 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 970 , 472 , 100 , 82 ) , Gdip_DeletePen( Pen )
Pen := Gdip_CreatePen( "0xFF071111" , 4 ) , Gdip_DrawRectangle( G , Pen , 973 , 475 , 95 , 77 ) , Gdip_DeletePen( Pen )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 974 , 476 , 92 , 74 ) , Gdip_DeletePen( Pen )
;update button ;37w 22h
Brush := Gdip_CreateLineBrushFromRect( 980 , 515 , 80 , 30 , "0xFF2d2d2d" , "0xFF0d0d0d" , 1 , 1 ) , Gdip_FillRectangle( G , Brush , 980 , 515 , 80 , 30 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 980 , 515 , 80 , 30 , "0xFF006666" , "0xFF121212" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRectangle( G , Pen , 980 , 515 , 80 , 30 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 980 , 515 , 80 , 30 , "0xFF00aaaa" , "0xFF006666" , 1 , 1 ) , Gdip_TextToGraphics( G , "Update" , "s12 vCenter Center Bold c" Brush " x980 y516" , "Segoe ui" , 80 , 30 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF171717" ) , Gdip_FillRoundedRectangle( G , Brush , 370 , 45 , 340 , 30 , 5 ) , Gdip_DeleteBrush( Brush )
w := 10
loop, 33 {
Brush := Gdip_CreateLineBrushFromRect( 370 , 45 , w , 30 , "0x44121212" , "0x07006666" , 0 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 370 , 45 , 340 , 30 , 5 ) , Gdip_DeleteBrush( Brush )
w+=10
}
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRoundedRectangle( G , Pen , 370 , 45 , 340 , 30 , 5 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 370 , 45 , 340 , 30 , "0xFF00aaaa" , "0xFF006666" , 1 , 1 ) , Gdip_TextToGraphics( G , "Button Name: " , "s14 vCenter Bold c" Brush " x380 y46" , "Segoe ui" , 340 , 30 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0xFF004444" , 1 ) , Gdip_DrawRectangle( G , Pen , 484 , 49 , 211 , 23 ) , Gdip_DeletePen( Pen )
;~ x485 y50 w210 h22
Gdip_DeleteGraphics( G )
return pBitmap
}
AddClosePanel( obj ){
local hwnd
Gui, 1:Add, Pic, x970 y7 w120 h30 0xE hwndhwnd
obj.TextColorPanelHwnd := hwnd
SetImage( hwnd , handle := CloseButtons() )
DeleteObject( handle )
;****************************************************************************************************
;~ ;Question Button
Gui, 1:Add, Text,cWhite x977 y12 w32 h19 BackgroundTrans gGotoThreadTopic
;~ ;Minimize Button
Gui, 1:Add, Text,cWhite x1014 y12 w32 h19 BackgroundTrans gMinimizeWindow
;~ ;Close Button
Gui, 1:Add, Text,cWhite x1051 y12 w32 h19 BackgroundTrans gGuiClose
;****************************************************************************************************
}
CloseButtons(){
;Bitmap Created Using: HB Bitmap Maker
pBitmap := Gdip_CreateBitmap( 120 , 30 ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
Brush := Gdip_BrushCreateSolid( "0xFF0D0D0D" ) , Gdip_FillRectangle( G , Brush , -1 , -1 , 122 , 32 ) , Gdip_DeleteBrush( Brush )
;~ Brush := Gdip_CreateLineBrushFromRect( 2 , 3 , 117 , 24 , "0xFF1D1D1D" , "0xFF0B4747" , 0 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 2 , 2 , 116 , 25 , 4 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_CreateLineBrushFromRect( 2 , 3 , 117 , 24 , "0xFF1D1D1D" , "0x990B4747" , 0 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 2 , 2 , 116 , 25 , 4 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0x33004444" , 1 ) , Gdip_DrawRoundedRectangle( G , Pen , 2 , 2 , 116 , 25 , 5 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 17 , 8 , 81 , 14 , "0xFF1D1D1D" , "0x99004444" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 7 , 5 , 106 , 19 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0x33004444" , 1 ) , Gdip_DrawEllipse( G , Pen , 7 , 5 , 106 , 19 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 9 , 7 , 28 , 13 , "0xFF121212" , "0x99004444" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 7 , 5 , 32 , 19 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G , "?" , "s14 Center vCenter Bold c" Brush " x7 y6" , "Segoe ui" , 32 , 19 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF00aaaa" ) , Gdip_TextToGraphics( G , "?" , "s14 Center vCenter Bold c" Brush " x8 y7" , "Segoe ui" , 32 , 19 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0x33004444" , 2 ) , Gdip_DrawEllipse( G , Pen , 7 , 5 , 32 , 19 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 44 , 6 , 29 , 17 , "0xFF121212" , "0x99004444" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 44 , 5 , 32 , 19 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G , "_" , "s14 Center vCenter Bold c" Brush " x44 y2" , "Segoe ui" , 32 , 19 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF00aaaa" ) , Gdip_TextToGraphics( G , "_" , "s14 Center vCenter Bold c" Brush " x45 y3" , "Segoe ui" , 32 , 19 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0x33004444" , 2 ) , Gdip_DrawEllipse( G , Pen , 44 , 5 , 32 , 19 ) , Gdip_DeletePen( Pen )
Brush := Gdip_CreateLineBrushFromRect( 81 , 7 , 30 , 15 , "0xFF121212" , "0xFF004444" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 81 , 5 , 32 , 19 ) , Gdip_DeleteBrush( Brush )
Pen := Gdip_CreatePen( "0x33004444" , 2 ) , Gdip_DrawEllipse( G , Pen , 81 , 5 , 32 , 19 ) , Gdip_DeletePen( Pen )
Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G , "x" , "s14 Center vCenter Bold c" Brush " x81 y6" , "Segoe ui" , 32 , 19 ) , Gdip_DeleteBrush( Brush )
Brush := Gdip_BrushCreateSolid( "0xFF00aaaa" ) , Gdip_TextToGraphics( G , "x" , "s14 Center vCenter Bold c" Brush " x82 y7" , "Segoe ui" , 32 , 19 ) , Gdip_DeleteBrush( Brush )
Gdip_DeleteGraphics( G )
hBitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
Gdip_DisposeImage( pBitmap )
return hBitmap
}
UpdateButton:
counter := 0
GetEdits( MainObj , CurrentTab )
if(MainObj.Tab[CurrentTab]="All"){
for k, v in ["Default","Hover","Pressed"]{
for i, j in MainObj[v]{
if( MainObj["All"][i]!="" && i != "GlossyPanelUseGlossyCheckbox" )
MainObj[v][i] := MainObj["All"][i]
if( i = "GlossyPanelUseGlossyCheckbox" && GlossyChange ){
MainObj[v][i] := MainObj["All"][i]
;~ ToolTip, % "glossy changed`ncounter: " ++counter
}
}
}
GlossyChange := 0
}
SetImage( Pichwnd , handle := CenterPanel( w , h , MainObj.Tab[CurrentTab] , MainObj[MainObj.Tab[CurrentTab]] , MainObj ) )
DeleteObject( handle )
SetDisplayWindow( MainObj )
return
GetColor:
CoordMode, Mouse, Screen
CoordMode, Pixel, Screen
MouseGetPos,,,,ctrl2,2
While(!GetKeyState("ctrl")){
ToolTip, Press "CTRL" to capture screen color under cursor.
Sleep, 60
}
ToolTip,
MouseGetPos, x, y
PixelGetColor, out, x, y, rgb
StringRight, out, out, 6
guiControl,1:Focus, % MainObj.ButtonHandles[ctrl2]
guiControl,1:, % MainObj.ButtonHandles[ctrl2] , % "" out
SendMessage, 0xB1, -2, -1,, % "ahk_id " MainObj.ButtonHandles[ctrl2]
return
MoveWindow:
PostMessage, 0xA1, 2
return
ToggleGlossy:
MainObj[MainObj.Tab[CurrentTab]].GlossyPanelUseGlossyCheckbox := !MainObj[MainObj.Tab[CurrentTab]].GlossyPanelUseGlossyCheckbox
SetImage( MainObj.GlossyPanelHwnd , handle := Glossy( MainObj[MainObj.Tab[CurrentTab]].GlossyPanelUseGlossyCheckbox ) )
DeleteObject( handle )
RedrawGlossyEdits(MainObj)
if( MainObj.Tab[CurrentTab] = "ALL" )
GlossyChange := 1
return
RedrawGlossyEdits(Obj){
for k, v in ["GlossyPanelTopColorAlphaEdit","GlossyPanelTopColorEdit","GlossyPanelBottomColorAlphaEdit","GlossyPanelBottomColorEdit","GlossyPanelAccentColorAlphaEdit","GlossyPanelAccentColorEdit"]
GuiControl, 1:+Redraw, % Obj.Edits[v]
}
SetDefaults(ByRef Obj){
local w := 200 , h := 65
Obj.All := {}
Obj.Default := {}
Obj.Hover := {}
Obj.Pressed := {}
;**************************************************************************
Obj.All.ButtonPanelTextEdit := ""
Obj.All.ButtonPanelBackgroundColorEdit := "22262A"
Obj.All.ButtonPanelWidthEdit := w
Obj.All.ButtonPanelHeightEdit := h
Obj.All.FontPanelFontEdit := ""
Obj.All.FontPanelFontOptionsEdit := ""
Obj.All.FontPanelFontSizeEdit := ""
Obj.All.FontPanelHOffsetEdit := ""
Obj.All.FontPanelWOffsetEdit := ""
Obj.All.FontPanelXOffsetEdit := ""
Obj.All.FontPanelYOffsetEdit := ""
Obj.All.TextColorPanelBottomColor1AlphaEdit := ""
Obj.All.TextColorPanelBottomColor1Edit := ""
Obj.All.TextColorPanelBottomColor2AlphaEdit := ""
Obj.All.TextColorPanelBottomColor2Edit := ""
Obj.All.TextColorPanelTopColor1AlphaEdit := ""
Obj.All.TextColorPanelTopColor1Edit := ""
Obj.All.TextColorPanelTopColor2AlphaEdit := ""
Obj.All.TextColorPanelTopColor2Edit := ""
Obj.All.GlossyPanelUseGlossyCheckbox := ""
Obj.All.GlossyPanelTopColorAlphaEdit := ""
Obj.All.GlossyPanelTopColorEdit := ""
Obj.All.GlossyPanelBottomColorAlphaEdit := ""
Obj.All.GlossyPanelBottomColorEdit := ""
Obj.All.GlossyPanelAccentColorAlphaEdit := ""
Obj.All.GlossyPanelAccentColorEdit := ""
Obj.All.ButtonColorPanelOuterBorderColorAlphaEdit := ""
Obj.All.ButtonColorPanelOuterBorderColorEdit := ""
Obj.All.ButtonColorPanelCenterBorderColorAlphaEdit := ""
Obj.All.ButtonColorPanelCenterBorderColorEdit := ""
Obj.All.ButtonColorPanelInnerBorderColor1AlphaEdit := ""
Obj.All.ButtonColorPanelInnerBorderColor1Edit := ""
Obj.All.ButtonColorPanelInnerBorderColor2AlphaEdit := ""
Obj.All.ButtonColorPanelInnerBorderColor2Edit := ""
Obj.All.ButtonColorPanelMainColor1AlphaEdit := ""
Obj.All.ButtonColorPanelMainColor1Edit := ""
Obj.All.ButtonColorPanelMainColor2AlphaEdit := ""
Obj.All.ButtonColorPanelMainColor2Edit := ""
;**************************************************************************
Obj.Default.ButtonPanelTextEdit := "Button"
Obj.Default.ButtonPanelBackgroundColorEdit := "22262A"
Obj.Default.ButtonPanelWidthEdit := w
Obj.Default.ButtonPanelHeightEdit := h
Obj.Default.FontPanelFontEdit := "Arial"
Obj.Default.FontPanelFontOptionsEdit := " Bold Center vCenter "
Obj.Default.FontPanelFontSizeEdit := "12"
Obj.Default.FontPanelHOffsetEdit := 0
Obj.Default.FontPanelWOffsetEdit := 0
Obj.Default.FontPanelXOffsetEdit := 0
Obj.Default.FontPanelYOffsetEdit := 0
Obj.Default.TextColorPanelBottomColor1AlphaEdit := "00"
Obj.Default.TextColorPanelBottomColor1Edit := "02112F"
Obj.Default.TextColorPanelBottomColor2AlphaEdit := Obj.Default.TextColorPanelBottomColor1AlphaEdit
Obj.Default.TextColorPanelBottomColor2Edit := Obj.Default.TextColorPanelBottomColor1Edit
Obj.Default.TextColorPanelTopColor1AlphaEdit := "FF"
Obj.Default.TextColorPanelTopColor1Edit := "FFFFFF"
Obj.Default.TextColorPanelTopColor2AlphaEdit := Obj.Default.TextColorPanelTopColor1AlphaEdit
Obj.Default.TextColorPanelTopColor2Edit := Obj.Default.TextColorPanelTopColor1Edit
Obj.Default.GlossyPanelUseGlossyCheckbox := 1
Obj.Default.GlossyPanelTopColorAlphaEdit := "11"
Obj.Default.GlossyPanelTopColorEdit := "FFFFFF"
Obj.Default.GlossyPanelBottomColorAlphaEdit := "33"
Obj.Default.GlossyPanelBottomColorEdit := "000000"
Obj.Default.GlossyPanelAccentColorAlphaEdit := "05"
Obj.Default.GlossyPanelAccentColorEdit := "FFFFFF"
Obj.Default.ButtonColorPanelOuterBorderColorAlphaEdit := "FF"
Obj.Default.ButtonColorPanelOuterBorderColorEdit := "161B1F"
Obj.Default.ButtonColorPanelCenterBorderColorAlphaEdit := "FF"
Obj.Default.ButtonColorPanelCenterBorderColorEdit := "262B2F"
Obj.Default.ButtonColorPanelInnerBorderColor1AlphaEdit := "FF"
Obj.Default.ButtonColorPanelInnerBorderColor1Edit := "3F444A"
Obj.Default.ButtonColorPanelInnerBorderColor2AlphaEdit := "FF"
Obj.Default.ButtonColorPanelInnerBorderColor2Edit := "24292D"
Obj.Default.ButtonColorPanelMainColor1AlphaEdit := "FF"
Obj.Default.ButtonColorPanelMainColor1Edit := "272C32"
Obj.Default.ButtonColorPanelMainColor2AlphaEdit := Obj.Default.ButtonColorPanelMainColor1AlphaEdit
Obj.Default.ButtonColorPanelMainColor2Edit := Obj.Default.ButtonColorPanelMainColor1Edit
;*************************************************************************************
Obj.Hover.ButtonPanelTextEdit := "Button"
Obj.Hover.ButtonPanelBackgroundColorEdit := "22262A"
Obj.Hover.ButtonPanelWidthEdit := w
Obj.Hover.ButtonPanelHeightEdit := h
Obj.Hover.FontPanelFontEdit := "Arial"
Obj.Hover.FontPanelFontOptionsEdit := " Bold Center vCenter "
Obj.Hover.FontPanelFontSizeEdit := "12"
Obj.Hover.FontPanelHOffsetEdit := 0
Obj.Hover.FontPanelWOffsetEdit := 0
Obj.Hover.FontPanelXOffsetEdit := 0
Obj.Hover.FontPanelYOffsetEdit := 0
Obj.Hover.TextColorPanelBottomColor1AlphaEdit := "00"
Obj.Hover.TextColorPanelBottomColor1Edit := "02112F"
Obj.Hover.TextColorPanelBottomColor2AlphaEdit := Obj.Hover.TextColorPanelBottomColor1AlphaEdit
Obj.Hover.TextColorPanelBottomColor2Edit := Obj.Hover.TextColorPanelBottomColor1Edit
Obj.Hover.TextColorPanelTopColor1AlphaEdit := "FF"
Obj.Hover.TextColorPanelTopColor1Edit := "FFFFFF"
Obj.Hover.TextColorPanelTopColor2AlphaEdit := Obj.Hover.TextColorPanelTopColor1AlphaEdit
Obj.Hover.TextColorPanelTopColor2Edit := Obj.Hover.TextColorPanelTopColor1Edit
Obj.Hover.GlossyPanelUseGlossyCheckbox := 1
Obj.Hover.GlossyPanelTopColorAlphaEdit := "11"
Obj.Hover.GlossyPanelTopColorEdit := "FFFFFF"
Obj.Hover.GlossyPanelBottomColorAlphaEdit := "33"
Obj.Hover.GlossyPanelBottomColorEdit := "000000"
Obj.Hover.GlossyPanelAccentColorAlphaEdit := "05"
Obj.Hover.GlossyPanelAccentColorEdit := "FFFFFF"
Obj.Hover.ButtonColorPanelOuterBorderColorAlphaEdit := "FF"
Obj.Hover.ButtonColorPanelOuterBorderColorEdit := "161B1F"
Obj.Hover.ButtonColorPanelCenterBorderColorAlphaEdit := "FF"
Obj.Hover.ButtonColorPanelCenterBorderColorEdit := "262B2F"
Obj.Hover.ButtonColorPanelInnerBorderColor1AlphaEdit := "FF"
Obj.Hover.ButtonColorPanelInnerBorderColor1Edit := "3F444A"
Obj.Hover.ButtonColorPanelInnerBorderColor2AlphaEdit := "FF"
Obj.Hover.ButtonColorPanelInnerBorderColor2Edit := "24292D"
Obj.Hover.ButtonColorPanelMainColor1AlphaEdit := "FF"
Obj.Hover.ButtonColorPanelMainColor1Edit := "373C42"
Obj.Hover.ButtonColorPanelMainColor2AlphaEdit := Obj.Hover.ButtonColorPanelMainColor1AlphaEdit
Obj.Hover.ButtonColorPanelMainColor2Edit := Obj.Hover.ButtonColorPanelMainColor1Edit
;*******************************************************************************************
Obj.Pressed.ButtonPanelTextEdit := "Button"
Obj.Pressed.ButtonPanelBackgroundColorEdit := "22262A"
Obj.Pressed.ButtonPanelWidthEdit := w
Obj.Pressed.ButtonPanelHeightEdit := h
Obj.Pressed.FontPanelFontEdit := "Arial"
Obj.Pressed.FontPanelFontOptionsEdit := " Bold Center vCenter "
Obj.Pressed.FontPanelFontSizeEdit := "12"
Obj.Pressed.FontPanelHOffsetEdit := 0
Obj.Pressed.FontPanelWOffsetEdit := 0
Obj.Pressed.FontPanelXOffsetEdit := 0
Obj.Pressed.FontPanelYOffsetEdit := 0
Obj.Pressed.TextColorPanelBottomColor1AlphaEdit := "00"
Obj.Pressed.TextColorPanelBottomColor1Edit := "02112F"
Obj.Pressed.TextColorPanelBottomColor2AlphaEdit := Obj.Pressed.TextColorPanelBottomColor1AlphaEdit
Obj.Pressed.TextColorPanelBottomColor2Edit := Obj.Pressed.TextColorPanelBottomColor1Edit
Obj.Pressed.TextColorPanelTopColor1AlphaEdit := "FF"
Obj.Pressed.TextColorPanelTopColor1Edit := "FFFFFF"
Obj.Pressed.TextColorPanelTopColor2AlphaEdit := Obj.Pressed.TextColorPanelTopColor1AlphaEdit
Obj.Pressed.TextColorPanelTopColor2Edit := Obj.Pressed.TextColorPanelTopColor1Edit
Obj.Pressed.GlossyPanelUseGlossyCheckbox := 0
Obj.Pressed.GlossyPanelTopColorAlphaEdit := "11"
Obj.Pressed.GlossyPanelTopColorEdit := "FFFFFF"
Obj.Pressed.GlossyPanelBottomColorAlphaEdit := "33"
Obj.Pressed.GlossyPanelBottomColorEdit := "000000"
Obj.Pressed.GlossyPanelAccentColorAlphaEdit := "05"
Obj.Pressed.GlossyPanelAccentColorEdit := "FFFFFF"
Obj.Pressed.ButtonColorPanelOuterBorderColorAlphaEdit := "FF"
Obj.Pressed.ButtonColorPanelOuterBorderColorEdit := "62666a"
Obj.Pressed.ButtonColorPanelCenterBorderColorAlphaEdit := "FF"
Obj.Pressed.ButtonColorPanelCenterBorderColorEdit := "262B2F"
Obj.Pressed.ButtonColorPanelInnerBorderColor1AlphaEdit := "FF"
Obj.Pressed.ButtonColorPanelInnerBorderColor1Edit := "151A20"
Obj.Pressed.ButtonColorPanelInnerBorderColor2AlphaEdit := "FF"
Obj.Pressed.ButtonColorPanelInnerBorderColor2Edit := "151A20"
Obj.Pressed.ButtonColorPanelMainColor1AlphaEdit := "FF"
Obj.Pressed.ButtonColorPanelMainColor1Edit := "12161a"
Obj.Pressed.ButtonColorPanelMainColor2AlphaEdit := "FF"
Obj.Pressed.ButtonColorPanelMainColor2Edit := "33383E"
}
ClipButton( Obj ){
local ProjectName , output
GuiControlGet, ProjectName, 1:, % Obj.ProjectName
( !ProjectName ) ? ( ProjectName := "MyButtonDesign" )
ProjectName := StrReplace( ProjectName , " " , "" )
output := "HBCustomButton(){`n`tlocal " ProjectName " := {}`n`t"
output .= ProjectName ".All := {}`n`t"
output .= ProjectName ".Default := {}`n`t"
output .= ProjectName ".Hover := {}`n`t"
output .= ProjectName ".Pressed := {}`n`t"
;*************************************************************************************************************************************************************************
arr := ["All","Default","Hover","Pressed"] , stopped := 0
loop, 4 {
output .= ";********************************`n`t"
output .= ";" Arr[A_Index] "`n`t"
if( MainObj[Arr[A_Index]].ButtonPanelWidthEdit != "" )
output .= ProjectName "." Arr[A_Index] ".W := " MainObj[Arr[A_Index]].ButtonPanelWidthEdit
if( MainObj[Arr[A_Index]].ButtonPanelHeightEdit != "" )
output .= " , " ProjectName "." Arr[A_Index] ".H := " MainObj[Arr[A_Index]].ButtonPanelHeightEdit
if( MainObj[Arr[A_Index]].ButtonPanelTextEdit != "" )
output .= " , " ProjectName "." Arr[A_Index] ".Text := """ MainObj[Arr[A_Index]].ButtonPanelTextEdit """"
else
output .= " , " ProjectName "." Arr[A_Index] ".Text := "" Button """
if( MainObj[Arr[A_Index]].FontPanelFontEdit != "" )
output .= " , " ProjectName "." Arr[A_Index] ".Font := """ MainObj[Arr[A_Index]].FontPanelFontEdit """"
if( MainObj[Arr[A_Index]].FontPanelFontOptionsEdit != "" )
output .= " , " ProjectName "." Arr[A_Index] ".FontOptions := """ MainObj[Arr[A_Index]].FontPanelFontOptionsEdit """"
if( MainObj[Arr[A_Index]].FontPanelFontSizeEdit != "" )
output .= " , " ProjectName "." Arr[A_Index] ".FontSize := """ MainObj[Arr[A_Index]].FontPanelFontSizeEdit """"
if( MainObj[Arr[A_Index]].TextColorPanelBottomColor1AlphaEdit != "" )
output .= " , " ProjectName "." Arr[A_Index] ".H := ""0x" MainObj[Arr[A_Index]].TextColorPanelBottomColor1AlphaEdit . MainObj[Arr[A_Index]].TextColorPanelBottomColor1Edit """"
if( MainObj[Arr[A_Index]].TextColorPanelBottomColor2AlphaEdit != "" )
output .= " , " ProjectName "." Arr[A_Index] ".TextBottomColor2 := ""0x" MainObj[Arr[A_Index]].TextColorPanelBottomColor2AlphaEdit . MainObj[Arr[A_Index]].TextColorPanelBottomColor2Edit """"
if( MainObj[Arr[A_Index]].TextColorPanelTopColor1AlphaEdit != "" )
output .= " , " ProjectName "." Arr[A_Index] ".TextTopColor1 := ""0x" MainObj[Arr[A_Index]].TextColorPanelTopColor1AlphaEdit . MainObj[Arr[A_Index]].TextColorPanelTopColor1Edit """"
if( MainObj[Arr[A_Index]].TextColorPanelTopColor2AlphaEdit != "" )
output .= " , " ProjectName "." Arr[A_Index] ".TextTopColor2 := ""0x" MainObj[Arr[A_Index]].TextColorPanelTopColor2AlphaEdit . MainObj[Arr[A_Index]].TextColorPanelTopColor2Edit """"
if( MainObj[Arr[A_Index]].FontPanelXOffsetEdit != "" )
output .= " , " ProjectName "." Arr[A_Index] ".TextOffsetX := """ MainObj[Arr[A_Index]].FontPanelXOffsetEdit """"
if( MainObj[Arr[A_Index]].FontPanelYOffsetEdit != "" )
output .= " , " ProjectName "." Arr[A_Index] ".TextOffsetY := """ MainObj[Arr[A_Index]].FontPanelYOffsetEdit """"
if( MainObj[Arr[A_Index]].FontPanelWOffsetEdit != "" )
output .= " , " ProjectName "." Arr[A_Index] ".TextOffsetW := """ MainObj[Arr[A_Index]].FontPanelWOffsetEdit """"
if( MainObj[Arr[A_Index]].FontPanelHOffsetEdit != "" )
output .= " , " ProjectName "." Arr[A_Index] ".TextOffsetH := """ MainObj[Arr[A_Index]].FontPanelHOffsetEdit """"
if( MainObj[Arr[A_Index]].ButtonPanelBackgroundColorEdit != "" )
output .= " , " ProjectName "." Arr[A_Index] ".BackgroundColor := ""0xFF" MainObj[Arr[A_Index]].ButtonPanelBackgroundColorEdit """" ; May need to change this later. Not sure if I remember if bg color needs 0x and alpha
if( MainObj[Arr[A_Index]].ButtonColorPanelOuterBorderColorAlphaEdit != "" )
output .= " , " ProjectName "." Arr[A_Index] ".ButtonOuterBorderColor := ""0x" MainObj[Arr[A_Index]].ButtonColorPanelOuterBorderColorAlphaEdit . MainObj[Arr[A_Index]].ButtonColorPanelOuterBorderColorEdit """"
if( MainObj[Arr[A_Index]].ButtonColorPanelCenterBorderColorAlphaEdit != "" )
output .= " , " ProjectName "." Arr[A_Index] ".ButtonCenterBorderColor := ""0x" MainObj[Arr[A_Index]].ButtonColorPanelCenterBorderColorAlphaEdit . MainObj[Arr[A_Index]].ButtonColorPanelCenterBorderColorEdit """"
if( MainObj[Arr[A_Index]].ButtonColorPanelInnerBorderColor1AlphaEdit != "" )
output .= " , " ProjectName "." Arr[A_Index] ".ButtonInnerBorderColor1 := ""0x" MainObj[Arr[A_Index]].ButtonColorPanelInnerBorderColor1AlphaEdit . MainObj[Arr[A_Index]].ButtonColorPanelInnerBorderColor1Edit """"
if( MainObj[Arr[A_Index]].ButtonColorPanelInnerBorderColor2AlphaEdit != "" )
output .= " , " ProjectName "." Arr[A_Index] ".ButtonInnerBorderColor2 := ""0x" MainObj[Arr[A_Index]].ButtonColorPanelInnerBorderColor2AlphaEdit . MainObj[Arr[A_Index]].ButtonColorPanelInnerBorderColor2Edit """"
if( MainObj[Arr[A_Index]].ButtonColorPanelMainColor1AlphaEdit != "" )
output .= " , " ProjectName "." Arr[A_Index] ".ButtonMainColor1 := ""0x" MainObj[Arr[A_Index]].ButtonColorPanelMainColor1AlphaEdit . MainObj[Arr[A_Index]].ButtonColorPanelMainColor1Edit """"
if( MainObj[Arr[A_Index]].ButtonColorPanelMainColor2AlphaEdit != "" )
output .= " , " ProjectName "." Arr[A_Index] ".ButtonMainColor2 := ""0x" MainObj[Arr[A_Index]].ButtonColorPanelMainColor2AlphaEdit . MainObj[Arr[A_Index]].ButtonColorPanelMainColor2Edit """"
if( MainObj[Arr[A_Index]].GlossyPanelUseGlossyCheckbox != "" )
output .= " , " ProjectName "." Arr[A_Index] ".ButtonAddGlossy := """ MainObj[Arr[A_Index]].GlossyPanelUseGlossyCheckbox """"
if( MainObj[Arr[A_Index]].GlossyPanelTopColorAlphaEdit != "" )
output .= " , " ProjectName "." Arr[A_Index] ".GlossTopColor := ""0x" MainObj[Arr[A_Index]].GlossyPanelTopColorAlphaEdit . MainObj[Arr[A_Index]].GlossyPanelTopColorEdit """"
if( MainObj[Arr[A_Index]].GlossyPanelAccentColorAlphaEdit != "" )
output .= " , " ProjectName "." Arr[A_Index] ".GlossTopAccentColor := """ MainObj[Arr[A_Index]].GlossyPanelAccentColorAlphaEdit . MainObj[Arr[A_Index]].GlossyPanelAccentColorEdit """"
if( MainObj[Arr[A_Index]].GlossyPanelBottomColorAlphaEdit != "" )
output .= " , " ProjectName "." Arr[A_Index] ".GlossBottomColor := """ MainObj[Arr[A_Index]].GlossyPanelBottomColorAlphaEdit . MainObj[Arr[A_Index]].GlossyPanelBottomColorEdit """"
output .= "`n`t"
}
;*************************************************************************************************************************************************************************
output .= ";********************************`n`t"
output .= "`n`t"
output .= "return " ProjectName "`n"
output .= "}"
Clipboard := output
SoundBeep, 500
SoundBeep, 500
}
Class Custom_Window {
__New(x:="",y:="",w:=300,h:=200,Name:=1,Options:="+AlwaysOnTop -Caption -DPIScale",Title:="",Background_Bitmap:=""){
This.X:=x
This.Y:=y
This.W:=w
This.H:=h
This.Name:=Name
This.Title:=Title
This.Options:=Options
This.Background_Bitmap:=Background_Bitmap
This.Create_Window()
}
Create_Window(){
Gui,% This.Name ":New",% This.Options " +LastFound"
This.Hwnd:=WinExist()
if(This.Background_Bitmap)
This.Draw_Background_Bitmap()
}
Draw_Background_Bitmap(){
local hwnd
This.Bitmap:=Gdip_CreateHBITMAPFromBitmap(This.Background_Bitmap)
Gdip_DisposeImage(This.Background_Bitmap)
Gui,% This.Name ":Add",Picture,% "x0 y0 w" This.W " h" This.H " 0xE hwndhwnd"
This.Background_Hwnd:=hwnd
SetImage(This.Background_Hwnd,This.Bitmap)
}
Show_Window(){
if(This.X&&This.Y)
Gui,% This.Name ":Show",% "x" This.X " y" This.Y " w" This.W " h" This.H,% This.Title
else if(This.X&&!This.Y)
Gui,% This.Name ":Show",% "x" This.X " w" This.W " h" This.H,% This.Title
else if(!This.X&&This.Y)
Gui,% This.Name ":Show",% "y" This.Y " w" This.W " h" This.H,% This.Title
else
Gui,% This.Name ":Show",% " w" This.W " h" This.H,% This.Title
}
}
Here is an example of what it puts in your clipboard.
Code: Select all
HBCustomButton(){
local MyButtonDesign := {}
MyButtonDesign.All := {}
MyButtonDesign.Default := {}
MyButtonDesign.Hover := {}
MyButtonDesign.Pressed := {}
;********************************
;All
MyButtonDesign.All.W := 200 , MyButtonDesign.All.H := 65 , MyButtonDesign.All.Text := " Button " , MyButtonDesign.All.BackgroundColor := "0xFF22262A"
;********************************
;Default
MyButtonDesign.Default.W := 200 , MyButtonDesign.Default.H := 65 , MyButtonDesign.Default.Text := "Button" , MyButtonDesign.Default.Font := "Arial" , MyButtonDesign.Default.FontOptions := " Bold Center vCenter " , MyButtonDesign.Default.FontSize := "12" , MyButtonDesign.Default.H := "0x0002112F" , MyButtonDesign.Default.TextBottomColor2 := "0x0002112F" , MyButtonDesign.Default.TextTopColor1 := "0xFFFFFFFF" , MyButtonDesign.Default.TextTopColor2 := "0xFFFFFFFF" , MyButtonDesign.Default.TextOffsetX := "0" , MyButtonDesign.Default.TextOffsetY := "0" , MyButtonDesign.Default.TextOffsetW := "0" , MyButtonDesign.Default.TextOffsetH := "0" , MyButtonDesign.Default.BackgroundColor := "0xFF22262A" , MyButtonDesign.Default.ButtonOuterBorderColor := "0xFF161B1F" , MyButtonDesign.Default.ButtonCenterBorderColor := "0xFF262B2F" , MyButtonDesign.Default.ButtonInnerBorderColor1 := "0xFF3F444A" , MyButtonDesign.Default.ButtonInnerBorderColor2 := "0xFF24292D" , MyButtonDesign.Default.ButtonMainColor1 := "0xFF272C32" , MyButtonDesign.Default.ButtonMainColor2 := "0xFF272C32" , MyButtonDesign.Default.ButtonAddGlossy := "1" , MyButtonDesign.Default.GlossTopColor := "0x11FFFFFF" , MyButtonDesign.Default.GlossTopAccentColor := "05FFFFFF" , MyButtonDesign.Default.GlossBottomColor := "33000000"
;********************************
;Hover
MyButtonDesign.Hover.W := 200 , MyButtonDesign.Hover.H := 65 , MyButtonDesign.Hover.Text := "Button" , MyButtonDesign.Hover.Font := "Arial" , MyButtonDesign.Hover.FontOptions := " Bold Center vCenter " , MyButtonDesign.Hover.FontSize := "12" , MyButtonDesign.Hover.H := "0x0002112F" , MyButtonDesign.Hover.TextBottomColor2 := "0x0002112F" , MyButtonDesign.Hover.TextTopColor1 := "0xFFFFFFFF" , MyButtonDesign.Hover.TextTopColor2 := "0xFFFFFFFF" , MyButtonDesign.Hover.TextOffsetX := "0" , MyButtonDesign.Hover.TextOffsetY := "0" , MyButtonDesign.Hover.TextOffsetW := "0" , MyButtonDesign.Hover.TextOffsetH := "0" , MyButtonDesign.Hover.BackgroundColor := "0xFF22262A" , MyButtonDesign.Hover.ButtonOuterBorderColor := "0xFF161B1F" , MyButtonDesign.Hover.ButtonCenterBorderColor := "0xFF262B2F" , MyButtonDesign.Hover.ButtonInnerBorderColor1 := "0xFF3F444A" , MyButtonDesign.Hover.ButtonInnerBorderColor2 := "0xFF24292D" , MyButtonDesign.Hover.ButtonMainColor1 := "0xFF373C42" , MyButtonDesign.Hover.ButtonMainColor2 := "0xFF373C42" , MyButtonDesign.Hover.ButtonAddGlossy := "1" , MyButtonDesign.Hover.GlossTopColor := "0x11FFFFFF" , MyButtonDesign.Hover.GlossTopAccentColor := "05FFFFFF" , MyButtonDesign.Hover.GlossBottomColor := "33000000"
;********************************
;Pressed
MyButtonDesign.Pressed.W := 200 , MyButtonDesign.Pressed.H := 65 , MyButtonDesign.Pressed.Text := "Button" , MyButtonDesign.Pressed.Font := "Arial" , MyButtonDesign.Pressed.FontOptions := " Bold Center vCenter " , MyButtonDesign.Pressed.FontSize := "12" , MyButtonDesign.Pressed.H := "0x0002112F" , MyButtonDesign.Pressed.TextBottomColor2 := "0x0002112F" , MyButtonDesign.Pressed.TextTopColor1 := "0xFFFFFFFF" , MyButtonDesign.Pressed.TextTopColor2 := "0xFFFFFFFF" , MyButtonDesign.Pressed.TextOffsetX := "0" , MyButtonDesign.Pressed.TextOffsetY := "0" , MyButtonDesign.Pressed.TextOffsetW := "0" , MyButtonDesign.Pressed.TextOffsetH := "0" , MyButtonDesign.Pressed.BackgroundColor := "0xFF22262A" , MyButtonDesign.Pressed.ButtonOuterBorderColor := "0xFF62666a" , MyButtonDesign.Pressed.ButtonCenterBorderColor := "0xFF262B2F" , MyButtonDesign.Pressed.ButtonInnerBorderColor1 := "0xFF151A20" , MyButtonDesign.Pressed.ButtonInnerBorderColor2 := "0xFF151A20" , MyButtonDesign.Pressed.ButtonMainColor1 := "0xFF12161a" , MyButtonDesign.Pressed.ButtonMainColor2 := "0xFF33383E" , MyButtonDesign.Pressed.ButtonAddGlossy := "0" , MyButtonDesign.Pressed.GlossTopColor := "0x11FFFFFF" , MyButtonDesign.Pressed.GlossTopAccentColor := "05FFFFFF" , MyButtonDesign.Pressed.GlossBottomColor := "33000000"
;********************************
return MyButtonDesign
}
Here is a functioning example of setting the class to use the buttons designed in the editor. *Edit the #Include
Code: Select all
;***************************************************************************************************
#Include <My Altered Gdip Lib> ; <----------- GDIP LIB
#Include <Gen 3 Buttons> ; <---------- HButton class
;***************************************************************************************************
#SingleInstance, Force
Gdip_Startup()
Theme1 := HBCustomButton()
GuiButtonType1.SetSessionDefaults( Theme1.All , Theme1.Default , Theme1.Hover , Theme1.Pressed )
MyFirstButton := New HButton( { Owner: 1 , X: 10 , Y: 10 , W: 100 , H: 35 , Text: "OK" , Label: "TestFunction" } , { BackgroundColor: "0xFFF0F0F0" } )
Gui, 1:Show
return
GuiClose:
ExitApp
TestFunction(){
ToolTip, In the test function
SoundBeep, 500
}
HBCustomButton(){
local MyButtonDesign := {}
MyButtonDesign.All := {}
MyButtonDesign.Default := {}
MyButtonDesign.Hover := {}
MyButtonDesign.Pressed := {}
;********************************
;All
MyButtonDesign.All.W := 200 , MyButtonDesign.All.H := 65 , MyButtonDesign.All.Text := " Button " , MyButtonDesign.All.BackgroundColor := "0xFF22262A"
;********************************
;Default
MyButtonDesign.Default.W := 200 , MyButtonDesign.Default.H := 65 , MyButtonDesign.Default.Text := "Button" , MyButtonDesign.Default.Font := "Arial" , MyButtonDesign.Default.FontOptions := " Bold Center vCenter " , MyButtonDesign.Default.FontSize := "12" , MyButtonDesign.Default.H := "0x0002112F" , MyButtonDesign.Default.TextBottomColor2 := "0x0002112F" , MyButtonDesign.Default.TextTopColor1 := "0xFFFFFFFF" , MyButtonDesign.Default.TextTopColor2 := "0xFFFFFFFF" , MyButtonDesign.Default.TextOffsetX := "0" , MyButtonDesign.Default.TextOffsetY := "0" , MyButtonDesign.Default.TextOffsetW := "0" , MyButtonDesign.Default.TextOffsetH := "0" , MyButtonDesign.Default.BackgroundColor := "0xFF22262A" , MyButtonDesign.Default.ButtonOuterBorderColor := "0xFF161B1F" , MyButtonDesign.Default.ButtonCenterBorderColor := "0xFF262B2F" , MyButtonDesign.Default.ButtonInnerBorderColor1 := "0xFF3F444A" , MyButtonDesign.Default.ButtonInnerBorderColor2 := "0xFF24292D" , MyButtonDesign.Default.ButtonMainColor1 := "0xFF272C32" , MyButtonDesign.Default.ButtonMainColor2 := "0xFF272C32" , MyButtonDesign.Default.ButtonAddGlossy := "1" , MyButtonDesign.Default.GlossTopColor := "0x11FFFFFF" , MyButtonDesign.Default.GlossTopAccentColor := "05FFFFFF" , MyButtonDesign.Default.GlossBottomColor := "33000000"
;********************************
;Hover
MyButtonDesign.Hover.W := 200 , MyButtonDesign.Hover.H := 65 , MyButtonDesign.Hover.Text := "Button" , MyButtonDesign.Hover.Font := "Arial" , MyButtonDesign.Hover.FontOptions := " Bold Center vCenter " , MyButtonDesign.Hover.FontSize := "12" , MyButtonDesign.Hover.H := "0x0002112F" , MyButtonDesign.Hover.TextBottomColor2 := "0x0002112F" , MyButtonDesign.Hover.TextTopColor1 := "0xFFFFFFFF" , MyButtonDesign.Hover.TextTopColor2 := "0xFFFFFFFF" , MyButtonDesign.Hover.TextOffsetX := "0" , MyButtonDesign.Hover.TextOffsetY := "0" , MyButtonDesign.Hover.TextOffsetW := "0" , MyButtonDesign.Hover.TextOffsetH := "0" , MyButtonDesign.Hover.BackgroundColor := "0xFF22262A" , MyButtonDesign.Hover.ButtonOuterBorderColor := "0xFF161B1F" , MyButtonDesign.Hover.ButtonCenterBorderColor := "0xFF262B2F" , MyButtonDesign.Hover.ButtonInnerBorderColor1 := "0xFF3F444A" , MyButtonDesign.Hover.ButtonInnerBorderColor2 := "0xFF24292D" , MyButtonDesign.Hover.ButtonMainColor1 := "0xFF122BE6" , MyButtonDesign.Hover.ButtonMainColor2 := "0xFF0006EE" , MyButtonDesign.Hover.ButtonAddGlossy := "1" , MyButtonDesign.Hover.GlossTopColor := "0x11FFFFFF" , MyButtonDesign.Hover.GlossTopAccentColor := "05FFFFFF" , MyButtonDesign.Hover.GlossBottomColor := "33000000"
;********************************
;Pressed
MyButtonDesign.Pressed.W := 200 , MyButtonDesign.Pressed.H := 65 , MyButtonDesign.Pressed.Text := "Button" , MyButtonDesign.Pressed.Font := "Arial" , MyButtonDesign.Pressed.FontOptions := " Bold Center vCenter " , MyButtonDesign.Pressed.FontSize := "12" , MyButtonDesign.Pressed.H := "0x0002112F" , MyButtonDesign.Pressed.TextBottomColor2 := "0x0002112F" , MyButtonDesign.Pressed.TextTopColor1 := "0xFFFFFFFF" , MyButtonDesign.Pressed.TextTopColor2 := "0xFFFFFFFF" , MyButtonDesign.Pressed.TextOffsetX := "0" , MyButtonDesign.Pressed.TextOffsetY := "0" , MyButtonDesign.Pressed.TextOffsetW := "0" , MyButtonDesign.Pressed.TextOffsetH := "0" , MyButtonDesign.Pressed.BackgroundColor := "0xFF22262A" , MyButtonDesign.Pressed.ButtonOuterBorderColor := "0xFF62666a" , MyButtonDesign.Pressed.ButtonCenterBorderColor := "0xFF262B2F" , MyButtonDesign.Pressed.ButtonInnerBorderColor1 := "0xFF151A20" , MyButtonDesign.Pressed.ButtonInnerBorderColor2 := "0xFF151A20" , MyButtonDesign.Pressed.ButtonMainColor1 := "0xFF12161a" , MyButtonDesign.Pressed.ButtonMainColor2 := "0xFF33383E" , MyButtonDesign.Pressed.ButtonAddGlossy := "0" , MyButtonDesign.Pressed.GlossTopColor := "0x11FFFFFF" , MyButtonDesign.Pressed.GlossTopAccentColor := "05FFFFFF" , MyButtonDesign.Pressed.GlossBottomColor := "33000000"
;********************************
return MyButtonDesign
}
- temp.gif (62.4 KiB) Viewed 8349 times
.
Enjoy!
There are a few things that I didn't go over, so if you have any questions feel free to ask.