Currently working in an IMGUI system. It very much WIP but coming along well.

MEDIA


CODE
Code:
  TdeGuiSliderEvent = procedure(aSender: Pointer; aId: Integer; aValue: Single; aMinValue: Single; aMaxValue: Single);
  TdeGuiButtonEvent = procedure(aSender: Pointer; aId: Integer);

{ --- TdeIMGUI -------------------------------------------------------------- }
  TdeIMGUI = class(TdeBaseObject)
  protected
    FStyle: array[DEFAULT_BACKGROUND_COLOR..LISTVIEW_TEXT_COLOR_DISA  BLED] of Integer;
    FGuiState: TdeGuiControlState;
    FGuiAlpha: Single;
    FCursorTimer: Single;
    FCursorBlink: Boolean;
    function VALIGN_OFFSET(aHeight: Integer): Integer; inline;
    function GetColor(aValue: Cardinal): TColor;
    function Fade(aColor: TColor; aAlpha: Single): TColor;
    function CheckCollisionPointRec(aX: Integer; aY: Integer; aBounds: TRect): Boolean;
    function IsMouseButtonDown(aButton: Integer): Boolean;
    function IsMouseButtonReleased(aButton: Integer): Boolean;
    function IsMouseButtonUp(aButton: Integer): Boolean;
    function GetKeyPressed: Integer;
    function IsKeyPressed(aKey: Integer): Boolean;
    function IsKeyDown(aKey: Integer): Boolean;
    procedure DrawRectangleLines(aBounds: TRect;  aThick: Integer; aColor: TColor);
    procedure DrawRectangle(aX: Integer; aY: Integer; aWidth: Integer; aHeight: Integer; aColor: TColor);
    procedure DrawRectangleRec(aRec: TRect; aColor: TColor);
    function MeasureText(aText: string; aFontSize: Integer): Integer;
    procedure DrawText(aText: string; aX: Integer; aY: Integer; aFontSize: Integer; aColor: TColor);
    procedure SetGuiFade(aValue: Single);
  public
    property GuiAlpha: Single read FGuiAlpha write SetGuiFade;
    constructor Create; override;
    destructor Destroy; override;
    procedure SetProperty(aProperty: TdeGuiProperty; aValue: Cardinal);
    function GetProperty(aProperty: TdeGuiProperty): Cardinal;
    procedure Enable;
    procedure Disable;
    procedure &Label(aBounds: TRect; aText: string);
    function LabelButton(aBounds: TRect; aText: string): Boolean;
    function Button(aBounds: TRect; aText: string; aSender: Pointer=nil; aId: Integer=-1; aEventHandler: TdeGuiButtonEvent=nil): Boolean;
    function TextBox(aBounds: TRect; var aText: string; aTextSize: Integer; aEditMode: Boolean): Boolean;
    function CheckBox(aBounds: TRect; var aChecked: Boolean): Boolean;
    function CheckBoxExt(aBounds: TRect; var aChecked: Boolean; aText: string): Boolean;
    function Slider(aBounds: TRect; var aValue: Single; aMinValue: Single; aMaxValue: Single; aSender: Pointer=nil; aId: Integer=-1; aEventHandler: TdeGuiSliderEvent=nil): Single;

    procedure UseDefaultLightStyle;
    procedure UseDefaultDarkStyle;
  end;
DEMO
Code:
program gui_test;

{$APPTYPE CONSOLE}

{$R *.res}

uses
  System.SysUtils,
  dRez.Engine.IMGUI in '..\..\libs\dRez.Engine.IMGUI.pas',
  dRez.Engine in '..\..\libs\dRez.Engine.pas';

const
  cWindowWidth        = 480;
  cWindowHeight       = 600;
  cFullscreen         = False;

