Giter VIP home page Giter VIP logo

Comments (3)

lhc70000 avatar lhc70000 commented on May 22, 2024 1

是的,我不太打算让配置文件 handle 鼠标操作,冲突的可能性很大(不过说不定可以作为可选的功能)。

from iina.

lhc70000 avatar lhc70000 commented on May 22, 2024

没想到这一点,感谢反馈!


Didn't aware this. Thanks for feedback and it will be fixed later.

from iina.

CocoaBob avatar CocoaBob commented on May 22, 2024

今天才看到这个项目,下载下来第一时间也在研究这个问题😂

不知能否通过 AXIS_UP/DOWN/LEFT/RIGHT 来覆盖上下左右滚动的设置?

但通过研究代码发现,貌似这部分功能没有使用配置文件?

  override func scrollWheel(with event: NSEvent) {
    guard !isInInteractiveMode else { return }
    if event.phase.contains(.began) {
      if event.scrollingDeltaX != 0 {
        scrollDirection = .horizontal
      } else if event.scrollingDeltaY != 0 {
        scrollDirection = .vertical
      }
    } else if event.phase.contains(.ended) {
      scrollDirection = nil
    }
    // handle the value
    let seekFactor = AppData.seekAmountMap[relativeSeekAmount]!
    if scrollDirection == .horizontal {
      playerCore.seek(relativeSecond: seekFactor * Double(event.scrollingDeltaX), option: useExtrackSeek)
    } else if scrollDirection == .vertical {
      let newVolume = playerCore.info.volume - Int(event.scrollingDeltaY)
      playerCore.setVolume(newVolume)
      volumeSlider.integerValue = newVolume
    }
  }

from iina.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.