
-- imgui はフローティング ウィンドウ内でのみ機能するため、最初に作成する必要があります。
child_wnd = float_wnd_create(440, 300, 1, true)
float_wnd_set_title(child_wnd, "imgui Demo")
float_wnd_set_imgui_builder(child_wnd, "child_demo")
float_wnd_set_onclose(child_wnd, "closed_demo")
function child_demo(wnd, x, y)
-- imgui.PushStyleColor(imgui.constant.Col.ChildBg, 0xFF000000) -- Black Background
-- imgui.PushStyleColor(imgui.constant.Col.ChildBg, 0xFFFFFFFF) -- White Background
-- imgui.PushStyleColor(imgui.constant.Col.ChildBg, 0xFF0000FF) -- Red Background
-- imgui.PushStyleColor(imgui.constant.Col.ChildBg, 0xFF00FF00) -- Green Background
-- imgui.PushStyleColor(imgui.constant.Col.ChildBg, 0xFFFF0000) -- Blue Background
-- imgui.PushStyleColor(imgui.constant.Col.ChildBg, 0xFFA8A800) -- Strong Cyan Background
imgui.PushStyleColor(imgui.constant.Col.ChildBg, 0xFFA89300) -- Strong Artic Blue Background
imgui.BeginChild("test", 440, 280)
imgui.PopStyleColor()
if imgui.Button("Button One") then -- 標準サイズのボタン
end
imgui.SameLine()
imgui.SetCursorPosX(150) -- 次のボタンを配置する場所を制御する
if imgui.Button("Button Two", 100, 50) then -- 通常のサイズよりも大きなボタン
end
imgui.SameLine()
imgui.SetCursorPosX(150 * 2)
if imgui.Button("Button Three", 100, 50) then
end
imgui.EndChild()
end
function closed_demo(wnd)
-- Tこの関数は、ユーザーがウィンドウを閉じるときに呼び出されます。
-- ウィンドウが既に破棄されているため、この関数では imgui 関数の描画または呼び出しは許可されない。
end