17 Commits

Author SHA1 Message Date
Robin Quint
e51af80da7 upgraded imgui to 1.89.1, changed winit-support to use new event io 2022-12-21 15:14:31 +01:00
dbr
291b7a5b47 Misc fixes
Mainly changes from newer bindgen
2021-10-27 21:06:46 +11:00
Jack Mac
5261ea7d82 added style color name variants 2021-10-13 12:52:45 -04:00
Jack Mac
1d15196b5e removed the lifetime from the majority of the library 2021-10-01 11:36:22 -04:00
Jack Mac
191a346545 init significant changes 2021-10-01 11:28:36 -04:00
Jack Mac
83b6dc8d5f slightly borked the rebase 2021-09-30 18:58:38 -04:00
Jack Mac
8b22856090 OKAY and this is mostly done 2021-09-30 18:58:38 -04:00
Lukasz Wiklendt
9cee827d23 Update Ui Style accessor function doc safety 2021-09-22 08:54:02 +09:30
Lukasz Wiklendt
a0a04cdb91 Update Ui Style accessor function doc 2021-09-21 12:29:02 +09:30
Lukasz Wiklendt
cb3d9c3609 Swap multiple Style accessor functions from Ui for a single unsafe Style accessor 2021-09-21 12:01:16 +09:30
Lukasz Wiklendt
b86e54ffe9 Add Style accessor functions to Ui 2021-09-17 15:45:32 +09:30
dbr
6007bc5a4b Update imgui to 1.84.2 #512
Changes required:
- Overloaded methods named slightly differently (e.g sys::igPlotHistogramFloatPtr to sys::igPlotHistogram_FloatPtr)
- ImGuiNavInput_KeyMenu_ was removed upstream, so NavInput::INTERNAL_COUNT needed tweaked
2021-09-14 11:17:55 +10:00
Thom Chiovoloni
5e7c596671 Shush, clippy 2021-06-24 02:21:38 -07:00
toyboot4e
9b90f0e9d0 Add doc aliases 2021-03-05 14:00:06 +09:00
Jonathan Spira
8c328001d0 Added ext function variants to the majority of overloaded functions in ImGui 2021-03-04 10:58:30 -08:00
Thom Chiovoloni
4f1cde06f2 ImColor changes and improvements:
- Renamed to `ImColor32` to avoid confusion with `ImColor` from the C++.
  code: https://github.com/ocornut/imgui/blob/9499afdf/imgui.h#L2180
    - Eventually I'd probably like to add something mirroring the actual
      `ImColor`.

- Now supports construction and access from `const fn` where possible.
    - Still impossible for the `f32` APIs

- Now supports `.r`/`.g`/`.b`/.a` field access (read and write), by way
  of a new type `imgui::color::ImColor32Fields`, which essentially
  exists just to serve this purpose. This is a bit cludgey, but lets us
  provide the ability for reading and writing `r/g/b/a` values without
  adding many `fn get_r(self) -> u8` and `fn set_r(&mut self, r: u8);`
  style functions.

- No longer requires FFI calls to construct from RGB floats.
    - This gives much more freedom to the optimizer, as external calls
      are impenetrable optimization barriers (It has to pessimistially
      assume that they read/write to all globally accessable memory, and
      must be called in the exact order that is listed).
    - Also, it allows inlining these calls, and avoid computing the same
      value twice (if the args are the same).

    - Also improves usage from IDEs, debuggers, etc, and avoids a rare
      possibility of UB if NaN was passed in (however, this almost
      certainly could only cause problems if cross-lang LTO was used,
      which I believe we don't support).

    - This code is more complex than needed, but was taken from another
      project of mine (functions were renamed to line up with imgui's
      names), and has good (literally exhaustive) test coverage.

    - Unfortunately, float arithmetic in const fn is still not allowed,
      so for now these aren't usable `const fn`.

- Added utility constants to mirror the `IM_COL32_WHITE`,
  `IM_COL32_BLACK`, `IM_COL32_BLACK_TRANS` constants.
2021-02-01 01:45:39 -08:00
Thom Chiovoloni
0df089ab29 Move to virtual workspace 2020-12-06 09:32:21 -08:00