1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

It's possible to detect a text of a button in UI?

Discussion in 'Help' started by LewBr, Apr 19, 2018.

  1. LewBr

    LewBr Zombie

    Messages:
    385
    GitHub:
    lewbr
    Hello, it's possib to detect what is writed in a text of a button in UI? eg: when a player tap to a button that is writen Gamer008, it returns to the player what is in there "Gamer008"? I use that Packet for UIs:
    PHP:
     public function Receive(DataPacketReceiveEvent $event){
        
    $pk $event->getPacket();
        
    $player $event->getPlayer();
        if(
    $pk instanceof ModalFormResponsePacket){
                if(
    $pk->formId === ID){
     
  2. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    GitHub:
    boi1216
    You can store it when you are sending the form
     
  3. LewBr

    LewBr Zombie

    Messages:
    385
    GitHub:
    lewbr
    Yeah, i know that, but i don't want to do that, i want to detect the text when the player taps the button.
     
  4. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    I think FormAPI does that magic, I'd like to know how too
     
    Frogas and jojoe77777 like this.
  5. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    GitHub:
    boi1216
    That's not possible if you don't save text of the button ;)
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.