UnryzeC / UjAPI

Repository dedicated to Unryze Jass API, library that enhances Warcraft 3 with new functionality and natives.

Home Page:https://unryzec.github.io/UjAPI/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The Text of Frame Type "TEXT" does not scale with SetFrameScale

SinisterLuffy opened this issue · comments

The following is example code to easily test this issue:

scope Test initializer Init
      private function Init takes nothing returns nothing
            local framehandle frame = CreateFrameByType("TEXT", "", GetOriginFrame(ORIGIN_FRAME_GAME_UI, 0), "", 0)
            call SetFrameSize(frame, 0, 0)
            call SetFrameAbsolutePoint(frame, FRAMEPOINT_CENTER, 0.4, 0.3)
            call SetFrameScale(frame, 4)
            call SetFrameText(frame, "Hello World!")
      endfunction
endscope

To change TEXT (aka CTextFrame) text size you use SetFrameFont not SetFrameSize, and font sizes are not integers, but reals, so .013 for size 13, etc.

Actually small addition, this will be "fixed" in next version as well, although it's wonky and barely used by the game itself.