小编Mar*_*Gil的帖子

如何在monogame中设置固定的窗口大小?

我正在制作一个简单的游戏作为最终项目.它将在窗口中显示一个.bmp框架,我无意在游戏运行时调整窗口大小,所以我想修复窗口的大小.问题是当我运行在visual studio 2012中选择monogame游戏创建的项目时,它以全屏模式启动.我尝试使用此代码修复它:

_graphics.IsFullScreen = false;
_graphics.PreferredBackBufferWidth = 640;
_graphics.PreferredBackBufferHeight = 480;
_graphics.Applychanges();
Run Code Online (Sandbox Code Playgroud)

我把它放在主游戏类的构造函数和初始化函数中,但它什么也没做.我正在使用monogame 3.0.

c# fullscreen monogame windows-8

5
推荐指数
1
解决办法
4678
查看次数

如何在 ncurses 中滚动窗口(标准屏幕除外)?

我看到这个答案正在研究解决我的问题/sf/answers/588498431/,但是,它仅适用于 stdscreen。我实现了这个:

#include <ncurses.h>

int main(void)
{
    int i = 2, height, width;
    WINDOW *new;

    initscr();
    getmaxyx(stdscr, height, width);
    new = newwin(height - 2, width - 2, 1, 1);

    scrollok(new,TRUE);

    while(1)
    {
        mvwprintw(new, i, 2, "%d - lots and lots of lines flowing down the terminal", i);
        ++i;
        wrefresh(new);
    }

    endwin();
    return 0;
}
Run Code Online (Sandbox Code Playgroud)

但它不滚动。怎么了?

c tui ncurses

5
推荐指数
1
解决办法
9467
查看次数

标签 统计

c ×1

c# ×1

fullscreen ×1

monogame ×1

ncurses ×1

tui ×1

windows-8 ×1