mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 04:58:47 +02:00
Begin: WIP consistent Begin/End behavior.
This commit is contained in:
@ -429,8 +429,10 @@ provide similar or better string helpers.
|
||||
### Q: How can I display custom shapes? (using low-level ImDrawList API)
|
||||
|
||||
- You can use the low-level `ImDrawList` api to render shapes within a window.
|
||||
|
||||
```cpp
|
||||
ImGui::Begin("My shapes");
|
||||
if (!ImGui::Begin("My shapes"))
|
||||
return;
|
||||
|
||||
ImDrawList* draw_list = ImGui::GetWindowDrawList();
|
||||
|
||||
|
@ -52,7 +52,8 @@ Result:
|
||||
Code:
|
||||
```cpp
|
||||
// Create a window called "My First Tool", with a menu bar.
|
||||
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
|
||||
if (!ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar))
|
||||
return;
|
||||
if (ImGui::BeginMenuBar())
|
||||
{
|
||||
if (ImGui::BeginMenu("File"))
|
||||
|
Reference in New Issue
Block a user