DiscoveryGC / FLHook

FLHook for Discovery Freelancer
Other
28 stars 33 forks source link

Popup dialog rework #85

Closed Lazrius closed 5 years ago

Lazrius commented 5 years ago

Reworked the popup dialog system allowing for multiple options and detecting input from them. Event PopupDialog is fired after a button is clicked and carries the client ID of the user and the value of the button they pressed. This value will always be 1, 2, 4, or 8.

Example Usage:

void __stdcall PopUpDialog(uint iClientID, uint iButtonValue)
{
    returncode = DEFAULT_RETURNCODE;
    switch(iButtonValue)
    {
        case 1:
            PrintUserCmdText(iClientID, L"You pressed 'Yes'.");
        case 2:
            PrintUserCmdText(iClientID, L"You pressed 'No'.");
        case 4:
            PrintUserCmdText(iClientID, L"You pressed 'Later'.");
        case 8:
            PrintUserCmdText(iClientID, L"You pressed 'Ok'.");
        case default:
            PrintUserCmdText(iClientID, L"This isn't possible.");
    }
}
Lazrius commented 5 years ago

I have deleted my FLHook fork and am now unable to make changes. Closing request.