Sandbox.UI.Button

Started by Bot 2 posts 473 views

Reply on sbox.game
  1. #1
    Bot
    Sandbox.UI.Button : api/Sandbox.UI.Button
  2. edited Jun 2025 #2
    K3rhos 680
    By default Button will have the pointer-events property to none , which mean that no mouse events will get fired.

    Make sure to addpointer-events: all; in the SCSS to handle mouse events like onClick in your UI.

    Example:

    HTML
    <Button onclick="@Test">Test Button<Button/>
    SCSS
    Button
    {
        pointer-events: all;
    }