Making cegui more mobile - oriented.

Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

ShiftZ
Not too shy to talk
Not too shy to talk
Posts: 38
Joined: Tue Aug 18, 2009 17:21

Making cegui more mobile - oriented.

Postby ShiftZ » Tue Sep 01, 2009 20:14

Hi, im keep going with integration of cegui, and i have few requests to make cegui more mobile-oriented. Maybe some of these requests already done, i just dont know, cegui is so huge, its twice or even more larger them whole my project.
First, id like to see a magic option that changes orientation of cegui render "on fly". I think it's all about projection matrix recalculation for screen viewport and element scaling recalibration.
Second, there is no mouse arrow nor mouse buttons (its about devices with touchscreen). There is only one kind of button click - touch, but more then one touch can occur at a time (multitouch). I think it might cause just minor code change.
Third is about list scroll and other type of scrolls. Have you ever used iPhone\iPod device? It has nice UI feature - scroll inertion. When scrolling and you take your finger up, scroll keeps going just like it has mass and inertion.

Well, i think those are simple enough for beginning =)

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Making cegui more mobile - oriented.

Postby CrazyEddie » Wed Sep 02, 2009 09:02

ShiftZ wrote:...cegui is so huge, its twice or even more larger them whole my project.

Hehe. One thing I'd like to work towards (in the longer term, I guess) is the ability to configure the code so it's much more lightweight, whether it's actually possible or not I'm not certain. If somebody had told me six years ago that the library would become what it has I probably would have been too scared to write it!

ShiftZ wrote:First, id like to see a magic option that changes orientation of cegui render "on fly". I think it's all about projection matrix recalculation for screen viewport and element scaling recalibration.

Is the rotation of the VP not automagic on the iPod/iPhone? I thought it was, though aside from building the basic demo app I've not had a chance to look at it properly yet. As for setting the viewport size we have the System::notifyDisplaySizeChange function (that calls back the renderer module), this correctly handles VP resizing, though not rotation if that's required at the app level. I think it should be reasonably possible to add some support for affecting the final projection used for certain things (of course this is already possible on a per-renderer basis - just add whatever functions you need!)

ShiftZ wrote:Second, there is no mouse arrow nor mouse buttons (its about devices with touchscreen). There is only one kind of button click - touch, but more then one touch can occur at a time (multitouch). I think it might cause just minor code change.

Again, here I need to look at more closely at the device SDKs to see the kind of events we have to play with and how best to translate these into something CEGUI can use. There's already discussion about replacing the current injection system with something else, so that would be a good time to consider how to support these devices.

ShiftZ wrote:Third is about list scroll and other type of scrolls. Have you ever used iPhone\iPod device? It has nice UI feature - scroll inertion. When scrolling and you take your finger up, scroll keeps going just like it has mass and inertion.

Yeah it's a cool feature. It should actually be possible to do this now on the app side, whether we actually put such a thing into the core of CEGUI is dependant upon many things. Once again I have to look and see how it all functions and how best to translate it to the CEGUI world.

All of these ideas / requests are good. Though on the whole I want to avoid having a bunch of effects and such like integrated into the library that - design wise - should be put into either the app itself, or perhaps a middle layer; CEGUI is already huge, and avoiding things that should be in another layer is a wise decision IMO. Of course, I'm quite happy to create that 'middle layer' and offer it up here as an optional extra :)

CE

ShiftZ
Not too shy to talk
Not too shy to talk
Posts: 38
Joined: Tue Aug 18, 2009 17:21

Re: Making cegui more mobile - oriented.

Postby ShiftZ » Wed Sep 02, 2009 10:47

Is the rotation of the VP not automagic on the iPod/iPhone?

No actually its not. Its only possible with native gui system. Even with native gui you must read accelerometr and call magic function manually, as far as i know.

Again, here I need to look at more closely at the device SDKs to see the kind of events we have to play with and how best to translate these into something CEGUI can use.

Here is Applle about touch events:
http://developer.apple.com/iphone/libra ... dling.html
Filter out info you actually needed. There is nothing difficult.

