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

Can't get my head around dx #25

Open
TonAtLacework opened this issue Oct 15, 2021 · 4 comments
Open

Can't get my head around dx #25

TonAtLacework opened this issue Oct 15, 2021 · 4 comments

Comments

@TonAtLacework
Copy link

So dx seems to be simple:

  • 0 (default) Sprites scroll from left to right
  • 1 Sprites scroll from right to left

So why is my text scrolling from left to right and back from right to left no matter what i set the parameter to?

  eventdescription:
      type: DynamicFancyText
      #label: 'Description '
      data_label: event_description
      label_color: red
      value_color: white
      font_name: 5x7.bdf
      dx: 1
      ticks_per_movement: 5
@partofthething
Copy link
Owner

Oof yeah sorry about that. There's an undocumented option that defaults to true that you have to add to turn off the 'flipping':

try adding can_flip: false

  eventdescription:
      type: DynamicFancyText
      #label: 'Description '
      data_label: event_description
      label_color: red
      value_color: white
      font_name: 5x7.bdf
      dx: 1
      ticks_per_movement: 5
      can_flip: false

@TonAtLacework
Copy link
Author

TonAtLacework commented Oct 15, 2021

Ah, i love undocumented features. Now the issue i am having is when i make dx 0 or when i comment it out, i don't get my eventdescription sprite.
Setting it to -1 provides the behavior i am looking for.
Bug?

@partofthething
Copy link
Owner

Yeah I need to do a doc update for sure.

dx is supposed to mean "change in x per tick" so 0 would mean motionless (you'd have to set x and y to something more than 0 sometimes to see the sprite. -1 means it moves but in the opposite direction.

@TonAtLacework
Copy link
Author

TonAtLacework commented Oct 17, 2021 via email

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

No branches or pull requests

2 participants