Author Topic: Text position on top...  (Read 487 times)

Dokk

  • Newbie
  • *
  • Posts: 7
  • Game developer & musician
    • View Profile
Text position on top...
« on: August 04, 2018, 07:22:03 pm »
Hello. I have a problem with some specific text position. I made a map titles (kinda "Level 1: The Beginning") as a dialogs. And I want to start this map name then game is starting on the top of the screen for 2-3 seconds.

Code: ( lua) [Select]
function map:on_started()

--Starting a map title
game:start_dialog("level.1")

 I tried to change the position directly in alttp_dialog_box and surely all my dialogs became to the top ;D

So, how to change the text position only for some specific text as mine?
I'm making first russian quest on SE

Christopho

  • Administrator
  • Hero Member
  • *****
  • Posts: 1172
    • View Profile
Re: Text position on top...
« Reply #1 on: August 04, 2018, 08:06:27 pm »
The dialog box script explains how to do that:
Code: (lua) [Select]
-- - dialog_box:set_position(position):
--   Sets the vertical position of the dialog box for subsequent dialogs.
--   position must be one of:
--   - "auto": Choose automatically so that the hero is not hidden.
--   - "top": Top of the screen.
--   - "bottom" (default): Bottom of the screen.
--   - a table with x and y integer fields.

Dokk

  • Newbie
  • *
  • Posts: 7
  • Game developer & musician
    • View Profile
Re: Text position on top...
« Reply #2 on: August 05, 2018, 12:20:43 pm »
In a grow of work, I didn't read comments for script. Shame on me! Thank you , Christopho. My progress is saved  ;D
I'm making first russian quest on SE