enigma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Enigma-devel] Sidebar: How should this be done?


From: Pipeline
Subject: Re: [Enigma-devel] Sidebar: How should this be done?
Date: Sun, 2 Mar 2008 14:45:32 -0500

Thanks, i got it working... but i had to revert your changes back to default display.cc or else game area would stay left justified. 
 
So with default display.cc :
int screenw = vidinfo->width;
int screenh = NTILESV * vidinfo->tile_size
 
... and hacked resolution in video.cc :
        {
            VM_640x480, 800, 480,            // id, w, h
            32, VTS_32,                      // tilesize, tiletype
            "640x480", "VGA", "4:3",         // name, fsname, fs only
            "models-32.lua", "gfx32/",       // initscript, dir
            Rect (0, 0, 800, 480),           // display area
            0, 0,                            // menu background image offsets
            120, 78, "",                     // thumbnail size/extension
            Rect (80, 0, 640, 416),           // game area
            Rect (80, 416, 640, 64),          // statusbar area
            Rect (90, 425, 117, 43),         // time area
            Rect (180, 425, 30, 43),         // moves area
            Rect (232, 433, 490, 52),        // inventory area
            Rect (230, 434, 475, 35),        // text area
            true, true,                      // available window, fullscreen
            "-0-","-0-"                      // fallback modes window, fullscreen
        },
Both game and status bar area are centered.  Does this mean our changes to support 840x480 will be localized to our port or am i missing something that would be useful in svn?
 
Well whatever the result, that ended up being easier than i thought it would be, and we already have a version that (along with upstream improvements still in store) would make for good 1.10 so feel free to suggest other improvements.  While i prefer the simpler/cleaner ui we have now if you want to test with on screen regions that might be good (especially if i can turn off).  I have no experience with touchscreen coordinates, but i was expecting them not to match up with pixels... perhaps sdl will convert them, but our current use of touchscreen as input device relies only on 'relative' coordinates, hence my patch to disable on first mousedown.
 
----- Original Message -----
From: "Till Harbaum / Lists" <address@hidden>
To: <address@hidden>
Cc: "Pipeline" <address@hidden>
Sent: Sunday, March 02, 2008 12:37 PM
Subject: Re: [Enigma-devel] Sidebar: How should this be done?

Hi,

ok, you conviced me that a first version of this will not add anything to the
game area. I can think about buttons later on ...

But what problems do you have? After fixing GameDisplay::resize_game_area in
display.cc i can move the statusbar and the gamearea whereever i want without
having any artefacts. I haven't run this on maemo yet, but do this directly
in a 800x480 window under stock ubuntu, but i don't expect this to have an
impact on the display.

Till

Am Sonntag 02 März 2008 schrieb Pipeline:
> Hey... thanks for looking into this Till.  I was thinking it would be nicer
> to have the game centered and the status bar either centered or full width.
> I dont even think on screen controls are that important but i'm sure
> someone out there might want them.  If you did want to do them you would
> have to modify the client.cc Client::handle_events to let SDL_MOUSEBUTTON
> pass through and handle 'hits' within your screen regions and depending on
> which region, send commands such as the keybinds do (in on_keydown)
> rotate_inventory(+1), server::Msg_ActivateItem(), etc.  This would
> interweave with code i wrote to disable first mousedown for movement
> purposes so you'd have to allow that first mousedown if in your region.
>
> I really would want the screen centered and would hate to have to code
> separate version for that, but i realize this raises more problems with the
> existing codebase.  Can enigma developers advise on simple, minimalist
> changes to get status bar working centered or at fixed offsets?  I have
> tried modifying video.cc video_modes to change those regions but either im
> not using correct values (they are xorig, yorig, width, height right?)  or
> its the text scrolling issue which doesnt observe them because there are
> display artifacts when this happens.
>
> The benefits of widescreen are enormous in the level browser area, however
> in the game area i am mainly interested in allowing stylus input throughout
> the entire surface area.  The game looks great centered its just status bar
> offsets and repaints keeping it from being perfect.  I intend to look more
> into this soon but since this might affect Tills current ideas perhaps
> someone knowlegeable on this could advise?
>
> Thanks-
> Dave
>
> ----- Original Message -----
> From: "Till Harbaum / Lists" <address@hidden>
> To: <address@hidden>
> Sent: Sunday, March 02, 2008 8:51 AM
> Subject: [Enigma-devel] Sidebar: How should this be done?
>
> > i've made enigma use 800x480 for maemo. The menus etc are working fine
> > and the
> > gamearea and statusbararea are currently 640 pixels wide and left
> > aligned. I've added a sidebararea to the right of this filling the right
> > 160x480 pixels. For now this has a background like the menus have and it
> > has the enigma logo on top.
>
> _______________________________________________
> Enigma-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/enigma-devel


reply via email to

[Prev in Thread] Current Thread [Next in Thread]