Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add overlay description struct and use it in unified way for both the initial overlay and dynamic overlay changes #5

Conversation

varsill
Copy link
Contributor

@varsill varsill commented Jul 24, 2024

No description provided.

Comment on lines +33 to +42
initial_overlay = options.initial_overlay
opts_y = initial_overlay |> Map.take([:x, :y, :blend_mode]) |> Enum.to_list()

uv_x =
if is_integer(initial_overlay.x), do: div(initial_overlay.x, 2), else: initial_overlay.x

uv_y =
if is_integer(initial_overlay.y), do: div(initial_overlay.y, 2), else: initial_overlay.y

opts_uv = [x: uv_x, y: uv_y, blend_mode: initial_overlay.blend_mode]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just take out this logic into a separate function, because it's repeated here and in handle_parent_notification

@WojciechBarczynski WojciechBarczynski merged commit 9fb5d91 into @WojciechBarczynski/add_dynamical_overlay_update Jul 24, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants