Article View: comp.sys.amiga.tech
Article #2640Re: Screen Centering Gadget within C
From: Richard Addison
Date: Sun, 10 Dec 1989 00:45
Date: Sun, 10 Dec 1989 00:45
44 lines
2230 bytes
2230 bytes
In article <857@crash.cts.com> uzun@pnet01.cts.com (Roger Uzun) writes:
>How can one read and set the screen centering gadget, the one set in
>preferences, from within a C program. I have a program that needs all
>7 sprites to be visible, and I want to read the screen centering
>gadgets position, reset it to lower right, then reset it upon
>exit/pause.
>-Roger
Better yet:
struct View *View;
struct Screen *Screen;
struct NewScreen NewScreen = { ... };
if (!(Screen = OpenScreen(&NewScreen))
Fini("Could not open custom screen");
View = ViewAddress();
dxoffset = /* Calculate necessary offset from View->DxOffset &
* Screen->ViewPort.DxOffset */;
if (dxoffset > 0)
{
Screen->LeftEdge = dxoffset;
Screen->ViewPort.DxOffset = dxoffset;
MakeScreen(Screen); /* May not be necessary, I'd have to check */
RethinkDisplay();
}
Please do not shift everything over just because you want sprites on
your custom screen. Some of us use 'morerows' screens, and shifting
everything over might mean that some of the 'morerows' screens would
be cut off on the right.
Wish for 1.4 (or what ever version that wishes may be made for):
Make intuition fully utilize LeftEdge in NewScreen & Screen. Also,
add flags to say "center this screen according to preferences" and
"shift this screen enough to handle all sprites."
Oh, yeah: Fix user copper list stuff so that the portion of the
user copper list with CWait()s beyond the bottom of the visible
portion of the screen is ignored! Likewise, sprites should belong
to individual screens, and move with them, instead of belonging
to the view.
Richard Addison
Technical Details
Message-ID:
<21696@usc.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!usc!pollux.usc.edu!addisonReferences:
<857@crash.cts.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!usc!pollux.usc.edu!addison From: addison@pollux.usc.edu (Richard Addison) Newsgroups: comp.sys.amiga.tech Subject: Re: Screen Centering Gadget within C Summary: Better way... Keywords: Screen shifting Message-ID: <21696@usc.edu> Date: 10 Dec 89 00:45:50 GMT References: <857@crash.cts.com> Sender: news@usc.edu Reply-To: addison@pollux.usc.edu (Richard Addison) Organization: University of Southern California, Los Angeles, CA Lines: 44