mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-12 02:00:58 +01:00
apply C++ syntax color on all blocks of code
parent
41eb0ac99f
commit
db6a38dc74
2
Tips.md
2
Tips.md
@ -3,7 +3,7 @@ https://github.com/ocornut/imgui/issues/270
|
||||
|
||||
An interesting trick that isn't obvious is that you can use Begin() just to put yourself into the context of that window. So here I want to react to the user inputting an address to scroll to, I use BeginChild() again on the child that I've already drawn so I can use SetScrollFromPosY() on it.
|
||||
|
||||
```
|
||||
```cpp
|
||||
ImGui::BeginChild("##scrolling", ImVec2(0, -ImGui::GetItemsLineHeightWithSpacing()));
|
||||
// ...(draw main content)
|
||||
ImGui::EndChild();
|
||||
|
Loading…
Reference in New Issue
Block a user