0

I've been searching and asking everywhere, so far to no avail. I've got a game which I'm putting OpenFeint into, and I'm having issues with the scroll views in OpenFeint's dashboard. There's scroll views for Leaderboards and Achievements (and others that aren't currently relevant), and in each of them, it's possible to scroll, but it's as though it never gets any touch ended events. When you let go, the content just stays where it was, even if it's outside the view - it doesn't bounce back. When you touch again, it jumps back instantly, and is scrollable again.

The bigger problem caused by this though, is that you can't normally select anything in the scroll views (I guess they're selected with a touch ended event). I was able to select things with some combination of two fingers and lots of tapping, but practically it doesn't work. And I know it's the fault of my app, because it works fine in the sample app.

Pertinent details: the app uses SDL (a git snapshot from 1.3, which I had to compile myself and can provide any relevant source from), OpenGL, and almost entirely C++. I'm using OpenFeint 2.10 (newest), XCode 4.0.2 (newest), and iOS 4.3.2 (in the simulator; slightly older versions on my actual devices). I think I made it so the game wasn't checking for events while the OF dashboard was up in case that was the problem, but either I failed, or it had no effect.

Here's a screenshot of a stuck scroll view in the simulator:
(source: happyspork.com)

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
crimson_penguin
  • 2,728
  • 1
  • 17
  • 24

2 Answers2

1

Although this tutorial is for integrating Cocos2D with Openfeint, it addresses a similar issue where input to the OpenFeint dashboard gets garbled:

Pay particular attention to the dashboardDidAppear and dashboardDidDisappear methods. You’ll see that we’re momentarily pausing the Cocos2D director and then re-enabling it once the dashboard disappears. This is a critical step cause otherwise it’s possible that input will be inconsistent or even not captured when the dashboard is displayed. But by pausing the director, we’re ensured that all user input is captured by the dashboard.

I do not know if SDL has a similar "pause" function, but calling that in a similar way may address your issue.

Here is the relevant code from that example:

- (void)dashboardDidAppear
   {
    [[Director sharedDirector] pause];
    [[Director sharedDirector] stopAnimation];
   }
- (void)dashboardDidDisappear
   {
    [[Director sharedDirector] resume];
    [[Director sharedDirector] startAnimation];
   }
Zachary Drake
  • 1,356
  • 1
  • 8
  • 12
  • Hmm, well SDL works differently; you make your own event loops with SDL, and it only does anything with events when you ask it to. However, because of how Cocoa works, the entire app is run in an event, and so unless you call the CFRunLoopRunInMode function (SDL does when you ask for events), no other event can be processed. It's kind of confusing. In any case, I don't think this helps, but I appreciate the response. – crimson_penguin Jun 04 '11 at 03:23
  • Ah, well then this kind of solution wouldn't work. If you do solve this problem, please post back here. – Zachary Drake Jun 06 '11 at 19:45
0

In case anyone else has this problem, this link essentially fixed it for me: http://forums.libsdl.org/viewtopic.php?t=5678&sid=99aa9531656e0aa398ce35a7c348fe88

So far it has not fixed the scrolling issue, but it did fix the selecting issue, which is the main one. And perhaps the other one can be fixed with some fiddling.

crimson_penguin
  • 2,728
  • 1
  • 17
  • 24