Skocz do zawartości

Rekomendowane odpowiedzi

Opublikowano

Witam!

Mam problem... nie wiem jak zrobic reakcje na guzik w komunikacie. Mam np taki kod:

 

 

if(keyboard_check_pressed(ord('Z')))

{show_message_ext("Tresc komunikatu","tak","nie","chyba");}

 

Jakiego kodu mam uzyc zeby np po nacisnieciu jednego z guzikow byla jakas reakcja (po nacisnieciu kazdego z nich inna oczywiscie :P)

Mam wersje 6.1... Jaki kod za to odpowiada?

Z gory dziekuje

Opublikowano
show_message_ext(str,but1,but2,but3) Displays a dialog box with the string as a message and up to three buttons. But1, but2 and but3 contain the button text. An empty string means that the button is not shown. In the texts you can use the & symbol to indicate that the next character should be used as the keyboard shortcut for this button. The function returns the number of the button pressed (0 if the user presses the Esc key).
Czyli:

if(keyboard_check_pressed(ord('Z')))
{
var n;
n=show_message_ext("Tresc komunikatu","tak","nie","chyba");

if n=1
{
//przycisk 1
}
else
if n=2
{
//przycisk 2
}
else
if n=3
{
//przycisk 3
}
else
if n=0
{
//jesli nic
}
}

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.

Zarejestruj nowe konto

Załóż nowe konto. To bardzo proste!

Zarejestruj się

Zaloguj się

Posiadasz już konto? Zaloguj się poniżej.

Zaloguj się
  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...