Skip to content

A Cool bar for Dear ImGui (MacOs Dock Magnification Effect Like)

License

Notifications You must be signed in to change notification settings

aiekick/ImCoolBar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9d4c042 · Jun 3, 2024

History

21 Commits
Jun 3, 2024
Jun 3, 2024
Jun 3, 2024
Jun 26, 2023
Jun 3, 2024

Repository files navigation

Win Linux Osx

ImCoolbar

Minimal Sample

	auto coolbar_button     = [](const char* label) -> bool {
		float w         = ImGui::GetCoolBarItemWidth();
		auto font_ptr   = ImGui::GetIO().Fonts->Fonts[0];
		font_ptr->Scale = ImGui::GetCoolBarItemScale();
		ImGui::PushFont(font_ptr);
		bool res = ImGui::Button(label, ImVec2(w, w));
		ImGui::PopFont();
		return res;
	};
		
	if (ImGui::BeginCoolBar("##CoolBarMain", ImCoolBar_Horizontal, ImVec2(0.5f, 1.0f))) {
		if (ImGui::CoolBarItem()) {
			if (coolbar_button("A")) {
			
			}
		}
		if (ImGui::CoolBarItem()) {
			if (coolbar_button("B")) {
			
			}
		}
		if (ImGui::CoolBarItem()) {
			if (coolbar_button("C")) {
			
			}
		}
		if (ImGui::CoolBarItem()) {
			if (coolbar_button("D")) {
			
			}
		}
		if (ImGui::CoolBarItem()) {
			if (coolbar_button("E")) {
			
			}
		}
		if (ImGui::CoolBarItem()) {
			if (coolbar_button("F")) {
			
			}
		}
		if (ImGui::CoolBarItem()) {
			if (coolbar_button("G")) {
			
			}
		}
		if (ImGui::CoolBarItem()) {
			if (coolbar_button("H")) {
			
			}
		}
		if (ImGui::CoolBarItem()) {
			if (coolbar_button("I")) {
			
			}
		}
		if (ImGui::CoolBarItem()) {
			if (coolbar_button("J")) {
			
			}
		}
		if (ImGui::CoolBarItem()) {
			if (coolbar_button("K")) {
			
			}
		}
		if (ImGui::CoolBarItem()) {
			if (coolbar_button("L")) {
			
			}
		}
		if (ImGui::CoolBarItem()) {
			if (coolbar_button("M")) {
			
			}
		}
		ImGui::EndCoolBar();
	}

Result :

alt text

Demo App

alt text

About

A Cool bar for Dear ImGui (MacOs Dock Magnification Effect Like)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published