【发布时间】:2022-06-22 07:03:34
【问题描述】:
GraphicsWindow.Width = 1080
GraphicsWindow.Height = 607.5
gw = 1080
gh = 607.5
GraphicsWindow.Left = 0
GraphicsWindow.Top = 0
dw = Desktop.Width
dh = Desktop.Height
WidthMod = dw / gw
HeightMod = dh / gh
newWidth = 1080 * WidthMod
newHeight = 607.5 * HeightMod
distanceWidth = newWidth - gw
distanceHeight = newHeight - gh
LDGraphicsWindow.Reposition(WidthMod, HeightMod, distanceWidth / 2, distanceHeight / 1.3, 0)
重新定位命令的语法为:reposition(scaleX, scaleY, panX, panY, angle) 我不明白为什么将 distanceWidth(这是旧屏幕和新屏幕大小之间的差异)除以 2 或将 distanceHeight 除以 1.3 会将游戏平移到我需要它的最上角。我想平移它,以便该游戏具有相同的视图,仅取决于 16:9 的比例。
请帮忙 OMG PLESAE :(((((
【问题讨论】:
标签: smallbasic