News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Coloured rounded buttons

Started by jj2007, August 03, 2023, 01:09:36 AM

Previous topic - Next topic

jj2007

The source:
GuiParas equ "Colourful buttons", w320, h120, icon Butterfly    ; 32% of window width, 12% of height
; GuiButtonPen equ <MakePen MbBtnPen, RgbCol(180, 255, 255, 255), width 9> ; optional: white, half transparent border
include \masm32\MasmBasic\Res\MbGui.asm
  GuiControl Button1, "button", "A normal pushbutton", w250, h0+50    ; width 25% of client area, height 0%+40px
  GuiControl Button2, "button", "Lite Turquoise"/"Blue", bcol LiteBlueGreen/Blue, x250, w250, h0+50, font -14
  GuiControl Button3, "button", "Lite Yellow"/"Full Yellow", bcol LiteYellow/Yellow, fcol Red/Black, x500, w250, h600+20, font -14:FW_BOLD
  GuiControl Button4, "button", "Rounded button", bcol Grey/Red, fcol Black/White, rr40, x750, w250, h0+50, font -12:FW_SEMIBOLD
GuiEnd

The result:


Attached two versions, one with the optional GuiButtonPen, one without. They look quite different when pressed ;-)

Building requires MasmBasic of 2 August 2023