BlockHorizons / BlockSniper

An advanced (brush) world editing plugin for PocketMine-MP
https://poggit.pmmp.io/p/BlockSniper/
Apache License 2.0
76 stars 41 forks source link

Custom User Interface Proposal #64

Closed Sandertv closed 6 years ago

Sandertv commented 7 years ago

Custom UI Proposal for update 1.5.0.

Introduction As of Minecraft PE update 1.2, custom User Interfaces were added in the form of packets to send and receive. These User Interfaces are great for plugins such as BlockSniper, and will greatly simplify the process of configuring and modifying things such as brush properties in BlockSniper.

The Proposal For BlockSniper, we can use the custom UI useful for many features. The best idea I have came up with works as the following, supposing custom UI windows can be stacked onto eachother, without deleting the window behind the currently visible window.

The User Interface structure might look quite complicated, but should be very convenient for usage. That's what it's after, after all. The User Interface 'tree', as called from now on, should look like the following.

Main Interface/Menu, Type: 'form': [
- Presets, Type: 'button' -->
    Preset Menu, Type: 'form': [
    - Select, Type: 'button' -->
      Preset Selection Menu, Type: 'custom_form': 
      - Existing Presets, Type: 'dropdown'
    - Create, Type: 'button' -->
      Preset Creation Menu, Type: 'custom_form':
      - Preset Name, Type: 'input'
      - Brush Size, Type: 'step_slider'
      - Brush Shape, Type: 'dropdown'
      - Brush Type, Type: 'dropdown'
      - Brush Blocks, Type: 'input'
      - Etc...
    - Delete, Type: 'button' -->
      Preset Selection Menu, Type: 'custom_form': 
      - Existing Presets, Type: 'dropdown'
    ]
- Brush, Type: 'button' -->
    Brush Menu, Type: 'custom_form': [
    - Brush Size, Type: 'step_slider'
    - Brush Shape, Type: 'dropdown'
    - Brush Type, Type: 'dropdown'
    - Brush Blocks, Type: 'input'
    - Etc...
    ]
- Configuration, Type: 'button' -->
    Configuration Menu, Type: 'custom_form': [
    - Language, Type: 'dropdown'
    - Maximum Size, Type: 'input'
    - Drop Leafblower Plants, Type: 'toggle'
    - Etc...
    ]
]

The UI tree shown above is the bare basic. That means, that these are absolutely mandatory, and that other things such as an information button are very likely to still be added to this tree of User Interface.

Follow Up To succeed with this idea, the first thing that should be checked is whether custom User Interfaces can be stacked or not. If not, this proposal might have to be changed depending on what does work. A User Interface library might have to be written for easier usage.

SOF3 commented 7 years ago

Any reference on such interface so far?

Sandertv commented 7 years ago

No actual references I found on it so far, but Steadfast2 does seem to have an API for it. I'm just going to mess around with it and try things out. According to dktapps the client sends messages when something's wrong which contains information that is correct.

dktapps commented 7 years ago

did someone ping me?

Sandertv commented 7 years ago

I pinged you then removed it in the hope I wouldn't spam your notifications for no reason. Damn GitHub.