patrickcjk / imgui-notify Goto Github PK
View Code? Open in Web Editor NEWA (very) simple notification wrapper for Dear ImGui
License: MIT License
A (very) simple notification wrapper for Dear ImGui
License: MIT License
.
Hey @patrickcjk , thanks for sharing this.
I am trying to use it in an openFrameworks project without success...
I am on VS 2017, and OF is bundled with C++ 11/14.
After getting these errors:
Severity Code Description Project File Line Suppression State
Error C7525 inline variables require at least '/std:c++17' (compiling source file src\main.cpp) 1_7_Notify f:\openframeworks\addons\ofxsurfingimgui\1_widgets\1_7_notify\src\imgui_notify.h 220
I "forced" the VS project to C++17. But I am getting OF related errors like:
Severity Code Description Project File Line Suppression State
Error C2757 'filesystem': a symbol with this name already exists and therefore this name cannot be used as a namespace name (compiling source file src\main.cpp) 1_7_Notify c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\fstream 24
Any idea?
https://github.com/moebiussurfing/ofxSurfingImGui/tree/master/1_Widgets/1_7_Notify/src
my lib crash when i port this library to linux, anyway to fix ?
Do you intend to release a version for Linux?
Hello @patrickcjk ,
thanks for that repo, it looks cute.
I have the code almost working in an openFrameworks environment, but I am having problems to "unlock" draw the icons.
On the ImGui add-on for oF,
it's implemented only the AddFontFromFileTTF
method...
not the one you used 'AddFontFromMemoryTTF'.
I tried to make it work, but no success. Fonts look broke as white squares and I am getting exceptions.
Do you have the TTF version for the tahoma font?
Thanks
i.e.
imgui_notify.h:205:83: error: expected expression
ImGuiToast(ImGuiToastType type, const char* format, ...) : ImGuiToast(type) { NOTIFY_FORMAT(this->set_content, format); }
imgui_notify.h:23:120: note: expanded from macro 'NOTIFY_FORMAT'
#define NOTIFY_FORMAT(fn, format, ...) if (format) { va_list args; va_start(args, format); fn(format, args, __VA_ARGS__); va_end(args); }
That's what my clangd 14.0.0 says
Clangd config: -Wno-unused-variable,-Wno-infinite-recursion,-Werror=implicit-function-declaration,-Wshadow,-Wno-shadow-field-in-constructor-modified,-Wno-shadow-ivar,-Wuninitialized,-Wunused-label,-Wunused-lambda-capture, ,--target=aarch64
NOTIFY_INLINE auto set_title(const char* format, ...) -> void { NOTIFY_FORMAT(this->set_title, format); }
NOTIFY_INLINE auto set_content(const char* format, ...) -> void { NOTIFY_FORMAT(this->set_content, format); }
NOTIFY_INLINE auto set_type(const ImGuiToastType& type) -> void { IM_ASSERT(type < ImGuiToastType_COUNT); this->type = type; };
imgui_notify.h:81:66: error: expected expression
this NOTIFY_FORMAT
hello, can be build on macOS too like any RAW ImGui?
line about 260-270
char window_name[50];
sprintf_s(window_name, "##TOAST%d", i);
I'd suggest to replace it with ImFormat cuz not everyone has sprintf_s function
Hey, I followed your instructions and everything works fine except the Icons.
I tried it with different fonts, but instead of an Icon it shows a colored Question mark "?".
The font applys tho as the text changes the font style based on the Font that I use.
I use the following code after the Init:
writefont = io.Fonts->AddFontFromMemoryCompressedTTF(Font_Font_data, Font_Font_size, 16.f);
ImFontConfig font_cfg;
font_cfg.FontDataOwnedByAtlas = false;
io.Fonts->AddFontFromMemoryCompressedTTF(Font_Font_data, Font_Font_size, 16.f, &font_cfg);
ImGui::MergeIconsWithLatestFont(16.f, false);
To use the font I do:
ImGui::PushFont(writefont); //apply font
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 5.f);
ImGui::PushStyleColor(ImGuiCol_WindowBg, ImVec4(43.f / 255.f, 43.f / 255.f, 43.f / 255.f, 255.f / 255.f));
ImGui::RenderNotifications();
ImGui::PopStyleVar(1);
ImGui::PopStyleColor(1);
ImGui::PopFont();
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.