Gekkio / mooneye-gb

A Game Boy research project and emulator written in Rust
GNU General Public License v3.0
902 stars 56 forks source link

Bump imgui-winit-support from 0.7.0 to 0.7.1 #145

Open dependabot[bot] opened 3 years ago

dependabot[bot] commented 3 years ago

Bumps imgui-winit-support from 0.7.0 to 0.7.1.

Changelog

Sourced from imgui-winit-support's changelog.

Change Log

[Unreleased]

  • BREAKING: Modifies build style methods to allow the provide closure to return a value. The build call will then return Some(value) if the closure is called, and None if it isn't.

  • The most likely breaking changes users will see is that they will need to add semicolons after calling build, because these function no longer return ().

  • BREAKING: Created with_x variants for most functions which previously took multiple parameters where some had default arguments in the C++. This makes calling most functions simpler and more similar to the C++.

  • The most likely breaking changes users will see is button and same_line now take one fewer parameter -- if you were calling button with [0.0, 0.0], simply delete that -- otherwise, call button_with_size. Similarly, for same_line, if you were passing in 0.0. simply delete that parameter. Otherwise, call same_line_with_pos.

  • BREAKING: Removed imgui::legacy which contained the old style of flags. The remaining flags in imgui::legacy have been updated to be consistent with other flags in the project.

    • imgui::legacy::ImGuiDragDropFlags were accidentally not cleared when they were remade in drag_drop.rs in v0.7.0.
    • imgui::legacy::ImGuiInputTextFlags is now imgui::input_widgets::InputTextFlags
    • imgui::legacy::ImGuiTreeNodeFlags is now imgui::widget::tree::TreeNodeFlags
    • imgui::legacy::ImDrawListFlags is now imgui::draw_list::DrawListFlags
  • DrawListMut has new methods to draw images

    • The methods are add_image, add_image_quad, and add_image_rounded. The imgui-examples/examples/custom_textures.rs has been updated to show their usage.
    • Additionally the imgui::draw_list module is now public, which contains the various draw list objects. While the add_* methods are preferred, imgui::draw_list::Circle::new(&draw_list_mut, ...).build() is equivalent
  • BREAKING: Most tokens through the repository (eg. WindowToken, TabBarToken, FontStackToken, etc) now allow for permissive dropping -- i.e, you don't need to actually call the .end() method on them anymore. In exchange, these tokens have taken on a lifetime, which allows them to be safe. This could make some patterns impossible. Please file an issue if this causes a problem.

  • end() no longer takes Ui. This is a breaking change, but hopefully should be trivial (and perhaps nice) for users to fix. Simply delete the argument, or add a _ before the token's binding name and allow it to be dropped on its own.

  • BREAKING: PopupModal's new was reworked so that it didn't take Ui until build was called. This is a breaking change if you were invoking it directly. Simply move your ui call to build or begin.

  • Upgrade to from v1.80 to Dear ImGui v1.82 (see also the Dear ImGui v1.81 release notes)

    • BREAKING: imgui::ListBox::calculate_size(items_count: ..., height_in_items: ...) has been removed as the function backing it has been marked as obsolete. The recommended approach is to calculate the size yourself and use .size(...) (or use the default auto-calculated size)
    • BREAKING: draw_list::CornerFlags has been renamed to draw_list::DrawFlags to match the upstream change, and refle. However, the only draw flags that are useful to Rust currently are still the ones reflecting corner rounding.
      • Similarly, the flag names have been updated so that CornerFlags::$WHERE has become DrawFlags::ROUND_CORNERS_$WHERE, for ecample CornerFlags::TOP_LEFT => DrawFlags::ROUND_CORNERS_TOP_LEFT.
      • Importantly, CornerFlags::NONE became DrawFlags::ROUND_CORNERS_NONE (following the patter) and not DrawFlags::NONE which does exist now, and is a separate value.
    • BREAKING: InputTextFlags::ALWAYS_INSERT_MODE is renamed to `InputTextFlags::
      • However, the always_insert_mode funcitons on the various input builders remain as a (non-deprecated) alias, as the C++ code has kept an equivalent inline stub.
    • BREAKING: Style::circle_segment_max_error is no more. Style::circle_tesselation_max_error behaves very similarly, but circle_segment_max_error values are not equivalent to circle_tesselation_max_error values.
      • For example, the default circle_segment_max_error was 1.6, but the default circle_tesselation_max_error is 0.3. In practice, it's unlikely to matter much either way, though.
  • Restored methods to access keyboard based on backend-defined keyboard map indexes. These allow access to most keys, not just those defined in the small subset of imgui::Keys (note the available keys may be expanded in future by [imgui PR #2625](ocornut/imgui#2625))

    • The new methods on imgui::Ui are is_key_index_down, is_key_index_pressed, is_key_index_pressed_no_repeat, is_key_index_released, is_key_index_released
    • For example ui.is_key_released(imgui::Key::A) is same as ui.is_key_index_released(winit::events::VirtualKeyCode::A as i32) when using the winit backend
  • Full (32-bit) unicode support is enabled in Dear Imgui (e.g. -DIMGUI_USE_WCHAR32 is enabled now). Previously UTF-16 was used internally.

    • BREAKING: Some parts of the font atlas code now use char (or u32) instead of u16 to reflect this.
      • Note: u32 is used over char in some situations, such as when surrogates are allowed
    • BREAKING (sorta): Dear Imgui now will use 32 bits for character data internally. This impacts the ABI, including sizes of structs and such, and can break some low level or advanced use cases:
      • If you're linking against extensions or plugins to Dear Imgui not written in Rust, you need to ensure it is built using -DIMGUI_USE_WCHAR32.
        • However, if the DEP_IMGUI_DEFINE_ vars are used properly, this is non-breaking.
      • If you're using features="wasm" to "link" against emscripten-compiled Dear Imgui, you need to ensure you use -DIMGUI_USE_WCHAR32 when compile the C and C++ code.
        • If you're using DEP_IMGUI_DEFINE_s for this already, then no change is needed.
      • If you're using .cargo/config to apply a build script override and link against a prebuilt Dear Imgui (or something else along these lines), you need to ensure you link with a version that was built using -DIMGUI_USE_WCHAR32.
Commits
  • 9bfbb84 imgui-winit-support release 0.7.1
  • 79f9345 Add support & upgrade to winit 0.25 (#485)
  • a78fb45 Fix use of not-quite-stabilized API, and explain what the line did anyway
  • b489bb2 Changelog for wchar32 use (surprisingly subtle)
  • b739b93 Update non-sys code to handle 32-bit characters
  • 083139e Enable -DIMGUI_USE_WCHAR32 for imgui-sys
  • 9c40b30 Add 'magic' submodule wrangling
  • 830022f Merge pull request #471 from imgui-rs/dear-update-182
  • 618a3f3 Changelog
  • cb918fc Update Dear Imgui to v1.82
  • Additional commits viewable in compare view


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)