Recent Activity

&pureforms
With the jam project coming to a close, we created the first PureForms app and what may very well be the worst reinvention of a wheel ever: A color picker that only works in increments of 16 and doesn't even give you the RGB value of the color you've created. But it does show you pretty tool tips, badger you about closing it, and take up only ~150 LOC. Be sure to check out PureForms in its entirety at https://github.com/errorsuccessdev/PureForms. I've also written up an overview of what this project is and what it's for over at https://handmade.network/p/592/pureforms/. I plan to continue working on this library post-jam, so if easy Win32 GUI dev is appealing to you, keep an eye out!
https://i.imgur.com/uNtPskz.gif

View original message on Discord

&pureforms
This morning we knocked out event handlers and added my correctly positioned™️ tooltips! PureForms allows you to create this GUI and receive click/hover/close events in ~100 LOC:
https://i.imgur.com/SXTpOSy.gif
The full code is available on my GitHub at https://github.com/errorsuccessdev/PureForms.

View original message on Discord

I do get the DM. My post is tagged with &pureforms at the top...

View original message on Discord

&pureforms
Not much of an update today as I spent the morning prepping for and doing a job interview (which I think went well 🤞). I did, however, rough in a way for us to keep track of all the buttons. What could possibly go wrong?

typedef struct structPrivateButtonList 
{
    Button* button;
    struct structPrivateButtonList* next;
} private_ButtonList;

// ...

void private_addButtonToList(Button* button)
{
    private_ButtonList* newListEnd = (private_ButtonList*) HeapAlloc(
        GetProcessHeap(),
        HEAP_ZERO_MEMORY,
        sizeof(private_ButtonList)
    );
    assert(newListEnd);
    newListEnd->button = button;
    newListEnd->next = NULL;
    if (global_firstButton == NULL)
    {
        global_firstButton = newListEnd;
    }
    else
    {
        private_ButtonList* listEnd = global_firstButton;
        while (listEnd->next != NULL)
        {
            listEnd = listEnd->next;
        }
        listEnd->next = newListEnd;
    }
}
View original message on Discord

&pureforms
We are off to a great start! This code + PureForms magic is all it takes to create the window (or "form") shown in the screenshot. The repo is already on github here if you'd like to take a peek behind the scenes: https://github.com/errorsuccessdev/PureForms

#include "PureForms.h"

int WINAPI wWinMain(
    _In_ HINSTANCE hInstance,
    _In_opt_ HINSTANCE hPrevInstance,
    _In_ PWSTR args,
    _In_ int showCommand
)
{
    Form* frmMain = createForm(
        CW_USEDEFAULT,
        CW_USEDEFAULT,
        CW_USEDEFAULT,
        CW_USEDEFAULT,
        L"My Form"
    );
    assert(frmMain != NULL);

    Button* btnFirst = createButton(
        10,
        10,
        200,
        30,
        L"Click me!"
    );

    Button* btnSecond = createButton(
        10,
        50,
        200,
        30,
        L"No, click me instead!"
    );

    bool result = showForm(frmMain, showCommand);
    assert(result);
}```
View original message on Discord