Giter Club home page Giter Club logo

blockout's People

Contributors

justen-n avatar marchermans avatar nightenom avatar ravenbuilder934 avatar raycoms avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blockout's Issues

Improve usability of the new TextField

The new TextField

When #19 is finished:

The textfield will support basic MineCraft 1.12 Written Book style edition (no cursor movement no selection). This is of course a dearly needed feature. To support this we need to make some change to the Client interception of UI input.

Required changes:

  • Intercept special KeyInputs (like CTRL + V, and CTRL + C) on the client side and process them.
  • Add support for cursor positioning (move the cursor by clicking) on the client side due to the requirement of the FontRenderer.
  • Intercept special KeyInputs (like Left-Arrow, Right-Arrow) on the server side and process it accordingly.
  • Add support for selection. Just as with cursor movement selection requires MouseInput to be tracked on the Client side.
  • Add support for SpecialKey input syncing. Track SHIFT, CTRL and other special keys when messages are send to the server.
  • Add support for special special KeyInput selection (like SHIFT+Left Arrow). This can be processed on the server side.

Reimplement the TextField

The textfield

Current behaviour:

The current textfield tries to behave as the MineCraft textfield on the server side. Which ofcourse fails, since for example the FontRenderer is not available for size calculation.

Expected behaviour:

The textfield to function properly.

Required changes

  • Insert mechanics that allow a control to intercept UI input on the client side.
  • Add networking capability interception to intercept UI input on the client side.
  • Add messages that are send to the Server when the TextField intercepts a UI input and has processed it on the client side with its font renderer.
  • Implement a basic typing supporting TextField. Preferably using some kind of simple background texture.

Add a control that represents a tabbed UI

Tabbed UI

Features

  • Tabs need to be on the top.
  • Groups of tabs on either side.
  • Nothing on the bottom.
  • If only one group is supplied no groups are rendered, and the only group is always the selected.
  • Supports a single template for tabs and a single template for groups.
  • If binding is used (and thus the templates), both templates need to be defined by the user, else the factory throws an exception.
  • If binding is not used, no templates are allowed to be defined.

Add a control that represents a list.

List: Display an enumeration of items.

Features:

  • Scrollable.
  • Supports multiple templates that are applied in rollover order.
  • Supports databinding to templates
  • Caches the list by cloning the bound list (if the list is bound) and only sends an update when the list changes.
  • Supports not bound operations: Functions like a vertically scrollable area.
  • Modifies its children so that always fill up the entire width
  • Scrollbar fades in and out when used (Optional)
  • Should prevent other scroll accepting elements from being added to themselfs, kinda like buttons prevent click accepting elements to be added.

Templates:

  • Templates should be their own IUIElement instance, width an additional method that clones them and turns them into a bound element. (So they require their own factory, but no construction data helper in my eyes, but if someone wants to make them a fully fletched control be my guest)
  • Should be reusable for other Controls (Tabbed UIs, Books etc)
  • Should be loadable from a different file
  • Should be loadable directly from the same source
  • Should NOT be loadable from a different file and the same source in the same Template instance.

imageoffset and imagesize do not work

I am working on a resource pack for minecolonies whereby the minecolonies textures would inherit from whatever texture pack the player has installed. This is not working, though, because the imageoffset and imagesize do not work.

Expected behavior:
imageoffset="0px 0px" (pixel-based)
imagesize="100px 20px" (pixel-based)

imageoffset="0 0" (pixel-based)
imagesize="100 20" (pixel-based)

imageoffset="0% 0%" (percent-based on image total width/height)
imagesize="19.53125% 3.90625%" (percent-based on image total width/height)

Example:

<buttonimage id="inventory"
align="BOTTOM_MIDDLE" size="86 17" pos="0 13"
source="minecraft:textures/gui/widgets.png"
imageoffset="0% 25.78125%"
imagesize="77.9296875% 7.6171875%"
label="$(container.inventory)" textcolor="black"/>

The ideal solution would be to use the % values so that the same xml would support any texture pack regardless of resolution.

The image, whether by offset/size or a full image should be resized/scaled to fit within the size specified by the container and not truncated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.