• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            Cpper
            C/C++高級(jí)工程師 Android高級(jí)軟件工程師 IT集成工程師 音頻工程師 熟悉c,c++,java,c#,py,js,asp等多種語(yǔ)言 程序猿
            先上一個(gè)使用例子
            #include <BGE/All>

            using namespace bge;

            Window
            * createButton(const std::string& name,const String& text)
            {
                Button
            * button = new Button(0,text);
                button
            ->setName(name);
                button
            ->setSize(Vector2f(92,42));
                
            return button;
            }

            int main(int argc, char* argv[])
            {
                FileSystem::instance().initial(argv[
            0]);
                FileSystem::instance().setResourcePackage(
            "data.zip");
                WindowManager::instance().initialize(
            "simkai.ttf",false);

                Device
            * device = Device::create();
                device
            ->initial();
                device
            ->createWindow(640,480,bge::String("BGE Window"));

                Panel
            * panel = new Panel(FloatRect(30,30,192,180),0);
                GridLayout
            * layout = new GridLayout();
                panel
            ->setLayout(layout);
                std::vector
            <float> widths;
                widths.push_back(
            0.0f);
                layout
            ->setColumnWidths(widths);

                std::vector
            <float> heights;
                
            for(int k = 0; k < 3++k)
                    heights.push_back(
            48.0f);
                heights.push_back(
            0.0f);
                layout
            ->setRowHeights(heights);

                GridCellInfo info;
                info.columnIndex_ 
            = 0; info.rowIndex_ = 0; layout->addWindow(createButton("button1",L"按鍵"),info);
                info.columnIndex_ 
            = 1; info.rowIndex_ = 0; layout->addWindow(createButton("button2",L"按鍵"),info);
                info.columnIndex_ 
            = 0; info.rowIndex_ = 1; layout->addWindow(createButton("button3",L"按鍵"),info);
                info.columnIndex_ 
            = 1; info.rowIndex_ = 1; layout->addWindow(createButton("button4",L"按鍵"),info);
                info.columnIndex_ 
            = 0;
                info.rowIndex_ 
            = 2;
                info.horizontalSpan_ 
            = 2;
                Window
            * edit = new EditField(NULL,L"Edit Text");
                edit
            ->setSize(Vector2f(196,36));
                layout
            ->addWindow(edit,info);
                info.columnIndex_ 
            = 0;
                info.rowIndex_ 
            = 3;
                info.horizontalSpan_ 
            = 3;
                layout
            ->arrangeWithin();

                FrameWindow
            * window = new FrameWindow();
                window
            ->enableMovement();
                window
            ->setText(L"BGE窗體");
                window
            ->setClientPanel(panel);

                WindowManager::instance().addWindow(window);

                
            while(device->isRunning())
                {
                    device
            ->preRender();
                    WindowManager::instance().update();
                    device
            ->swapBuffers();
                    device
            ->pollEvents();
                }

                WindowManager::instance().terminate();
                device
            ->closeWindow();
                device
            ->terminate();
                device
            ->deleteLater();
                
            return 0;
            }

            在開(kāi)發(fā)上參考了Qt等軟件,當(dāng)前支持常見(jiàn)控件 支持控件序列化 整體換膚 控件換膚
            上面的代碼顯示的截圖如下:
            http://images2015.cnblogs.com/blog/676118/201601/676118-20160120092402484-466039328.png
            不過(guò)當(dāng)前還有一點(diǎn)小問(wèn)題 修改完了再上代碼
            做這個(gè)不為什么 就是幾年前一直想做個(gè)
            posted on 2016-01-20 09:34 ccsdu2009 閱讀(2053) 評(píng)論(3)  編輯 收藏 引用 所屬分類(lèi): Game引擎
            Comments
            • # re: 新做的一個(gè)基于OPENGL的gui庫(kù) 起名BGE
              天下
              Posted @ 2016-01-20 18:19
              good ,最近也在寫(xiě)DirectUI,后期考慮用SDL 做跨平臺(tái)的UI。
                回復(fù)  更多評(píng)論   
            • # re: 新做的一個(gè)基于OPENGL的gui庫(kù) 起名BGE
              ccsdu2009
              Posted @ 2016-01-21 09:23
              @天下
              那還不如我們一起做
              GUI還是很費(fèi)精力的  回復(fù)  更多評(píng)論   
            • # re: 新做的一個(gè)基于OPENGL的gui庫(kù) 起名BGE
              天下
              Posted @ 2016-01-30 16:56
              @ccsdu2009
              加油,GUI確實(shí)費(fèi)力,期望還要加入腳本語(yǔ)言支持,如LUA。

                回復(fù)  更多評(píng)論   
             
            中文字幕亚洲综合久久2| 99久久综合狠狠综合久久止| 91久久九九无码成人网站| 精品久久久久久国产| 久久99久久成人免费播放| 亚洲精品WWW久久久久久| 一本久久a久久精品vr综合| 99久久精品费精品国产一区二区 | 久久久久久A亚洲欧洲AV冫 | 久久精品国产一区二区三区不卡 | 久久黄色视频| 人妻无码中文久久久久专区| 国产精品伦理久久久久久| 亚洲AV日韩AV永久无码久久| 久久精品国产亚洲AV大全| 久久久久九国产精品| 97久久香蕉国产线看观看| 久久综合久久美利坚合众国| 久久综合九色综合精品| 欧美喷潮久久久XXXXx| 一级女性全黄久久生活片免费 | 青青国产成人久久91网| 精品国产青草久久久久福利| 狠狠色伊人久久精品综合网 | 要久久爱在线免费观看| 国产精品久久久99| 99久久婷婷免费国产综合精品| 亚洲人成无码久久电影网站| 亚洲一区中文字幕久久| 久久久久中文字幕| 色综合合久久天天综合绕视看 | 久久影院亚洲一区| 品成人欧美大片久久国产欧美...| 久久国产热精品波多野结衣AV| 久久人人爽人人人人爽AV| 无码国内精品久久综合88| 国产精品毛片久久久久久久| 噜噜噜色噜噜噜久久| 香蕉久久永久视频| 色老头网站久久网| 亚洲精品乱码久久久久久自慰|