Below is exapmle of touch event handling on iphone.
Everything you should know is that
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
equivalent to
void touchesEnded( NSSet* touches, UIEvent* event ) { }
[touch tapCount]; almost equivalent to touch->tapCount();
and [touch locationInView:self]; almost equivalent to touch->locationInView(this);
self = this, View = ui window or surface where touch occur.
NSSet - array

Code: Select all


typedef struct Touches
{
   float LocationXTouchesBegan;    // x and y coordinates where the touch began
   float LocationYTouchesBegan;
   float CountTouchesBegan;      // how many fingers are pressed
   float TapCountTouchesBegan;      // tap with one, two or three fingers or more at once
      
   float LocationXTouchesMoved;   // x and y coordinates where the touch moved
   float LocationYTouchesMoved;
   float CountTouchesMoved;
   float TapCountTouchesMoved;
   
   float LocationXTouchesEnded;   // x and y coordinates where the touch moved
   float LocationYTouchesEnded;
      
   bool TouchesEnd;            // nothing touches the screen anymore
};

Touches TouchScreen;

// User UI View event handling

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
   UITouch* touch = [touches anyObject];
   
   CGPoint    location = [touch locationInView:self];
    TouchScreen.LocationXTouchesBegan = location.x;
    TouchScreen.LocationYTouchesBegan = location.y;
   TouchScreen.CountTouchesBegan = (int) [touches count];
   TouchScreen.TapCountTouchesBegan = [touch tapCount];
   
   TouchScreen.LocationXTouchesMoved = location.x;
    TouchScreen.LocationYTouchesMoved = location.y;
   TouchScreen.CountTouchesMoved = (int) [touches count];
   TouchScreen.TapCountTouchesMoved = [touch tapCount];
   
   TouchScreen.LocationXTouchesEnded = 0.0;
   TouchScreen.LocationYTouchesEnded = 0.0;
   
   TouchScreen.TouchesEnd = false;
}

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
   TouchScreen.TouchesEnd = true;
    TouchScreen.LocationXTouchesBegan = 0.0;
    TouchScreen.LocationYTouchesBegan = 0.0;
   TouchScreen.CountTouchesBegan = (int) 0;
   TouchScreen.TapCountTouchesBegan = 0;
   
    TouchScreen.LocationXTouchesMoved = 0.0;
    TouchScreen.LocationYTouchesMoved =  0.0;
   TouchScreen.CountTouchesMoved = (int) 0;
   TouchScreen.TapCountTouchesMoved = 0;
   
   UITouch* touch = [touches anyObject];
   CGPoint    location = [touch locationInView:self];
   TouchScreen.LocationXTouchesEnded = location.x;
   TouchScreen.LocationYTouchesEnded = location.y;
}

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
   UITouch* touch = [touches anyObject];

   CGPoint    location = [touch locationInView:self];
    TouchScreen.LocationXTouchesMoved = location.x;
    TouchScreen.LocationYTouchesMoved = location.y;
   TouchScreen.CountTouchesMoved = (int) [touches count];
   TouchScreen.TapCountTouchesMoved = [touch tapCount];
   
   TouchScreen.TouchesEnd = false;
}


Those functions called direclty by iPhone SDK, It brings array of "touches" and "event" in three separete functions so you can handle.
Hope it will help to make things clear.
I forgot that there are also things like tap and double tap. Its like click and double click.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Making cegui more mobile - oriented.

Postby CrazyEddie » Wed Sep 02, 2009 18:12

Thanks for the info - very interesting. Looks like I'll have lots to amuse myself with once 0.7.0 is out :)

CE.

Tiresias
Quite a regular
Quite a regular
Posts: 74
Joined: Thu May 22, 2008 10:20

Re: Making cegui more mobile - oriented.

Postby Tiresias » Wed Sep 09, 2009 08:58

sorry to interfer but so who wants to pay to see cegui on mobiles platform (android and iPhone) ?
how can we start officialy those projects and stop talking :D ?

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Making cegui more mobile - oriented.

Postby CrazyEddie » Wed Sep 09, 2009 12:47

Tiresias wrote:how can we start officialy those projects and stop talking :D ?

