当前位置: 首页>>代码示例>>C++>>正文


C++ Sky::hide方法代码示例

本文整理汇总了C++中Sky::hide方法的典型用法代码示例。如果您正苦于以下问题:C++ Sky::hide方法的具体用法?C++ Sky::hide怎么用?C++ Sky::hide使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Sky的用法示例。


在下文中一共展示了Sky::hide方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: hideSky

 void                hideSky()                            { if (m_sky) m_sky->hide();}
开发者ID:pixelr0,项目名称:stk-editor,代码行数:1,代码来源:viewport.hpp

示例2: init


//.........这里部分代码省略.........
    m_h_intensity->setMax(100);
    m_h_intensity->setSmallStep(1);
    m_h_intensity->setLargeStep(10);
    m_h_intensity->setPos(20);

    // edge begin
    IGUIButton* b1 = gui_env->addButton(rect<s32>(105, 100, 135, 130), m_wndw, EDGE_1);
    IGUIButton* b2 = gui_env->addButton(rect<s32>(155, 100, 185, 130), m_wndw, EDGE_2);
    IGUIButton* b3 = gui_env->addButton(rect<s32>(205, 100, 235, 130), m_wndw, EDGE_3);
    b1->setImage(Editor::loadImg("img/edge1.png"));
    b2->setImage(Editor::loadImg("img/edge2.png"));
    b3->setImage(Editor::loadImg("img/edge3.png"));

    gui_env->addStaticText(L"Edge:", rect<s32>(15, 100, 100, 120),
        false, false, m_wndw, -1, false);

    m_active_edge_frame = gui_env->addImage(rect<s32>(200, 95, 240, 135), m_wndw);
    m_active_edge_frame->setImage(Editor::loadImg("img/frame.png"));
    m_active_edge_frame->setUseAlphaChannel(true);
    // edge end

    m_tb1 = gui_env->addButton(rect<s32>(10,  150, 60,  200), m_wndw, M_T1);
    m_tb2 = gui_env->addButton(rect<s32>(70,  150, 120, 200), m_wndw, M_T2);
    m_tb3 = gui_env->addButton(rect<s32>(130, 150, 180, 200), m_wndw, M_T3);
    m_tb4 = gui_env->addButton(rect<s32>(190, 150, 240, 200), m_wndw, M_T4);

    m_tb1->setImage(Editor::loadImg(L"dirt.jpg"));
    m_tb2->setImage(Editor::loadImg(L"grass2.jpg"));
    m_tb3->setImage(Editor::loadImg(L"rock_brown.jpg"));
    m_tb4->setImage(Editor::loadImg(L"sand2.jpg"));

    gui_env->addButton(rect<s32>(10, 205, 60,   220), m_wndw, M_TC1);
    gui_env->addButton(rect<s32>(70, 205, 120,  220), m_wndw, M_TC2);
    gui_env->addButton(rect<s32>(130, 205, 180, 220), m_wndw, M_TC3);
    gui_env->addButton(rect<s32>(190, 205, 240, 220), m_wndw, M_TC4);

    // height modifier begin
    gui_env->addButton(rect<s32>(30, 255, 80, 305), m_wndw,H_BTN)
        ->setImage(Editor::loadImg("img/hm.png"));

    m_h_max_cb = gui_env->addCheckBox(false, rect<s32>(105, 250, 175, 280),
                                      m_wndw, H_MAX_CHECK_BOX, L"Max:");
    m_h_max_value = gui_env->addEditBox(L"", rect<s32>(170, 255, 210, 275),
                                        true, m_wndw, H_MAX_EDIT_BOX);

    m_h_max_value->setText(L"3");

    m_h_min_cb = gui_env->addCheckBox(false, rect<s32>(105, 280, 175, 310), 
                                      m_wndw, H_MIN_CHECK_BOX, L"Min:");
    m_h_min_value = gui_env->addEditBox(L"", rect<s32>(170, 285, 210, 305),
                                        true, m_wndw, H_MIN_EDIT_BOX);
    m_h_min_value->setText(L"-3");
    // height modifier end

    // BRUSH
    gui_env->addButton(rect<s32>(30, 350, 80, 400), m_wndw,T_SOFT_BTN)
        ->setImage(Editor::loadImg("img/sb.png"));

    gui_env->addButton(rect<s32>(95, 350, 145, 400), m_wndw, T_HARD_BTN)
        ->setImage(Editor::loadImg("img/hb.png"));

    gui_env->addButton(rect<s32>(160, 350, 210, 400), m_wndw, T_BRIGHTNESS_BTN)
        ->setImage(Editor::loadImg("img/bb.png"));

    // SKYBOX

    ITexture* up    = Editor::loadImg("summersky_t.jpg");
    ITexture* down  = Editor::loadImg("summersky_b.jpg");
    ITexture* left  = Editor::loadImg("summersky_w.jpg");
    ITexture* right = Editor::loadImg("summersky_e.jpg");
    ITexture* front = Editor::loadImg("summersky_n.jpg");
    ITexture* back  = Editor::loadImg("summersky_s.jpg");

    m_sb1 = gui_env->addButton(rect<s32>(30,  475, 80,  525), m_wndw, S_T1);
    m_sb2 = gui_env->addButton(rect<s32>(95,  475, 145, 525), m_wndw, S_T2);
    m_sb3 = gui_env->addButton(rect<s32>(160, 475, 210, 525), m_wndw, S_T3);
    m_sb4 = gui_env->addButton(rect<s32>(30,  550, 80,  600), m_wndw, S_T4);
    m_sb5 = gui_env->addButton(rect<s32>(95,  550, 145, 600), m_wndw, S_T5);
    m_sb6 = gui_env->addButton(rect<s32>(160, 550, 210, 600), m_wndw, S_T6);
   
    m_sb1->setImage(up);
    m_sb2->setImage(down);
    m_sb3->setImage(left);
    m_sb4->setImage(right);
    m_sb5->setImage(front);
    m_sb6->setImage(back);

    Sky* sky = new Sky(up, down, left, right, front, back);
    sky->hide();
    Viewport::get()->setSky(sky);

    m_tmod.type      = HEIGHT_MOD;
    m_tmod.countdown = -1;
    m_tmod.edge_type = 3;
    m_tmod.max       = false;
    m_tmod.min       = false;
    m_tmod.col_mask  = SColor(255, 0, 0, 0);
    refreshTerrModData();

} // init
开发者ID:pixelr0,项目名称:stk-editor,代码行数:101,代码来源:terr_panel.cpp


注:本文中的Sky::hide方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。