dfhack icon indicating copy to clipboard operation
dfhack copied to clipboard

Mouse doesn't work in lower screen half

Open SneiferUwU opened this issue 4 years ago • 19 comments

Hello everyone, I have been using dfhack because of the mouse support but encountered a little problem. When I try to click something, and yes only clicking doesn't work, I can still hover over it with the mouse and the curser is still being displayed, but if I click just nothing happens. I have tried changing some parameters like switching from fullscreen to windowed and also and also changing the resolution from 0 | 0 to 1920 | 1200 (my screen resolution) in both windowed and full screen mode but it didnt change anything. I also experimented with the zoom level and on the maximum zoom I can excetly use the upper half of my screen and the further I zoom out the smaller the window I can actually use my mouse gets. Also intersting to note is that if I have the windowed size n 0 | 0 which should make it adjust to my resolution automatically but if I start it its just a super long window but not very wide, I dont know if that says anything. Also reinstalling dfhack didnt fix the issue. Already thanks for all the replies and have a great day.

SneiferUwU avatar Jul 10 '21 20:07 SneiferUwU

If you switch to windowed mode and resize the window, does it work?

Also, do you have intro movies enabled in init.txt ([INTRO:YES])? If so, try turning them off ([INTRO:NO]).

lethosor avatar Jul 10 '21 20:07 lethosor

  1. I've tried that and it did not work.

  2. No I have not aactually I am gonna try that tomorrow though. I'm just gonna hope it works.

Thanks though!

SneiferUwU avatar Jul 10 '21 20:07 SneiferUwU

Another thing I thought of is if i can maybe change the x and y parameters of the mouse in the dfhack files, I dont know if that even is a thing tbh but I though might as well ask if that would be possible.

SneiferUwU avatar Jul 10 '21 20:07 SneiferUwU

Nope, it's not possible. We rely on DF for mouse event handling in this case.

lethosor avatar Jul 10 '21 20:07 lethosor

could i theoretically install df completely new as a starter pack and then change the tileset? Since I used one before and never had that issue before. Just a little side idea I thought it might work.

SneiferUwU avatar Jul 10 '21 21:07 SneiferUwU

and the curser is still being displayed, but if I click just nothing happens

Sorry, I missed this part earlier. This changes things. To confirm: you always see a green X, but clicking only works in a certain area of the screen?

Are you using TWBT? What DFHack version are you using? Running the help command and copying the last line of text that it prints will answer the second question.

Can you run devel/click-monitor enable in the DFHack console and report what it prints when you click somewhere in the area that works, then click somewhere in the area that doesn't respond to clicks?

lethosor avatar Jul 11 '21 04:07 lethosor

Not exactly. I always see my normal mouse cursor, but at maximum zoom, clicking does only work in the upper half of warf fortress. When I click on the lower half, the x doesn't appear and I also can't use it for destination etc. If I zoom out, the area I can use my mouse in stays the same. So I can use my mouse less if I zoom out further, even though the length of that usable window seems to be either infinite or beyond the maximum zoom. That's why I mentioned that the window has a very weird size when opening it that pretty much fits into that usable window and that's why I mentioned that earlier even though I don't understand what zooming would change then. And that is also the reason I tried changing the resolution for both fullscreen and windowed mode and surprisingly that didn't work. I can send a screenshot of the window later.

SneiferUwU avatar Jul 11 '21 06:07 SneiferUwU

Now 2. No I am not using twbt. Thouh I just noticed there is a dfhach version 0.47.05-r2 while I have been using the 0.47.05-r1 I don't know if that might be it. I always though both df and dfhack were up to date, maybe df is out of date as well? But I am not even 100% if I am using the 0.47.05-r1 of dfhack but I will make sure to check that later.

  1. I will try that but I have not yet.

SneiferUwU avatar Jul 11 '21 06:07 SneiferUwU

If you are wondering I am using the Kruggsmash tileset

SneiferUwU avatar Jul 11 '21 06:07 SneiferUwU

Ok little update: I tried truning off the intro and also updated to the newest dfhack version and both didnt fix the problem sadly.

SneiferUwU avatar Jul 11 '21 10:07 SneiferUwU

and another update. I tried zooming out ridiculiusly much and it looks like the mouse is only usable in a recktangle in the upper left corner of the screen I have heard of some people having that problem as well but I have not seen any solutions yet

SneiferUwU avatar Jul 11 '21 10:07 SneiferUwU

Also the command didnt do anything :(

SneiferUwU avatar Jul 11 '21 11:07 SneiferUwU

with that I mean if I click something outside that box I can use my mouse in it just doesn't register it and also doesn't show up in the console. If I click inside the box I can use my mouse in it does show up in the console.

also I dont know if I mentioned it yet but my with keyboard everything works perfectly fine.

SneiferUwU avatar Jul 11 '21 11:07 SneiferUwU

That's why I mentioned that the window has a very weird size when opening it that pretty much fits into that usable window and that's why I mentioned that earlier even though I don't understand what zooming would change then.

Can you send a screenshot of this? Also, can you confirm that data/init/init.txt contains [INTRO:NO] and not [INTRO:YES] (i.e. there should just be one of those tags present).

with that I mean if I click something outside that box I can use my mouse in it just doesn't register it and also doesn't show up in the console.

Sorry, I'm confused - what do you mean by you "can use your mouse"? Is anything in DF or DFHack (including the devel/click-monitor command) responding, or nothing at all? Whether your system's mouse cursor shows up or not probably isn't relevant.

lethosor avatar Jul 18 '21 01:07 lethosor

So as mentioned earlier, in dwarf fortress, it only registers clicks inside a small area in the top left corner. If I type in the devel/click-monitor enable command, every mouse click I do outside that small box in the top right corner does not show up in the console yet in the small box in the top right corner every click is registered and does show up with coordinates in the console.

SneiferUwU avatar Jul 18 '21 07:07 SneiferUwU

Hey there, just wanted to confirm the error, not being able to click on the bottom half of the screen with LNP/DFHack and one of Kruggs tilesets enabled. Its (probably) a problem with the tileset though, which is not properly saved/shared by Krugg. The one I used in testing (form the newest crimsontrumpets series) is 2880x2880 PIXELS(!) big.

Workaround is: open the file in, f.e., gimp, scale to 256x256 pixels, save as png. Note though that Intro still has to be on 'NO'.

So this issue can probably be resolved, if @SneiferUwU can confirm the problem is tileset-wise with him, too. Btw., intro was also set to 'No', Mode was '2D', etc.

merrygin avatar Oct 23 '21 17:10 merrygin

Ive experienced the same issue with ASCII but I can very well imagine the ASCII tilepack (which is the standard one) having the same issue so that might very well be a fix.

SneiferUwU avatar Oct 24 '21 08:10 SneiferUwU

The default ASCII tileset is only 128x192 px

lethosor avatar Oct 24 '21 15:10 lethosor

I fixed a similar issue with TWBT in and made some corresponding changes in DFHack-0.47.05-r7. Could you confirm if this still an issue with the latest release?

myk002 avatar Oct 07 '22 23:10 myk002

Closing for now. Please reopen if this is still an issue.

myk002 avatar Oct 19 '22 23:10 myk002