Skip to content

Release 0.6.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@lukexor lukexor released this 20 Jun 16:53
· 232 commits to main since this release

[0.6.0] - 2022-06-20

Added

  • Added PixState::ui_width and PoixState::ui_height methods which take into
    account remaining screen space with regards to current UI cursor position and
    frame padding.
  • Added configurable scroll_size to the UI theme for the width of rendered
    scrollbars.
  • Added PixState::mouse_dbl_clicked method indicating mouse was double clicked
    last frame.
  • Added PixState::dbl_clicked method indicating mouse was double clicked on
    the previous UI widget drawn.
  • Added PixState::set_column_offset and PixState::reset_column_offset to
    allow controlling the x-offset cursor position when rendering UI elements.
  • Added ThemeBuilder to pix_engine::prelude.
  • Added PixState::focused_window that takes a WindowId to check for focus.
  • Added PixState::audio_size to query the current size of the audio queue
    device.
  • Added Triangle contains Point implementation.
  • Added arrow keyboard navigation to PixState::select_box while focused.

Changed

  • Improved element focus and blur.
  • Increased the relative font size of PixState::monospace.
  • Removed indent of children under PixState::collapsing_header.
  • Fixed UI elements being able to take focus if disabled.
  • Blur focus by clicking outside on UI elements and by pressing escape/enter in
    input fields.
  • Default types and dimensions for Point, Vector, Line, Triangle,
    Quad, Light and LightSource are now defined.
  • Changed how PixState::on_update handles frame rates and no longer sleeps
    when vsync is enabled.
  • Changed vertical scroll direction to be natural.
  • Set default audio buffer size to 4096.
  • Updated audio buffer doucmentation.
  • Changed default audio settings to use device defaults.
  • Swapped lazy_static for once_cell.

Fixed

  • Fixed widgets to properly render the label with the current fill color.
  • Fixed PixState::bullet to be more indented.
  • Fixed PixState::tab size
  • Fixed PixState::select_list padding
  • Fixed PixState::mod_down to correctly return true when multiple modifiers
    are pressed.
  • Fixed off-by-one error in Ellipse::bounding_rect.
  • Fixed target_frame_rate epsilon.
  • Fixed update rate limiting when vsync is disabled and no target_frame_rate
  • set.
  • Fixed PixState::select_box expanding on focus and unexpanding when focus
    is lost.
  • Fixed PixState::font_size affecting Theme font size.

Breaking

  • Changed PixState::tab_bar to take a selected parameter to control the
    initial selected tab and changed the callback to take a generic type instead
    of a usize.
  • PixState::enqueue_audio now returns a PixResult in the event the audio
    device fails, or the max queue size is reached.
  • Removed clearing the screen by default in AppState::on_update, leaving it to
    the application to choose when to clear the screen.
  • Changed PixState::focused to return true whether any active windows have
    focus.
  • Renamed PixState::keymods to PixState::keymod which now returns a single
    &KeyMod value instead of a HashSet<KeyMod> since KeyMod is already a
    set of bitflags.
  • Changed PixState::delta_time and PixState::elapsed to return a Duration
    instead of milliseconds.
  • Changed PixState::avg_frame_rate to return an f32 instead of usize.
  • Changed PixState::stroke_weight to accept a u16 instead of a u8.
  • Removed generic type aliases for all types that now have reasonable defaults.
  • Removed PixState::no_* (e.g. no_stroke, no_fill, etc) methods in favor
    of the main setter method accepting false or None.
  • Added PartialEq to Num trait.
  • Modified Contains and Intersects traits to be more generic and have a
    single contains or intersects method to allow for future implementations
    of other shapes.
  • Added PixState::audio_queued_size and changed PixState::audio_size to
    return the buffer capacity instead of the queued size.
  • Added support for multiple concrete channel types for AudioCallback via
    an associated trait type.
  • Removed vcpkg feature support due to flaky error rates. Windows builds now
    can utilize a build script with static linking. macOS and Linux can
    continue using homebrew or their distros package manager.
  • Changed PixEngineBuilder::scale to only set rendering scale and to not
    affect window size, to mirror PixState::scale. Removed
    WindowBuilder::scale.
  • Renamed all primitive as_bytes and as_array methods to points
    and coords.