Skip to content

faelcanalha/imgui_animation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ImAnimation

A Simple Animation Extension for ImGui may soon evolve into something significant.

  • Created by faelcanalha

Fade's Animation

#include <imgui/imgui_animation.h>

int main(int, char**) {
  ...
  while (!done) {
     ...
      ImAnimation::Fade([]() {
        ImGui::Text("Hello!");
        // Others Widgets
      });

      ImAnimation::FadeDown([]() { /* Same thing for FadeUp, FadeRight and FadeLeft */
        ImGui::Text("Hello!");
        // Others Widgets
      }, 50.f);

      static bool isEnabled = true; // True appears and False disappears
      ImAnimation::FadeInOut([]() {
        ImGui::Text("Hello!");
        // Others Widgets
      }, isEnabled);
  }
}

Chaning Fade In Out

#include <imgui/imgui_animation.h>

int main(int, char**) {
  ...
  while (!done) {
     ...
      static bool isEnabled = true; // True appears and False disappears
      ImAnimation::FadeInOut([]() {
        ImGui::Text("Hello!");
        // Others Widgets
      }, isEnabled);

      if (ImGui::Button("Show Or Hide")) {
          isEnabled = !isEnabled;
      }
  }
}

About

Simple Animation Extension for ImGui may soon evolve into something significant

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages