ToME: the Tales of Maj'Eyal

Problems with Minimap and Game Map Not Respecting Size
Page 1 of 1

Author:  chaosdev [ Thu Mar 08, 2018 8:35 pm ]
Post subject:  Problems with Minimap and Game Map Not Respecting Size

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:
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.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group