• <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++高級工程師 Android高級軟件工程師 IT集成工程師 音頻工程師 熟悉c,c++,java,c#,py,js,asp等多種語言 程序猿
            先上一個使用例子
            #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;
            }

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

                回復  更多評論   
             
            99久久精品国产一区二区三区 | 亚洲精品高清国产一久久| 人妻丰满AV无码久久不卡 | 久久精品18| 97精品依人久久久大香线蕉97| 久久久久久久女国产乱让韩| 亚洲精品tv久久久久久久久久| 伊人久久大香线蕉亚洲五月天| 亚洲午夜久久久| 日韩久久久久中文字幕人妻| 久久天天躁狠狠躁夜夜网站| 久久精品国产亚洲麻豆| 97精品伊人久久大香线蕉| 亚洲成色999久久网站| 区久久AAA片69亚洲| 国产午夜福利精品久久| 狠狠色丁香久久婷婷综合| 久久精品国产99久久丝袜| 久久久久综合网久久| 日韩AV无码久久一区二区| 久久精品视频一| 尹人香蕉久久99天天拍| 久久综合九色综合久99| 99久久精品午夜一区二区| 国产毛片欧美毛片久久久| 久久成人国产精品一区二区| 久久夜色tv网站| 99999久久久久久亚洲| 久久精品黄AA片一区二区三区| 久久天天躁夜夜躁狠狠躁2022| 久久笫一福利免费导航 | 久久久国产乱子伦精品作者| 日韩精品久久久久久久电影| 久久久久亚洲精品男人的天堂 | 久久久久久综合网天天| 中文国产成人精品久久亚洲精品AⅤ无码精品 | 99久久超碰中文字幕伊人| 久久精品a亚洲国产v高清不卡| 国产精品久久久香蕉| 亚洲AV无码一区东京热久久| 天天躁日日躁狠狠久久|