Coder Social home page Coder Social logo

couchcraft's Introduction

couchcraft's People

Contributors

ecumene avatar

Stargazers

 avatar

Watchers

 avatar

couchcraft's Issues

Including Non-Button targets in Gui Mouse Movement

This would include recursively looking for Sliders, lists, buttons, checkboxes, fields, item stacks, inventory slots, new things that pop up from nowhere (looking at NEI), and so many other things. Each thing needs its own mouse movement (sliders need to be easy to slide and all).
If anyone has ideas for gui inputs that might need specific tweaking with mouse movement I'd love to add them to my list.

Custom cursor interaction with specific GuiScreens

Pseudo code:

public interface GuiCursorCallback {
public Vector2f guiCursorCallback(Vector2f previousCallback, GuiScreen currentScreen, CursorController cursor) {
    if(currentScreen instanceof MyScreen) // Special code for a special screen
        if(cursor.hoverMode) return ...; // Return special hover code
        else                 return ...; // Special jump code
     else return previousCallback; // Give back the old callback, nothing else to do...
    }
}

This makes it easy for special Gui like the inventory screen to have custom interaction, like easier crafting or Gui specific button actions.

A Gui screen for editing config file / keybinds

This will have a line at the top to use your mouse and click on buttons then preform an action on the controller to bind axis and buttons to MC controls.
It'll also save to the config file, on exit.

Configuration files

Config files need to be able to bind any axis or button, to any minecraft keybind and other useful events.

oh boy...

Hovering Mouse Gui Feature

This issue is to add a new way of interacting with the gui, by using the axis to control pointer movement in Guis.

The divide between "Hovering" movement and "Jumping" movement will be separated like so:
If the Gui is in the Jump Supported list, use jumping. Otherwise, use Hovering.

Multiple Controller Support

This would allow the user to select which gamepad is for this client, which allows for things like a splitscreen experience where each game is in a different window, with different controllers selected.
This issue is for the code-functionality only, not the Gui for it. That will come after issue #5

For this issue to be resolved, a VM argument will describe which index to use as the controller
-couchcontrol 1

Gui Slot functionality

GuiScreens containing slots are not able to be interacted with. This is because GuiSlot uses its own code to check for Mouse Presses.
How to fix this:

  1. Use reflection to find if the current GuiScreen has a GuiSlot, then use reflection to edit its fields and simulate a mouse click.
  2. Perhaps add a few functions to control the scroll feature via the mouse being close to the bottom of the scroll pane?

Fix Mouse Clicking

Currently, mouse clicking works in every case, except for the GuiSlot class where it independently checks for Mouse.isButtonDown(0) (sigh)

To fix this, an ASM coremod must be written to replace the Mouse class with custom code to left and right click, and scroll.

Couchcraft 2 - The GUI Revamp!

Some time in the future, all GUI interaction will have a Jump function, where the empty spaces in the gui is skipped via finding targets on the screen

Better Gui Movement

Here's how the buttons move now

if(moveLeftTriggered) {
    Vec2f closestMouseTarget = new Vec2f(-1, -1); // Totally Impossible, intended
    for(Vec2f buttonTarget : allButtonPositionsOnScreen) {
        if(buttonTarget.x < closestMouseTarget.x) { // Choose Left of It
            Vec2f distance1 = new Vec2f(buttonTarget); 
            distance1.sub(currentMouseCoordinates);
            Vec2f distance2 = new Vec2f(closestMouseTarget);
            distance2.sub(currentMouseCoordinates);
            if (distance1.length() < distance2.length()) // Which is closer, the new button or the old?
                closestMouseTarget = buttonTarget;
        }
    }
}

This works, somewhat. But it really should be using that algorithm for a last resort. Above that code should be something that finds all buttons who's X values are the same, otherwise aligned. That way buttons are a little more predictable when moving left and right. This and some other features could produce better results with GuiButtonTargets.

Moving GUI Mouse Control from Controller Context

Lots of things are in ControllerContext that shouldn't be there. ControllerContext should handle only input, and recording poll information. The GUI Mouse Control things can perhaps be moved to a separate class, and XboxControllerContext, PS4ControllerContext and so on should deal with them. This includes making a GuiControllerMouse that operates in GUIs, so ControllerContext doesn't have to.

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.