resize_map()
var s = winget(src, "_map.map1", "size")
var list/dimensions = dd_text2list(s, "x")
var nx = text2num(dimensions[1]), ny = text2num(dimensions[2])
client.view = "[round((nx / 32)/usr.map_zoom)]x[round((ny / 32)/usr.map_zoom)]"
if(isduel) if(usr.Hand.len) Make_Hand_Cards(,,1)
return
So I just recently added some code to my game so that, when a player resizes their window, the map will automatically adjust itself to fill the window as much as possible without over filling the screen and some zoom-in functionality. Players were requesting it since the game can be a bit hard to see at higher resolutions.
I used to allow players to manually set their map size, but it caused problems with the interface where players could set the value too high and lose their interface controls off the sides of the screen.
The code works fine and does exactly what I wanted it to.
The issue I was running in to was that, since players dont always have their screen to perfectly fit the 32x32 grid, players would end up with a black border around the edge of their map.
I was able to "fix" this by changing the background color of the map in the skin settings to match the background color of the skin itself so it looks fine now.
But now I'm running in to the problem of, in certain areas of the game, where opacity is used to block light, like in interior of buildings, the sections of blocked light are using that same background color.
Here is what the map looks like normally. https://images2.imgbox.com/20/37/nfjdxLA4_o.png
The grey segments around the outer edge of the map were black originally
But it had the unintended side effect of having things like this happening...
https://images2.imgbox.com/ae/82/vSx78BPq_o.png
Is there any way to assign these colors seperately from each other?