skymp icon indicating copy to clipboard operation
skymp copied to clipboard

feat(skyrim-platform): extend texts API

Open VitaliyMubarakov opened this issue 2 years ago โ€ข 4 comments

Add some new stuff

Setters

  • skyrimPlatform.setTextSize(textId: number, size: float) - set text (not font) size.

  • skyrimPlatform.setTextRotation(textId, rotation: float) - set text rotation.

  • skyrimPlatform.setTextFont(textId, path: string) - set text font from relative path "Data/Platform/Fonts/Tavern.spritefont".

  • skyrimPlatform.setTextDepth(textId, depth: int) - set text z-index of the text.

  • skyrimPlatform.setTextEffect(textId, effect: int) - set sprite effect [None = 0, FlipHorizontally = 1, FlipVertically = 2]

  • skyrimPlatform.setTextOrigin(textId, origin [x,y]) - set text pivot (center point).

Getters

  • skyrimPlatform.getTextSize(textId) - returns the size of the text

  • skyrimPlatform.getTextRotation(textId) - returns the rotation of the text

  • skyrimPlatform.getTextFont(textId) - returns the path to the font

  • skyrimPlatform.getTextDepth(textId) - returns z-index of the text

  • skyrimPlatform.getTextEffect(textId) - returns effect enum.

  • skyrimPlatform.getTextOrigin(textId) - returns pivot (center point) of the text

VitaliyMubarakov avatar Apr 19 '22 16:04 VitaliyMubarakov

image

VitaliyMubarakov avatar Apr 19 '22 16:04 VitaliyMubarakov

super ficha srazy v prod ๐Ÿ˜Šโค๏ธ๐Ÿ˜๐Ÿ‘๐Ÿ˜โœŒ๏ธ๐Ÿคž๐Ÿ˜Š๐Ÿ˜‰๐ŸŽถ๐Ÿ˜Ž๐Ÿ˜‰๐Ÿ˜‰๐Ÿ˜Ž

Korisss avatar Apr 19 '22 16:04 Korisss

ะšั€ะฐัะฐะฒะฐ! ะ—ะฐะบะพะฝั‡ะธะป ะฝะฐั‡ะฐั‚ะพะต!

cat0rama avatar Apr 20 '22 17:04 cat0rama

@SupAidmi Please manage this PR to go forward (assign a reviewer, etc)

Pospelove avatar Apr 20 '22 22:04 Pospelove

Also there're problems with pass parameter via copy in original code. Would be nice if someone will fix that.

Wedmer avatar Jan 04 '23 13:01 Wedmer

closing due to inactivity. please let us know if you'll be available to get back to this

Pospelove avatar Mar 02 '23 12:03 Pospelove