# How to take values from imgui inputs?

**URL:** <https://discourse.julialang.org/t/how-to-take-values-from-imgui-inputs/24938>\
**Category:** General Usage\
**Tags:** package\
**Created:** [June 4, 2019, 10:49pm UTC](https://discourse.julialang.org/t/how-to-take-values-from-imgui-inputs/24938 "2019-06-04T22:49:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wiktorkujawa](https://avatars.discourse-cdn.com/v4/letter/w/bc8723/32.png) [@wiktorkujawa](https://discourse.julialang.org/u/wiktorkujawa)\
**Post date:** [June 4, 2019, 10:49pm UTC](https://discourse.julialang.org/t/how-to-take-values-from-imgui-inputs/24938/1 "2019-06-04T22:49:21Z")

</div>

Hi, I want to use some values from imgui inputs:

```julia
CImGui.Begin("Pop-up menu")
    CImGui.Button("Stacked modals..") && CImGui.OpenPopup("Stacked 1")
        if CImGui.BeginPopupModal("Stacked 1", C_NULL, CImGui.ImGuiWindowFlags_MenuBar)
          @cstatic f0=Cfloat(0.001) d0=Cdouble(999999.00000001) f1=Cfloat(1.e10) begin
            @c CImGui.InputFloat("input float", &f0, 0.01, 1.0, "%.3f")
            @c CImGui.InputDouble("input double", &d0, 0.01, 1.0, "%.8f")
            @c CImGui.InputFloat("input scientific", &f1, 0.0, 0.0, "%e")
          end
          @cstatic vec4a=Cfloat[0.10, 0.20, 0.30, 0.44] CImGui.InputFloat3("input float3", vec4a)

          if CImGui.Button("Show inputted value")
            println(f0)
          end

            CImGui.Button("Close") && CImGui.CloseCurrentPopup()
            CImGui.EndPopup()
        end

```

I coppied some line from demo examples and I want to use values from input. For example, when I click Button I want to get this value to use it in other part of program.

---

<div class="post-metadata">

**Author:** ![wiktorkujawa](https://avatars.discourse-cdn.com/v4/letter/w/bc8723/32.png) [@wiktorkujawa](https://discourse.julialang.org/u/wiktorkujawa)\
**Post date:** [June 5, 2019, 8:13am UTC](https://discourse.julialang.org/t/how-to-take-values-from-imgui-inputs/24938/2 "2019-06-05T08:13:54Z")

</div>

Ok, I got it. If someone look for it:

```julia
@cstatic f0=Cfloat(0.001) d0=Cdouble(999999.00000001) f1=Cfloat(1.e10) begin # names of declared variables 
            @c CImGui.InputFloat("input float", &f0, 0.01, 1.0, "%.3f")
            @c CImGui.InputDouble("input double", &d0, 0.01, 1.0, "%.8f")
            @c CImGui.InputFloat("input scientific", &f1, 0.0, 0.0, "%e")
            CImGui.Button("Button") && (println(f0)) # using with button by using AND(&&) operator
          end

```