In order to get this off the ground in an 'official' way, there needs to be a 'critical mass' of interest; such interest can be registered by users participating in these discussions. Once that interest is there, in order for it to become my main 'focus area', any one willing can pass me some "gold pieces" and things will start to progress in a manner directly proportional to the "gold pieces" contributed ;)

Currently, it just seems like a couple of guys :?

CE

Tiresias
Quite a regular
Quite a regular
Posts: 74
Joined: Thu May 22, 2008 10:20

Re: Making cegui more mobile - oriented.

Postby Tiresias » Wed Sep 09, 2009 13:27

i will make donation (to be defined with the entire group) for this project to be started.
(prefer android port than iphone for now)

Tiresias
Quite a regular
Quite a regular
Posts: 74
Joined: Thu May 22, 2008 10:20

Re: Making cegui more mobile - oriented.

Postby Tiresias » Thu Sep 10, 2009 08:31

am i the only one?

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Making cegui more mobile - oriented.

Postby CrazyEddie » Thu Sep 10, 2009 08:51

Trying to get an abundance of people to participate in discussions on here is like mission impossible - I've been trying for six years and counting! :lol: This post will self destruct in 5 seconds...

CE.

zweifel
Just popping in
Just popping in
Posts: 5
Joined: Sun Sep 06, 2009 17:13

Re: Making cegui more mobile - oriented.

Postby zweifel » Sun Sep 13, 2009 02:51

I do believe CEGUI should follow a more lightweight and embedded direction, not only in the part of mobiles, but also video game consoles and handhelds.

DarkAnt
Just popping in
Just popping in
Posts: 1
Joined: Sat Sep 26, 2009 13:38

Re: Making cegui more mobile - oriented.

Postby DarkAnt » Sat Sep 26, 2009 13:45

I'm also interested in using CEGUI for multitouch surfaces.

Code: Select all

critical_mass++;

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Making cegui more mobile - oriented.

Postby CrazyEddie » Sat Sep 26, 2009 15:42

Cool thanks for the votes.

ShiftZ
Not too shy to talk
Not too shy to talk
Posts: 38
Joined: Tue Aug 18, 2009 17:21

Re: Making cegui more mobile - oriented.

Postby ShiftZ » Tue Oct 13, 2009 23:36

Sorry for long absent, my whole project became in danger. Now it has breath again, and im back to my work with cegui.

In order to get this off the ground in an 'official' way, there needs to be a 'critical mass' of interest;


Interest in what? Making cegui running on android? Or these three feature requested above? its quite big difference here. I think these three features may be counted as 'minor feature reaquest', in opposite with porting on Java and running under Android.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Making cegui more mobile - oriented.

Postby CrazyEddie » Wed Oct 14, 2009 09:14

Hi,

Sorry, it was a partial thread-hijack that caused this confusion :oops: The critical-mass thing was pretty much referring to the port yes (though do note that this port is not about a conversion of the whole lib to java - that will never happen in an official capacity).

BTW, I do not necessarily agree that all three requested features are trivial. Trivial to just hack in, yes. Trivial to implement in a way that's consistent with the project as a whole, not so much. I've basically already agreed that these items will go in, but I can give no indication as to when I'll get around to doing it (in this respect the android port does become significant, because it's likely to get done at the same time). For info, the last three weeks I have spent on CEGUI I was supposed to be off dealing with other commitments I have - so it's not a case that these requests have been overlooked, but more a case that 0.7.0 was so full of bugs that I decided to prioritise the issues coming in off of the back of the 0.7.0 release. Once 0.7.1 comes out (some time in the next couple of weeks), I'll not be around here anymore until December - it's at this point that perhaps I'll start looking at these other items.

Hope this clears up any confusion.

CE.

kingIZZZY
Just popping in
Just popping in
Posts: 4
Joined: Sun Oct 18, 2009 07:49

Re: Making cegui more mobile - oriented.

Postby kingIZZZY » Sun Oct 18, 2009 07:50

Googled and landed here, went through the bother of signing up to vote for this.

Code: Select all

critical_mass++;


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 14 guests