- Joined
- Dec 11, 2009
- Messages
- 234
So I want to move the minimap to top-left corner of the screen (staying within 4:3 bounds, ofc).
I successfully moved the model itself with the following code, but here is the problem:
It seems that interactable frame-area didn't move (where it gets the click coordinates and stuff), and this is what I get as a result:
I'm using 1.31.1.
What am I doing wrong?
I successfully moved the model itself with the following code, but here is the problem:
It seems that interactable frame-area didn't move (where it gets the click coordinates and stuff), and this is what I get as a result:
JASS:
function test()
local framehandle minimap = BlzGetOriginFrame(ORIGIN_FRAME_MINIMAP, 0)
BlzFrameClearAllPoints(minimap)
// war3mapMap.blp is 256x256 pixels
BlzFrameSetAbsPoint(minimap, FRAMEPOINT_TOPRIGHT, 0. + 256.*px2dpi(), 0.4 + 256.*px2dpi())
BlzFrameSetAbsPoint(minimap, FRAMEPOINT_BOTTOMLEFT, 0., 0.4)
endfunction
function px2dpi() returns real
return 0.6/_localResolutionHeight
endfunction
// function dpi2px() returns real
// return _localResolutionHeight/0.6
// endfunction
function onInit()
_localResolutionWidth = BlzGetLocalClientWidth()
_localResolutionHeight = BlzGetLocalClientHeight()
endfunction
What am I doing wrong?