mirror of
https://github.com/ocornut/imgui.git
synced 2026-09-15 02:12:23 +00:00
Merge branch 'master' into docking
# Conflicts: # imgui.cpp
This commit is contained in:
@@ -46,9 +46,10 @@ Breaking Changes:
|
||||
Before: GetID("Hello###World") == GetID("###World") != GetID("World");
|
||||
Now: GetID("Hello###World") == GetID("###World") == GetID("World");
|
||||
- This has the property of facilitating concatenating and manipulating
|
||||
identifers using "###", and will allow fixing other dangling issues.
|
||||
identifiers using "###", and will allow fixing other dangling issues.
|
||||
- This will invalidate hashes (stored in .ini data) for Tables and Windows
|
||||
that are using the "###" operators. (#713, #1698)
|
||||
- Renamed helper macro IM_ARRAYSIZE() -> IM_COUNTOF(). Kept redirection/legacy name.
|
||||
- Fonts: Fixed handling of `ImFontConfig::FontDataOwnedByAtlas = false` which
|
||||
did erroneously make a copy of the font data, essentially defeating the purpose
|
||||
of this flag and wasting memory (undetected since July 2015 and now spotted
|
||||
@@ -92,7 +93,12 @@ Other Changes:
|
||||
- Added ImGuiSliderFlags_ColorMarkers to opt-in adding R/G/B/A color markers
|
||||
next to each components, in multi-components functions.
|
||||
- Added a way to select a specific marker color.
|
||||
- Text:
|
||||
- Text, InputText:
|
||||
- Reworked word-wrapping logic:
|
||||
- Try to not wrap in the middle of contiguous punctuations. (#8139, #8439, #9094)
|
||||
- Try to not wrap between a punctuation and a digit. (#8503)
|
||||
- Inside InputTextMultiline() with _WordWrap: prefer keeping blanks at the
|
||||
end of a line rather than at the beginning of next line. (#8990, #3237)
|
||||
- Fixed low-level word-wrapping function reading from *text_end when passed
|
||||
a string range. (#9107) [@achabense]
|
||||
- Scrollbar: fixed a codepath leading to a divide-by-zero (which would not be
|
||||
|
||||
@@ -202,7 +202,7 @@ if (ImGui::Button(u8"ロード"))
|
||||
{
|
||||
// do stuff
|
||||
}
|
||||
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
|
||||
ImGui::InputText("string", buf, IM_COUNTOF(buf));
|
||||
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
|
||||
```
|
||||
|
||||
@@ -439,7 +439,7 @@ unsigned char* tex_pixels = nullptr;
|
||||
int tex_width, tex_height;
|
||||
io.Fonts->GetTexDataAsRGBA32(&tex_pixels, &tex_width, &tex_height);
|
||||
|
||||
for (int rect_n = 0; rect_n < IM_ARRAYSIZE(rect_ids); rect_n++)
|
||||
for (int rect_n = 0; rect_n < IM_COUNTOF(rect_ids); rect_n++)
|
||||
if (const ImTextureRect* rect = io.Fonts->GetCustomRect(rect_ids[rect_n]))
|
||||
{
|
||||
// Fill the custom rectangle with red pixels (in reality you would draw/copy your bitmap data here!)
|
||||
|
||||
@@ -52,7 +52,7 @@ After Dear ImGui is set up in your application, you can use it from \_anywhere\_
|
||||
ImGui::Text("Hello, world %d", 123);
|
||||
if (ImGui::Button("Save"))
|
||||
MySaveFunction();
|
||||
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
|
||||
ImGui::InputText("string", buf, IM_COUNTOF(buf));
|
||||
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
|
||||
```
|
||||

|
||||
|
||||
Reference in New Issue
Block a user