Ecere SDK/eC Forums • View topic - Scaling advices




Ecere SDK/eC Forums

Ecere Developers Community

Scaling advices

General help: new users, installing the Ecere SDK, using the IDE to compile and run applications.

Scaling advices

Postby jonaspm » Mon Jul 08, 2013 1:42 pm

Hello jerome and all Ecere community, i have a question and i have been trying to find something useful in Google, but simply i cannot find anything.

The question is:

Is there any way to correctly scale a game/app (GUI/HUD) proportionally depending on resolution/ screen size?

thanks in advance :D
jonaspm
 
Posts: 49
Joined: Thu Apr 11, 2013 11:04 pm
Location: Mexico

Re: Scaling advices

Postby jerome » Mon Jul 08, 2013 2:28 pm

Hi Jonas,

That's a really good question, and one I want to address since I got my Nexus 10 with a crazy 2560x1600 on a 10" screen.

I've put in a temporary #define HIGH_DPI in the Ecere library source for the time being, which increases the size of the fonts.

Since a lot of Ecere GUI elements will auto-size based on their content or potential content (often text), this will take care of many controls.

A few other things are changed based on that define, e.g.:

define skinMenuHeight = 40;
define statusBarHeight = 30;
#define BUTTON_SIZE 45
#define CAPTION 60
#define NAME_OFFSET 12

Ecere GUI elements also offer anchors ( to all 4 edges, or to the center ) which can be defined relative to the size available in the parent.

Of course all this is not ideal: finer tuning might be desired, and more control should be offer to both the user and application developer. Also auto-detecting screen sizes and the type of device you are using (e.g. phone, tablet or laptop/desktop).

This is something we would like to improve on, so I invite you to contribute ideas and/or code for the Ecere library for better multi-DPI support!

See issue #884

Have you tried Ecere on Android yet? Or did you just buy a Retina laptop? :)

Best regards,

Jerome
jerome
Site Admin
 
Posts: 621
Joined: Sat Jan 16, 2010 11:16 pm

Re: Scaling advices

Postby jonaspm » Thu Jul 11, 2013 1:15 pm

I develop games for PC and Android, but noticed the change when using a window or being fullscreen on PC, also in tablets or phones that got insane resolutions.

I have an Android phone, and i plan on buying an OUYA, but i still have not tried Ecere on it.
jonaspm
 
Posts: 49
Joined: Thu Apr 11, 2013 11:04 pm
Location: Mexico


Return to General Help

Who is online

Users browsing this forum: No registered users and 1 guest

cron