Package imgui

Class ImGuiKeyData


public final class ImGuiKeyData extends ImGuiStructDestroyable
[Internal] Storage used by IsKeyDown(), IsKeyPressed() etc functions. If prior to 1.87 you used io.KeysDownDuration[] (which was marked as internal), you should use GetKeyData(key).DownDuration and not io.KeysData[key].DownDuration.
  • Constructor Details

    • ImGuiKeyData

      public ImGuiKeyData()
    • ImGuiKeyData

      public ImGuiKeyData(long ptr)
  • Method Details

    • create

      protected long create()
      Specified by:
      create in class ImGuiStructDestroyable
    • getDown

      public boolean getDown()
      True for if key is down
    • setDown

      public void setDown(boolean value)
      True for if key is down
    • getDownDuration

      public float getDownDuration()
      Duration the key has been down (<0.0f: not pressed, 0.0f: just pressed, >0.0f: time held)
    • setDownDuration

      public void setDownDuration(float value)
      Duration the key has been down (<0.0f: not pressed, 0.0f: just pressed, >0.0f: time held)
    • getDownDurationPrev

      public float getDownDurationPrev()
      Last frame duration the key has been down
    • setDownDurationPrev

      public void setDownDurationPrev(float value)
      Last frame duration the key has been down
    • getAnalogValue

      public float getAnalogValue()
      0.0f..1.0f for gamepad values
    • setAnalogValue

      public void setAnalogValue(float value)
      0.0f..1.0f for gamepad values