mob/verb/resize()
set hidden = 1
var/size = winget(src,"map.Main","size") //"default" is the name of the default window.
var/x = findtext(size,"x") //Returns a numeric value, where 'x' is located in the string
var/WIDTH = text2num(copytext(size,1,x)) //Copy the text from the first placement to before the 'x'
var/HEIGHT = text2num(copytext(size,x+1)) //Copy the text after the 'x'
WIDTH = round(WIDTH/32) //Receive a whole number. This ratio works 1:1, 1 pixel for each pixel on screen. Modify that by changing '32'
HEIGHT = round(HEIGHT/32) //Same as above
client.view = "[WIDTH]x[HEIGHT+1]"
Problem description:Would like to know if there was a better option. For resizing window keeping Screen Objs in same place and all.
Check out the LEFT,TOP,BOTTOM,RIGHT screen locations in the new BYOND beta. They are currently bugged, but they should make resizable UIs much easier.
http://www.byond.com/forum/?post=2189366
Also this bit:
500 features make this an inferior way of handling complex strings.
Set mainwnd.on-resize to:
Also, I would very strongly recommend using a system that will set a maximum number of tiles in the viewport at any given time. Otherwise, players with very large viewports are going to have truly awful performance.
That modification would look something like this: