Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple TabbyChat boxes in-game #26

Open
zedwick opened this issue Jun 25, 2015 · 1 comment
Open

Multiple TabbyChat boxes in-game #26

zedwick opened this issue Jun 25, 2015 · 1 comment

Comments

@zedwick
Copy link

zedwick commented Jun 25, 2015

Would be very useful to be able to have multiple tabbed floating "windows" or boxes in-game allowing multiple channels to be viewed onscreen at once.

Each box could have the same set of tabs available across the top, but each able to have a different tab selected/open.

@mattmess1221
Copy link
Owner

As much as I would love to do it, the way I want to implement this require javafx. It's going to have to wait Mojang gets everyone to use Java 8.

I want to put something like this in GuiPanel so I can figure out if a component is visible.

    public boolean isVisible(GuiComponent component, @Nullable Point point) {
        Rectangle rect = component.getBounds();

        Shape s = new javafx.scene.shape.Rectangle(rect.x, rect.y, rect.width, rect.height);

        boolean wait = true;
        for (GuiComponent comp : this) {
            if (wait) {
                if (comp == component) {
                    wait = false;
                }
                continue;
            }
            if (comp == component) {
                return point == null ? true : s.contains(new Point2D(point.x, point.y));
            }
            rect = component.getBounds();
            Shape r = new javafx.scene.shape.Rectangle(rect.x, rect.y, rect.width, rect.height);

            s = Shape.subtract(s, r);
            if (!s.getLayoutBounds().contains(new BoundingBox(0, 0, 0, 0))) {
                return false;
            }

        }
        return true;
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants