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

what windows is this (1.2)

Discussion in 'General discussion' started by VCraft, Aug 22, 2017.

  1. VCraft

    VCraft Witch

    Messages:
    60
    GitHub:
    VCraftMCPE
    [​IMG] i have been searching what window is this for more than 4 days but i found nothing
     
  2. EdwardHamHam

    EdwardHamHam Skeleton

    Messages:
    962
    GitHub:
    edwardhamham
    It's a custom GUI. They're possible in 1.2.
     
  3. XdmingXD

    XdmingXD Baby Zombie

    Messages:
    158
    GitHub:
    xdmingxd
    Can we make the custom GUI with only pmmp?
     
  4. Sandertv

    Sandertv Zombie Pigman Poggit Reviewer

    Messages:
    786
    GitHub:
    Sandertv
    Yes, we can. Even without any API, if you desire. It's only possible in 1.2 however.
     
  5. TheDiamondYT

    TheDiamondYT Zombie

    Messages:
    298
    GitHub:
    TheDiamondYT1
    That logo looks like AvengeTech.

    @Sandertv I think it's time to make some plugins utilizing this new GUI :)
     
    Sandertv likes this.
  6. mal0ne_23

    mal0ne_23 Spider Jockey

    Messages:
    30
    GitHub:
    mal0ne-23
    o is my idea gonna be stolen
     
  7. Eduardo

    Eduardo Baby Zombie

    Messages:
    100
    GitHub:
    xBeastMode
    Nobody's talking about "your idea"; they just wanted to know about the custom forms.
     
  8. Shadowpauler

    Shadowpauler Creeper

    Messages:
    4
    GitHub:
    shadowpauler
    That's amazing! I would love to see GUI's for MCPE servers!
     
  9. Sandertv

    Sandertv Zombie Pigman Poggit Reviewer

    Messages:
    786
    GitHub:
    Sandertv
    How to do it without API in a nuttshell:

    1. Create some json, for example with PHP arrays and json_encode() to turn it into json.
    2. Send the player a ModalFormRequestPacket, with DataPacket->formData as the json you made, and DataPacket->formId as a unique ID you think no other plugins would use. This ID is not important for now.
    3. Send the datapacket to the player, wait for the player to click a button or use the submit button.
    4. Listen for ModalFormResponsePacket and check if Packet->formId is the unique ID you used to send it earlier.
    5. Json_decode Packet->formData and voila, you have your results in an array, or the index of the button when using a form.

    For an example on doing this API-less, you could look at this:
    https://github.com/BlockHorizons/BlockSniper/tree/Threaded-Editing/src/BlockHorizons/BlockSniper/ui
    The actual processing of the forms is done here:
    https://github.com/BlockHorizons/Bl...ockSniper/listeners/UserInterfaceListener.php
     
  10. VCraft

    VCraft Witch

    Messages:
    60
    GitHub:
    VCraftMCPE
    tysm
     
  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.