var
  Starfield: TStarfield;
  Gui: TdeIMGUI;
  name: string = 'Jarrod';
  check1: boolean = True;
  check2: Boolean = False;
  check3: Boolean = False;
  enable_disable: array[false .. true] of string = ('disabled', 'enabled');
  volume: Single = 1;
  music: TMusic;
  button_status: array[0 .. 1] of string;

  procedure UpdateMusicVolume(aSender: Pointer; aId: Integer; aValue: Single; aMinValue: Single; aMaxValue: Single);
  begin
    Music_SetVolume(aValue);
  end;

  procedure ButtonClicked(aSender: Pointer; aId: Integer);
  var
    s: string;
  begin
    s := '';
    case aId of
      0:
      begin
        button_status[0] :='Button 1 clicked';
        button_status[1] :='';
      end;
      1:
      begin
        button_status[0] :='';
        button_status[1] :='Button 2 clicked';
      end;
    end;

  end;

begin

  // open app window
  Window_Open('dRez Engine - Basic GUI Demo', cWindowWidth, cWindowHeight, cFullscreen, False);

  music := Music_Load(nil, 'arc/music/opus.mp3');
  Music_Play(music, volume, -1);

  Starfield := Starfield_Create;

  gui := TdeIMGUI.Create;
  //gui.SetProperty(SLIDER_SLIDER_WIDTH, 5);

  // LGL game loop - until app has terminated
  while not Terminated do
  begin
    // process events (kbd, mouse, window, etc)
    ProcessEvents;

    // check if app window is ready (has focus, not minimized)
    if not Window_Ready then
    begin
      // delay for 1 millisecond (allow background tasks to run)
      Delay(1);

      // continue to process events
      continue;
    end;

    // terminate on ESC
    if Keyboard_Pressed(KEY_ESCAPE) then
      Terminate(True);

    // toggle fullscreen on F11
    if Keyboard_Pressed(KEY_F11) then
      Window_ToggleFullscreen;

    // screenshot on F12
    if Keyboard_Pressed(KEY_F12) then
      Screenshot_Take;

    if Keyboard_Pressed(KEY_1) then
      gui.GuiAlpha := 0.1;

    if Keyboard_Pressed(KEY_2) then
      gui.GuiAlpha := 1.0;


    Starfield_Update(Starfield, DeltaTime);

    // clear background to a color
    Renderer_ClearFrame(BLACK);

    Starfield_Render(Starfield);

    // display hud
    Font_DrawFPS(ConsoleFont, 3, 3, GREEN, 12);
    Font_DrawText(ConsoleFont, 3, 15, GREEN, 12, 'ESC - Quit');
    Font_DrawText(ConsoleFont, 3, 30, GREEN, 12, 'F11 - Toggle Fullscreen');
    Font_DrawText(ConsoleFont, 3, 45, GREEN, 12, 'F12 - Screenshot');
    //Font_DrawText(ConsoleFont, 3, 60, GREEN, 12, PChar('hex - ' + gui.Test));


    gui.&Label(TRect.Create(3, 100, 50, 15), 'A LABEL');

    gui.Button(TRect.Create(3, 120, 70, 30), 'BUTTON 1', nil, 0, ButtonClicked);
    gui.&Label(TRect.Create(80, 128, 50, 15), button_status[0]);


    gui.Button(TRect.Create(3, 160, 70, 30), 'BUTTON 2', nil, 1, ButtonClicked);
    gui.&Label(TRect.Create(80, 168, 50, 15), button_status[1]);

    gui.TextBox(TRect.Create(3, 200, 70, 30), name, 30, true);
    gui.CheckBox(TRect.Create(3, 240, 20, 20), check1);

    if gui.LabelButton(TRect.Create(3, 270, 70, 30), 'LABEL BUTTON') then WarningDlg('Label Button');

    gui.CheckBoxExt(TRect.Create(3, 300, 10, 10), check2, 'Item 1 (' + enable_disable[check2] + ')' );
    gui.CheckBoxExt(TRect.Create(3, 320, 10, 10), check3, 'Item 2 (' + enable_disable[check3] + ')');

    gui.Slider(TRect.Create(10, 340, 50, 10), volume, 0, 1, nil, 0, UpdateMusicVolume);
    gui.&Label(TRect.Create(70, 340, 50, 15), 'Music Volume');


    // show frame buffer
    Renderer_ShowFrame;

  end;

  gui.Free;

  Starfield_Destroy(Starfield);

  Music_Destroy(music);

  // close app window
  Window_Close;

end.