Comments (2)
Hello,
This is actually a good idea. I just added this feature.
See f5c6f82 (inside Hello ImGui)
And pthom/imgui_bundle@90298ce (inside ImGui Bundle)
![image](https://private-user-images.githubusercontent.com/7694091/333870683-f53d519e-9803-42bb-abf6-17a31b16d16b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk0MTM0NjEsIm5iZiI6MTcxOTQxMzE2MSwicGF0aCI6Ii83Njk0MDkxLzMzMzg3MDY4My1mNTNkNTE5ZS05ODAzLTQyYmItYWJmNi0xN2EzMWIxNmQxNmIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYyNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MjZUMTQ0NjAxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MmZhYWI1NDEyNWE2MTk3ODNiZDZjN2VlZThhNGUxZjE2YThmMTg5MTI1NmU2MjUzYzI0NDM0YTUxYTkzOTNhNyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.y2APkaie4rJeerk6so3nSUq-smJqIquBgsZPc5I4Pqk)
from hello_imgui.
I modified part of the code from imgui demo.cpp.
Specifically from the 'Style Editor':
static void Push(ImGuiStyle *_style_from) {
// Main
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, _style_from->WindowPadding);
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, _style_from->FramePadding);
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, _style_from->ItemSpacing);
ImGui::PushStyleVar(ImGuiStyleVar_ItemInnerSpacing, _style_from->ItemInnerSpacing);
ImGui::PushStyleVar(ImGuiStyleVar_IndentSpacing, _style_from->IndentSpacing);
ImGui::PushStyleVar(ImGuiStyleVar_ScrollbarSize, _style_from->ScrollbarSize);
ImGui::PushStyleVar(ImGuiStyleVar_GrabMinSize, _style_from->GrabMinSize);
// Borders
ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, _style_from->WindowBorderSize);
ImGui::PushStyleVar(ImGuiStyleVar_ChildBorderSize, _style_from->ChildBorderSize);
ImGui::PushStyleVar(ImGuiStyleVar_PopupBorderSize, _style_from->PopupBorderSize);
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, _style_from->FrameBorderSize);
ImGui::PushStyleVar(ImGuiStyleVar_TabBorderSize, _style_from->TabBorderSize);
ImGui::PushStyleVar(ImGuiStyleVar_TabBarBorderSize, _style_from->TabBarBorderSize);
// Rounding
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, _style_from->WindowRounding);
ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, _style_from->ChildRounding);
ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, _style_from->FrameRounding);
ImGui::PushStyleVar(ImGuiStyleVar_PopupRounding, _style_from->PopupRounding);
ImGui::PushStyleVar(ImGuiStyleVar_ScrollbarRounding, _style_from->ScrollbarRounding);
ImGui::PushStyleVar(ImGuiStyleVar_GrabRounding, _style_from->GrabRounding);
ImGui::PushStyleVar(ImGuiStyleVar_TabRounding, _style_from->TabRounding);
// Tables
ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, _style_from->CellPadding);
ImGui::PushStyleVar(ImGuiStyleVar_TableAngledHeadersAngle,
_style_from->TableAngledHeadersAngle);
// Widgets
ImGui::PushStyleVar(ImGuiStyleVar_WindowTitleAlign, _style_from->WindowTitleAlign);
ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, _style_from->ButtonTextAlign);
ImGui::PushStyleVar(ImGuiStyleVar_SelectableTextAlign, _style_from->SelectableTextAlign);
ImGui::PushStyleVar(ImGuiStyleVar_SeparatorTextBorderSize,
_style_from->SeparatorTextBorderSize);
ImGui::PushStyleVar(ImGuiStyleVar_SeparatorTextAlign, _style_from->SeparatorTextAlign);
ImGui::PushStyleVar(ImGuiStyleVar_SeparatorTextPadding, _style_from->SeparatorTextPadding);
// Rendering
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, _style_from->Alpha);
ImGui::PushStyleVar(ImGuiStyleVar_DisabledAlpha, _style_from->DisabledAlpha);
// Colors
for (int i = 0; i < ImGuiCol_COUNT; i++) {
ImGui::PushStyleColor(i, _style_from->Colors[i]);
}
}
and
void Pop() {
ImGui::PopStyleVar(ImGuiStyleVar_COUNT - 2);
ImGui::PopStyleColor(ImGuiCol_COUNT);
}
Not all variables are set, some are global to the entire application. For example ImGuiStyleVar_TaouchExtraPadding
and ImGuiStyleVar_AntiAliasedLines
or Docking
...
from hello_imgui.
Related Issues (20)
- New back-end default HOT 3
- adding generated files to assets directory? HOT 8
- freetype dependency in Windows HOT 4
- how to add a toolbar (or other fixed windows) that limits the available main docking space? HOT 9
- Is there a way to make input_text to show only the last part of the text while deactivated HOT 2
- offline build HOT 13
- FontAwesome solid vs. regular HOT 4
- Problems with implot from vcpkg HOT 1
- RunnerParams backendType compatibility is broken HOT 1
- text blurry when connected to a non-retina external monitor HOT 4
- Improve HELLOIMGUI_WIN32_NO_CONSOLE implementation HOT 6
- Custom patched ImGui version HOT 3
- Google Closure compiler support is almost perfect except for this one line. HOT 22
- Offline usage: avoid re-downloading glfw and freetype HOT 2
- Unable to add left edge toolbar
- Disable idling on a realtime chart or live image HOT 2
- Note: issues with the label "faq" are solved, but remained opened for better visibility
- GUI does not update contents when resizing application window HOT 20
- Numpad (keypad) inputs not working on the demos
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hello_imgui.