|
@@ -285,9 +285,9 @@ void ImGui::ShowTestWindow(bool* p_open)
|
|
{
|
|
{
|
|
if (i > 0) ImGui::SameLine();
|
|
if (i > 0) ImGui::SameLine();
|
|
ImGui::PushID(i);
|
|
ImGui::PushID(i);
|
|
- ImGui::PushStyleColor(ImGuiCol_Button, ImColor::HSV(i/7.0f, 0.6f, 0.6f));
|
|
|
|
- ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImColor::HSV(i/7.0f, 0.7f, 0.7f));
|
|
|
|
- ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImColor::HSV(i/7.0f, 0.8f, 0.8f));
|
|
|
|
|
|
+ ImGui::PushStyleColor(ImGuiCol_Button, (ImVec4)ImColor::HSV(i/7.0f, 0.6f, 0.6f));
|
|
|
|
+ ImGui::PushStyleColor(ImGuiCol_ButtonHovered, (ImVec4)ImColor::HSV(i/7.0f, 0.7f, 0.7f));
|
|
|
|
+ ImGui::PushStyleColor(ImGuiCol_ButtonActive, (ImVec4)ImColor::HSV(i/7.0f, 0.8f, 0.8f));
|
|
ImGui::Button("Click");
|
|
ImGui::Button("Click");
|
|
ImGui::PopStyleColor(3);
|
|
ImGui::PopStyleColor(3);
|
|
ImGui::PopID();
|
|
ImGui::PopID();
|
|
@@ -913,10 +913,10 @@ void ImGui::ShowTestWindow(bool* p_open)
|
|
{
|
|
{
|
|
if (i > 0) ImGui::SameLine();
|
|
if (i > 0) ImGui::SameLine();
|
|
ImGui::PushID(i);
|
|
ImGui::PushID(i);
|
|
- ImGui::PushStyleColor(ImGuiCol_FrameBg, ImColor::HSV(i/7.0f, 0.5f, 0.5f));
|
|
|
|
- ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, ImColor::HSV(i/7.0f, 0.6f, 0.5f));
|
|
|
|
- ImGui::PushStyleColor(ImGuiCol_FrameBgActive, ImColor::HSV(i/7.0f, 0.7f, 0.5f));
|
|
|
|
- ImGui::PushStyleColor(ImGuiCol_SliderGrab, ImColor::HSV(i/7.0f, 0.9f, 0.9f));
|
|
|
|
|
|
+ ImGui::PushStyleColor(ImGuiCol_FrameBg, (ImVec4)ImColor::HSV(i/7.0f, 0.5f, 0.5f));
|
|
|
|
+ ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, (ImVec4)ImColor::HSV(i/7.0f, 0.6f, 0.5f));
|
|
|
|
+ ImGui::PushStyleColor(ImGuiCol_FrameBgActive, (ImVec4)ImColor::HSV(i/7.0f, 0.7f, 0.5f));
|
|
|
|
+ ImGui::PushStyleColor(ImGuiCol_SliderGrab, (ImVec4)ImColor::HSV(i/7.0f, 0.9f, 0.9f));
|
|
ImGui::VSliderFloat("##v", ImVec2(18,160), &values[i], 0.0f, 1.0f, "");
|
|
ImGui::VSliderFloat("##v", ImVec2(18,160), &values[i], 0.0f, 1.0f, "");
|
|
if (ImGui::IsItemActive() || ImGui::IsItemHovered())
|
|
if (ImGui::IsItemActive() || ImGui::IsItemHovered())
|
|
ImGui::SetTooltip("%.3f", values[i]);
|
|
ImGui::SetTooltip("%.3f", values[i]);
|
|
@@ -1271,9 +1271,9 @@ void ImGui::ShowTestWindow(bool* p_open)
|
|
char num_buf[16];
|
|
char num_buf[16];
|
|
const char* label = (!(n%15)) ? "FizzBuzz" : (!(n%3)) ? "Fizz" : (!(n%5)) ? "Buzz" : (sprintf(num_buf, "%d", n), num_buf);
|
|
const char* label = (!(n%15)) ? "FizzBuzz" : (!(n%3)) ? "Fizz" : (!(n%5)) ? "Buzz" : (sprintf(num_buf, "%d", n), num_buf);
|
|
float hue = n*0.05f;
|
|
float hue = n*0.05f;
|
|
- ImGui::PushStyleColor(ImGuiCol_Button, ImColor::HSV(hue, 0.6f, 0.6f));
|
|
|
|
- ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImColor::HSV(hue, 0.7f, 0.7f));
|
|
|
|
- ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImColor::HSV(hue, 0.8f, 0.8f));
|
|
|
|
|
|
+ ImGui::PushStyleColor(ImGuiCol_Button, (ImVec4)ImColor::HSV(hue, 0.6f, 0.6f));
|
|
|
|
+ ImGui::PushStyleColor(ImGuiCol_ButtonHovered, (ImVec4)ImColor::HSV(hue, 0.7f, 0.7f));
|
|
|
|
+ ImGui::PushStyleColor(ImGuiCol_ButtonActive, (ImVec4)ImColor::HSV(hue, 0.8f, 0.8f));
|
|
ImGui::Button(label, ImVec2(40.0f + sinf((float)(line + n)) * 20.0f, 0.0f));
|
|
ImGui::Button(label, ImVec2(40.0f + sinf((float)(line + n)) * 20.0f, 0.0f));
|
|
ImGui::PopStyleColor(3);
|
|
ImGui::PopStyleColor(3);
|
|
ImGui::PopID();
|
|
ImGui::PopID();
|