Git Product home page Git Product logo

Comments (5)

timthedevguy avatar timthedevguy commented on May 30, 2024

Currently there is no work around, this was a skeleton of my work in getting BGHUDStepperCell to work, but ran into some issues subclassing it, namely detecting up/down clicks in the cell.

from bghudappkit.

adib avatar adib commented on May 30, 2024

Thanks

from bghudappkit.

tylerstillwater avatar tylerstillwater commented on May 30, 2024

I think you may need to override these methods:

- (BOOL)trackMouse:(id)fp8 inRect:(struct _NSRect)fp12 ofView:(id)fp28 untilMouseUp:(BOOL)fp32;
- (BOOL)startTrackingAt:(struct _NSPoint)fp8 inView:(id)fp16;
- (BOOL)continueTracking:(struct _NSPoint)fp8 at:(struct _NSPoint)fp16 inView:(id)fp24;
- (void)stopTracking:(struct _NSPoint)fp8 at:(struct _NSPoint)fp16 inView:(id)fp24 mouseIsUp:(BOOL)fp28;

You could use these to track where the mouse started and ended, thus detecting when it is down/out/in/up, etc.

from bghudappkit.

tylerstillwater avatar tylerstillwater commented on May 30, 2024
 -(BOOL)startTrackingAt:(NSPoint)startPoint inView:(NSView *)controlView
{
  NSLog(@"start at: %@",NSStringFromPoint(startPoint));
  return [super startTrackingAt:startPoint inView:controlView];
}
-(BOOL)continueTracking:(NSPoint)lastPoint at:(NSPoint)currentPoint inView:(NSView *)controlView
{
  NSLog(@"continue at:%@ new: %@",NSStringFromPoint(lastPoint),NSStringFromPoint(currentPoint));
  return [super continueTracking:lastPoint at:currentPoint inView:controlView];
}
-(void)stopTracking:(NSPoint)lastPoint at:(NSPoint)stopPoint inView:(NSView *)controlView mouseIsUp:(BOOL)flag
{
  NSLog(@"stop with last: %@, stopPoint: %@",NSStringFromPoint(lastPoint),NSStringFromPoint(stopPoint));
  [super stopTracking:lastPoint at:stopPoint inView:controlView mouseIsUp:flag];
}

These all work. They track properly. It should be trivial to change the image based on the position of the point inside the view. All you should need to do is the drawing. The superclass should handle all the rest for you just fine.

from bghudappkit.

timthedevguy avatar timthedevguy commented on May 30, 2024

Thanks to Sastira BGHUDAppKit now has a working StepperCell!

from bghudappkit.

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.