Solarus Forum

Community => General discussion => Topic started by: Dokk on August 04, 2018, 07:22:03 pm

Title: Text position on top...
Post by: Dokk 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?
Title: Re: Text position on top...
Post by: Christopho 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.
Title: Re: Text position on top...
Post by: Dokk 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