Antique Atlas

Antique Atlas

32M Downloads

Map GUI buttons do not respond to clicks in expected location

Danklor opened this issue ยท 7 comments

commented

The AA GUI displays normally, but the GUI buttons don't respond when clicked. The arrow icons highlight when moused over, but don't act when clicked. When the mouse is over the right edge of the MC window at a distance about 1 AA GUI height from the bottom, the up-arrow will highlight and be clickable. A similar action works for the left-arrow button when the mouse is on the bottom edge of the MC window about 1 AA GUI width from the right side. Demonstration video attached.

Atlas-button-issue.mov.zip

MC 1.14.4
Fabric 0.6.3-b168
Fabric API 0.4.1-b245
Cotton 1.0.0-rc3
Antique Atlas 5.1.1
No other mods

commented

Thank you for attaching the video, so I had an idea of what I have to look for. However, I tried to reproduce this issue with two machines but wasn't able to. It works fine for me. Can you elaborate a bit more on your machine setup?

  • Which Java version are you using?
  • Which OS (and version) are you using?
  • What is your screen resolution?
  • Which setting are you using in-game for the GUI scale?
commented

The system with the problem:
MacOS 10.14.6
Oracle Java SE 1.8.0-221
MultiMC5 0.6.7-1316
LWJGL 3.2.2

I am able reproduce 100% with any resolution, GUI scale, and windowed vs fullscreen. The "sensitive spots" for the up- and left- arrow clicks are always relative to the bottom right edge of the screen/window regardless of resolution/scale/windowed settings.

I have access to other computers so I will let you know how those behave.

commented

I've updated the affected computer to Oracle Java SE 1.8.0-231 and Antique Atlas 5.1.2, but that did not change behavior.

I tried the same Java, MultiMC, and mod files on two other systems (one Windows 7 and one MacOS 10.11.5) and was not able to reproduce the problem on either one. I do not have another MacOS 10.14.6 system handy to check if this is an OS specific problem.

On the affected computer I performed a fresh install of MultiMC, Fabric, etc. in a different directory tree, but the problem persisted.

Is there anything else you'd like me to try?

commented

I think I found the part of the source code that changes the darkness of the GUI arrow buttons based on mouse position. Note in my attached video that the buttons' alpha responds as expected with a near-mouse (the "else" clause?), but the actual mouse-over (the "if" clause?) is misinterpreted on my one misbehaving computer. I'm not sure if this gives you any clues, but I thought I'd give a try.

See GuiArrowButton.java--

public void drawScreen(int mouseX, int mouseY, float partialTick) {
...
if (isMouseOver) {
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
} else {
// Fade out when the mouse is far from them:
int distanceSq = (mouseX - x - getWidth()/2)(mouseX - x - getWidth()/2) +
(mouseY - y - getHeight()/2)
(mouseY - y - getHeight()/2);
double alpha = distanceSq < 400 ? 0.5 : Math.pow((double)distanceSq, -0.28);
GlStateManager.color(1, 1, 1, (float)alpha);
}
...

commented

Okay, it has something to do with running on macOS. I see it on 10.15.1 too. So now on to debugging.

commented

Okay, found it. I don't think it has something to do in particular with macOS, instead with resolution scaling on those devices.

commented

The problem described here is resolved in version 5.1.3. Thanks!!!