Jump to content

Help with a mod to hide the UI while aiming


desze

Recommended Posts

How can I create a mod that, while holding RMB to aim, it'd make the UI ignore the mouse pointer's position or it'd hide the UI until I let go of RMB? (Preferably the former option)

It sort of annoys me that when I want to aim further away and I hover over the UI some of its elements will expand. I spent the last 5 hours trying to understand Lua and Java and reading Zomboid's API but as someone who doesn't know much about coding I couldn't get this to work, the most I achieved was to get a bunch of errors when I clicked something in the UI. Also there aren't any tutorials online teaching this specific type of modding for Zomboid, every tutorial there is talks about adding an item to the game.

Thanks for any help!

Link to comment
Share on other sites

If you go into Options -> Keybindings -> and find the UI section, you should see an unpopulated action called "Toggle UI." While you can't bind the mouse to this, you'd at least be able to hide it with a keypress without having to code anything.

 

If you want to try and automate it in some way, take a look at ISUIHandler.lua.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...