Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Contributor
ThomasRiisbjerg
Posts: 8
Registered: ‎06-08-2011
My Device: Playbook & Dev Alpha B
My Carrier: 3

Scoreloop Default UI vs. SC_RUN_LOOP_TYPE_CUSTOM

Hi. I'd like to pop up the default scoreloop ui in my game, but as far as I can tell, the only way to update the default ui is to call SCUI_Client_HandleEvent(SCUI_Client_h self, bps_event_t *event).  My game uses SDL so I don't easily have access to the bps events. Any suggestions?

 

Cheers,

Thomas

Please use plain text.
Developer
lewellyn
Posts: 110
Registered: ‎10-22-2011
My Device: PlayBook, Bold 9650, Dev Alpha A
My Carrier: Sprint

Re: Scoreloop Default UI vs. SC_RUN_LOOP_TYPE_CUSTOM

Why don't you have access to BPS via an SDL app? They are not mutually-exclusive. (Many things you will want to integrate with will be using BPS...)



Is there a helpful or useful post in this thread? Click the thumbs up on it so that other people can find it more easily!
Like this post too! :smileyvery-happy:
Please use plain text.
New Contributor
ThomasRiisbjerg
Posts: 8
Registered: ‎06-08-2011
My Device: Playbook & Dev Alpha B
My Carrier: 3

Re: Scoreloop Default UI vs. SC_RUN_LOOP_TYPE_CUSTOM

How would you go about extracting the bps event from SDL? Here's the SDL code for processing bps events:

 

bps_event_t *event;
bps_get_event(&event, 0);
while (event)
{
	int domain = bps_event_get_domain(event);
	if (domain == navigator_get_domain()) {
		handleNavigatorEvent(this, event);
	}
	else if (domain == screen_get_domain()) {
		handleScreenEvent(this, event);
	}
	bps_get_event(&event, 0);
}

 

It basically iterates through bps events and selectively posts SDL events if necessary. I could modify the SDL implementation itself, but I'd prefer to handle the scoreloop ui events entirely in my own app code if possible.

 

Thomas

Please use plain text.