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

Limited number of visible items #1

Open
jonniek opened this issue May 7, 2020 · 3 comments
Open

Limited number of visible items #1

jonniek opened this issue May 7, 2020 · 3 comments

Comments

@jonniek
Copy link
Owner

jonniek commented May 7, 2020

Display only some items at a time and keep the curstor visible when scrolling.

This should be as automagic as possible, perhaps see mpv-repl as reference, since it seems to handle font-sizes quite nicely.

@CogentRedTester
Copy link

It would also be nice if we could change the size of the font. Stats.lua has an option for this so it should be possible.

That might be something worth porting to playlistmanager as well.

@dreness
Copy link

dreness commented Jul 13, 2020

It would also be nice if we could change the size of the font. Stats.lua has an option for this so it should be possible.

That might be something worth porting to playlistmanager as well.

Here's an example of changing font size and alignment:

  -- local font_size = mp.get_property("osd-font-size")
  local font_size = 24
  local alignment = 7
  -- use alignment tags instead of absolute positioning
  -- http://docs.aegisub.org/3.2/ASS_Tags/
  -- ass:pos(50, 50)
  local ass = assdraw.ass_new()
  ass:new_event()
  local style = string.format("{\\fs%d\\an%d}", font_size, alignment)
  for index, item in ipairs(menu_items) do
    local selected = index == cursor
    local prefix = selected and "" or ""
    ass:append(style .. prefix .. item.label .. "\\N")
  end

image

@mortyobnoxious
Copy link

Will this be possible or abandoned? I tried but couldn't manage to truncate the menu. Even I looked at the codes from "playlistmanager", but no luck.

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

4 participants