Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

RenJS

HTML5 Visual Novel creation made easy and free · By lunafromthemoon

How to position of the name in Name Box but we do not want to change name box position.

A topic by Lapinay created Apr 06, 2019 Views: 232 Replies: 2
Viewing posts 1 to 3

Hi lunafromthemoon and everyone.

I would like to position the name in the name box independently from the name box itself.

in GUI.yaml it would be something like the text positioning parameters for the namebox (textPosition) or something more relevant, i don't know. I don't find a solution, can you help, please :) You can see my issue in my image attached :

Developer (1 edit)

Hello Alix, the parameter you need is called textBounds, with properties x, y, w and h. This let's the namebox know where to center the names. Example:

  name:
    position:

     x: 36

      y: -40
    textBounds:
      x: 0
      y: 20
      w: 50
      h: 20
    textStyle:
      font: 20pt audimat-mono
      boundsAlignH: center
      boundsAlignV: middle

This means your name box will be located in position (36,-40) respecting the message box, and the name will be displayed in a box positioned in (0,20) respecting the name box, with width 50 and height 20.

When the parameter textBounds is missing, the text bounds are taken from the image itself, and that's why is looking wrong in your case.

Hope this solves your issue!

Thank you ! It works pretty fine !