Files
infinitefusion-e18/Data/Scripts/001_Technical/001_MKXP_Compatibility.rb
Roza 1f2309c4d2 Remove Win32API calls & upgrade to modern Ruby (#96)
* Win32API removal + Ruby 3 updates
* Update binaries to match mkxp-z 2.1
2021-02-25 22:09:59 +00:00

28 lines
689 B
Ruby

$VERBOSE = nil
def pbSetWindowText(string)
System.set_window_title(string || System.game_title)
end
class Bitmap
alias mkxp_draw_text draw_text
def draw_text(x, y, width, height, text, align = 0)
height = text_size(text).height
mkxp_draw_text(x, y, width, height, text, align)
end
end
def pbSetResizeFactor(factor)
if !$ResizeInitialized
Graphics.resize_screen(Settings::SCREEN_WIDTH, Settings::SCREEN_HEIGHT)
$ResizeInitialized = true
end
if factor < 0 || factor == 4
Graphics.fullscreen = true if !Graphics.fullscreen
else
Graphics.fullscreen = false if Graphics.fullscreen
Graphics.scale = (factor + 1) * 0.5
Graphics.center
end
end