Skip to content

Add missing "down" state for onClientGUIClick#4736

Merged
FileEX merged 2 commits intomultitheftauto:masterfrom
Xenius97:new/gui_click
Mar 3, 2026
Merged

Add missing "down" state for onClientGUIClick#4736
FileEX merged 2 commits intomultitheftauto:masterfrom
Xenius97:new/gui_click

Conversation

@Xenius97
Copy link
Contributor

@Xenius97 Xenius97 commented Mar 2, 2026

Summary

This PR adds missing "down" state for onClientGUIClick (whis was unsupported previously)
image

Maybe this will be backward incompatible with some scripts.

Motivation

Fixes #4730

Test plan

addEventHandler( "onClientResourceStart", resourceRoot, function( )
    btnOutput = guiCreateButton(0.7, 0.1, 0.2, 0.1, "Output!", true)
    addEventHandler("onClientGUIClick", btnOutput, function(...)
        iprint(source, ...)
    end, false)

    editBox = guiCreateEdit(0.3, 0.1, 0.4, 0.1, "Type your message here!", true)
    guiEditSetMaxLength(editBox, 128)
    addEventHandler("onClientGUIClick", editBox, function(...)
        iprint(source, ...)
    end, false)
end)

bindKey("m", "down", function()
    showCursor(not isCursorShowing())
end)

Checklist

  • Your code should follow the coding guidelines.
  • Smaller pull requests are easier to review. If your pull request is beefy, your pull request should be reviewable commit-by-commit.

@Xenius97 Xenius97 requested a review from a team as a code owner March 2, 2026 17:27
@FileEX FileEX added the bugfix Solution to a bug of any kind label Mar 3, 2026
@FileEX
Copy link
Member

FileEX commented Mar 3, 2026

Please update the wiki page

@FileEX FileEX merged commit af669ac into multitheftauto:master Mar 3, 2026
9 checks passed
@Xenius97
Copy link
Contributor Author

Xenius97 commented Mar 4, 2026

Please update the wiki page

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Solution to a bug of any kind

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement down state for onClientGUIClick event

2 participants