ncurses

    1熱度

    1回答

    我想創建一個窗口,作爲我的整個遊戲的邊界。所以這將是「主要」窗口。我發現最好的方法是創建一個「幽靈」窗口,另一個是真正的窗口,你會使用它,裏面的尺寸略小。 但我仍然不能真正地創造它:繼承人我最好的解決方案呢。 #include <ncurses.h> WINDOW* createWindow(int, int, int, int); WINDOW* createRealWindow(int,

    0熱度

    1回答

    在可以處理調整大小的終端窗口底部打印一行的正確方法是什麼? import curses from curses import wrapper def main(stdscr): inp = 0 y,x = stdscr.getmaxyx() stdscr.clear() stdscr.nodelay(1) while inp != 48 an

    1熱度

    1回答

    在Arch Linux,當我建立的東西,ld抱怨找不到curses庫: /usr/bin/ld: cannot find -lcurses collect2: error: ld returned 1 exit status 但我確實/usr/lib包含curses相關的庫: # ls -lt /usr/lib/libcurse* lrwxrwxrwx 1 root root 13 May

    1熱度

    1回答

    我正在C++中爲參數化字符串(用於指定終端的某些終端功能)實施解析器。那時,我發現這個% encoding傳來的terminfo的man page: %l push strlen(pop) 所以,我的問題是,每當我們推什麼壓入堆棧,它是當這些下列% encodings遇到: %p[1-9] push ith parm %’c’ push char constant c

    -1熱度

    1回答

    我已經在Linux mint中安裝了ncurses庫,但我仍然不能在c中使用getch函數。我正在使用Linux mint 18.2。 這裏是我的程序: #include <stdio.h> #include <curses.h> int main() { char k; printf("how are you"); k = getch(); pri

    0熱度

    1回答

    例如,我有字符串"Colour selected is red"如何僅使「紅色」一詞變成紅色? 這是我用來嘗試和實現這一點。 import curses curses.start_color() curses.init_pair(1, curses.COLOR_RED, curses.COLOR_BLACK) win = curses.newwin(5 + window_height, w

    0熱度

    1回答

    我想學習Ruby,所以我想我會嘗試在同一時間學習它和Curses。我正在創建一個導航菜單,允許用戶選擇將運行系統命令的選項。 我已經到了創建導航菜單的地步,我可以使用箭頭鍵循環選項。 現在我正在嘗試讀取Enter鍵作爲輸入,並在按Enter鍵時運行系統命令。例如: input = menu.getch if input == ENTER 在 position = 3 if posit

    0熱度

    1回答

    我正在Linux中使用ncurses構建遊戲。 我可以將代碼複製/粘貼到Microsoft Visual Studio(正確設置爲PDCurses),並且所有內容都可以正常運行嗎? 謝謝!

    0熱度

    1回答

    我有這樣的代碼跟ncurses的工作: #include <iostream> #include <string> #include <fstream> #include <ncurses.h> #include <cstdlib> //char a='a'; int c=0; bool ex = false; void mva() { std::cout <<

    0熱度

    1回答

    我有以下結構: typedef struct gameState { WINDOW *game; character *player; finalPosition positions[5]; int level, found, timeSpent[3]; } gameState; 我如何能在gameState.game節省ncurses的窗口? 這就是