Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <curses.h>
- #define FIELD_WIDTH 80
- #define FIELD_HEIGHT 20
- void pomoc()
- {
- int in_menu = TRUE;
- while(in_menu)
- {
- int selected = 0;
- int width, height;
- getmaxyx(stdscr, height, width);
- int x = (width-30)/2;
- int y = ((height-16)/2)-2;
- clear();
- mvaddstr(y-2, (width-strlen("HANGMAN :: Pomoc"))/2, "HANGMAN :: Pomoc");
- y++;
- mvaddstr(y++, x-20, "Hangman je igra rijeci u kojoj je cilj pogoditi zadanu sakrivenu rijec.\n");
- y++;
- mvaddstr(y++, x-20, "Program generise slucajnu rijec uzetu iz fajla i zatim je ispisuje na ekran u skrivenom obliku.\n");
- y++;
- mvaddstr(y++, x-20, "Cilj igre je pogoditi zadanu rijec u sto manje pokusaja!\n");
- y++;
- mvaddstr(y++, x-20, "U suprotnom se generise 'vjesalo' na kojem se iscrtava karikatura covjeka koji u slucaju veceg broja gresaka se objesi.\n");
- y++;
- mvaddstr(y++, x-20, "Igrica ima vremensko ogranicenje po potezu definisano u podesavanjima.\n");
- y++;
- mvaddstr(y++, x-20, "Igrica podrzava sledece modove:\n");
- mvaddstr(y++, x-20, "- Single Player\n");
- mvaddstr(y++, x-20, "- Player vs CPU\n");
- // mvaddstr(y++, x-20, "- LAN Multiplayer\n");
- y++;
- mvaddstr(y++, x-20, "Vise informacija o pojedinim modovima mozete naci u dokumentaciji.\n");
- if( selected == 0)
- attron(A_REVERSE);
- mvaddstr(y+2, x, "<< Glavni meni");
- attroff(A_REVERSE);
- refresh();
- int c=getch();
- if (c == '\n')
- {
- switch(selected)
- {
- case 0:
- in_menu=FALSE;
- break;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement