Skip to content

Make spacing element on panel bindable #112

@andrew-vos

Description

@andrew-vos

It would be beneficial to have the spacing element on on panel bindable:

  panel_abilities_available_list:
    type: fragment
    content:
      type: panel
      padding: 20
      elements:
        - type: panel
          layout: horizontal
          spacing: ~ui_ingame_abilities_panel_spacing()
          background: ~ui_ingame_abilities_panel_is_hovered() then $theme.resources.control_bg_light else $theme.resources.control_bg
          yoffset: ~ui_ingame_abilities_panel_yoffset()
          elements: @@ ~obj_player_state.available_skills
          template:
            type: ability_definition
          events:
            on_hover_changed:
              - @@ e => ~ui_ingame_abilities_panel_hover_changed(e.hover)

This would allow the following sample logic to be implemented:

Image

  • when I hover on the card deck in the corner I want spacing to change a bit and cards raise up and highlight -- I do already have this logic except for the spacing,
  • when I click on the hovered deck the card would slide to the right making a "hand" -- I thought this potentially be achieved by animating the spacing value e.g. from -130 to 10

Ideally spacing should be possible to animate to implement nice sliding effect

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions