CLEO Help help with dialogue

CLEO related

0x73616D

Active member
Joined
Apr 18, 2021
Messages
135
Solutions
1
Reaction score
68
Location
0x73616D
How can I make the dialog appear in the center of the screen regardless of the resolution?
 

Juli4n

Active member
Joined
Mar 31, 2021
Messages
43
Solutions
1
Reaction score
19
Location
Argentina
{

English (bad translation)
1: 0B5A: get_screen_resolution 1@ 2@

2: Divide resolution X and Y in two.

3: Divide the size X and Y of the dialog in two.

4: The result of the last division must be subtracted from the previous division.

5: Set configuration. | 0B84: dialog 0@ set_pos_XY 1@ 2@ size X 100 Y 150

}
{

Español (Idioma tuyo y mio)
1: 0B5A: get_screen_resolution 1@ 2@

2: Divida la resolución X e Y en dos.

3: Divida el tamaño X e Y del diálogo en dos.

4: El resultado de la última división debe restarse en la división anterior.

5: Establecer la configuración. | 0B84: dialog 0@ set_pos_XY 1@ 2@ size X 100 Y 150

}

Example:
C#:
0B80: dialog 31@ = create "Test"
0B5A: get_screen_resolution 1@ 2@ 
0016: 1@ /= 2
0016: 2@ /= 2
000E: 1@ -= 50
000E: 2@ -= 75   
0B84: dialog 31@ set_pos_XY 1@ 2@ size X 100 Y 150
 

0x73616D

Active member
Joined
Apr 18, 2021
Messages
135
Solutions
1
Reaction score
68
Location
0x73616D
{

English (bad translation)
1: 0B5A: get_screen_resolution 1@ 2@

2: Divide resolution X and Y in two.

3: Divide the size X and Y of the dialog in two.

4: The result of the last division must be subtracted from the previous division.

5: Set configuration. | 0B84: dialog 0@ set_pos_XY 1@ 2@ size X 100 Y 150

}
{

Español (Idioma tuyo y mio)
1: 0B5A: get_screen_resolution 1@ 2@

2: Divida la resolución X e Y en dos.

3: Divida el tamaño X e Y del diálogo en dos.

4: El resultado de la última división debe restarse en la división anterior.

5: Establecer la configuración. | 0B84: dialog 0@ set_pos_XY 1@ 2@ size X 100 Y 150

}

Example:
C#:
0B80: dialog 31@ = create "Test"
0B5A: get_screen_resolution 1@ 2@
0016: 1@ /= 2
0016: 2@ /= 2
000E: 1@ -= 50
000E: 2@ -= 75  
0B84: dialog 31@ set_pos_XY 1@ 2@ size X 100 Y 150
thank you, they can block the topic
 
Top