Problems with Minimap and Game Map Not Respecting Size

Moderator: Moderator

Post Reply
Message
Author
chaosdev
Posts: 1
Joined: Thu Mar 08, 2018 7:48 pm

Problems with Minimap and Game Map Not Respecting Size

#1 Post by chaosdev »

So I'm using the T-Engine for my 7DRL this year, and I've run into some problems. Any help would be appreciated.

1. I've had problems with the minimap overrunning its borders when the level is very large. Even though I'm specifying a width and a height, the minimap doesn't respect this width and height and just draws outside that width and height. This matches the problems soemone else posted about here. Is there a quick fix for this? Is there something better I should be doing?

2. I've run into some problems with the Map:setViewPort() function. Intermittently, I'll get problems where the map starts running under the sidebar, beyond where I set the x position of the map viewport. But then when I move right, the map will snap back into its correct place. I've seen some code in "tome/class/uiset/Minimalist.lua" that adds padding. Is that how this is usually fixed?

Basically, when I do this:

Code: Select all

Map:setViewPort(map_x, map_y, map_w, map_h)
sometimes the map will be displayed at a position x < map_x.

I might just add in some padding manually, so I don't have to worry about the map going outside its bounds.

Post Reply