Skip to content
sthairno edited this page May 30, 2020 · 2 revisions

ウィンドウ

作り方

ウィンドウはwindowBegin()windowEnd()で作ることができます。

windowBegin()windowEnd()の間にコントロールを追加することで、ウィンドウ内にコントロールが配置されます。

デフォルトウィンドウ

デフォルトウィンドウは常に最背面にある透明なウィンドウです。

ウィンドウを指定せずにコントロールを追加すると、自動的にデフォルトウィンドウにコントロールが配置されます。

サンプル

ソース

#include <Siv3D.hpp>
#include "SasaGUI.hpp"

void Main()
{
    Scene::SetBackground(Palette::White);
    SasaGUI::GUIManager gui;
    while(System::Update())
    {
        gui.frameBegin();
        
        //デフォルトウィンドウに配置
        gui.label(U"Hoge");
        
        //"window"というタイトルのウィンドウを作成
        gui.windowBegin(U"window");
        //ウィンドウ内に配置
        gui.label(U"Fuga");
        gui.windowEnd();
        
        gui.frameEnd();
    }
}

実行結果

Clone this wiki locally