Welcome, Guest. Please login or register.

Author Topic: window size  (Read 3005 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline yakumo9275Topic starter

  • Sr. Member
  • ****
  • Join Date: Jun 2008
  • Posts: 301
    • Show all replies
    • http://mega-tokyo.com/blog
window size
« on: February 01, 2012, 01:57:13 PM »
So, I have done some more work on my amiga text adventure engine. I have my window, set and loaded my font, applied it. One thing I notice was that the size of the window seems to be the entire window, not just my drawing area, so I get the widgets/gadgets for titlebar and I guess side scrollbar / resize that has the button in the bottom right.

So when I do window->Width / rport->TxWidth, the number of columns ends up being greater than the visible area, so text goes off screen, same for height.

Is there a way to get the window size less the attached gadgets/widgets?

Right now I have topaz.font at 9 and I subtract 2 rows and 3 or 4 columns and its ok but its a hack and wont be ok if I change to topaz 8 or some other font...
--/\\-[ Stu ]-/\\--
Commodore 128DCR, JiffyDOS, Ultimate 1541 II, uIEC/SD, CBM 1902A  Monitor
 

Offline yakumo9275Topic starter

  • Sr. Member
  • ****
  • Join Date: Jun 2008
  • Posts: 301
    • Show all replies
    • http://mega-tokyo.com/blog
Re: window size
« Reply #1 on: February 01, 2012, 02:13:00 PM »
Quote from: Gilloo;678581
Hi,
For a non borderless window (aka normal window :) ), the usable width is w->Width - w->BorderLeft - w->BorderRight, and the height, w->Height - w->BorderTop - w->BorderBottom.

For a GimmeZeroZero window, use w->GZZWidth and w->GZZHeight instead w->Width and w->Height.



aah cool. My NewWindow() is a GZZ window, so I will fix that tonight. The programming books I have for amiga didnt mention GZZWidth / GZZHeight :/ thanks for the heads up!
--/\\-[ Stu ]-/\\--
Commodore 128DCR, JiffyDOS, Ultimate 1541 II, uIEC/SD, CBM 1902A  Monitor
 

Offline yakumo9275Topic starter

  • Sr. Member
  • ****
  • Join Date: Jun 2008
  • Posts: 301
    • Show all replies
    • http://mega-tokyo.com/blog
Re: window size
« Reply #2 on: February 02, 2012, 03:08:39 AM »
sweet. GZZWidth etc worked perfectly. Now I just need to figure IDCMP msg handling in there somewhere (so I can grab quit/resize) and some keyboard input and it'll be better than I expected! :)
--/\\-[ Stu ]-/\\--
Commodore 128DCR, JiffyDOS, Ultimate 1541 II, uIEC/SD, CBM 1902A  Monitor
 

Offline yakumo9275Topic starter

  • Sr. Member
  • ****
  • Join Date: Jun 2008
  • Posts: 301
    • Show all replies
    • http://mega-tokyo.com/blog
Re: window size
« Reply #3 on: February 02, 2012, 11:21:08 AM »
Thanks Thomas, my biggest problem will be trying to integrate my message handling into the flow of my application. Going from a whole procedural to event driven.. complicates all my forms of input if I need to also handle all the window+system events at the same time.
--/\\-[ Stu ]-/\\--
Commodore 128DCR, JiffyDOS, Ultimate 1541 II, uIEC/SD, CBM 1902A  Monitor
 

Offline yakumo9275Topic starter

  • Sr. Member
  • ****
  • Join Date: Jun 2008
  • Posts: 301
    • Show all replies
    • http://mega-tokyo.com/blog
Re: window size
« Reply #4 on: February 02, 2012, 04:16:16 PM »
well, I mean the IDCMP messages. At various points my program can wait for input, and at any time its waiting for input you can receive resize/close/refresh messages etc if you subscribed to them correct?

I guess my problem is, if I print 20 lines of text, and want to print more, I ask the user to hit a key when its all read so it does not scroll off the screen, so while waiting to hit a key, the last thing I need is to be told I need to resize, because I will need to reflow all the text just gone, and what is to come. doing resizes/redraws at the top level is fine, but if I am in the middle of dealing with something that is interspersed with a single user input makes it more difficult.
--/\\-[ Stu ]-/\\--
Commodore 128DCR, JiffyDOS, Ultimate 1541 II, uIEC/SD, CBM 1902A  Monitor
 

Offline yakumo9275Topic starter

  • Sr. Member
  • ****
  • Join Date: Jun 2008
  • Posts: 301
    • Show all replies
    • http://mega-tokyo.com/blog
Re: window size
« Reply #5 on: February 06, 2012, 05:29:00 PM »
I re-orchestrated things around my event handler and have things working, got menus in too. Going to add a requestor in if no file is specified and I should be good :) Only have 1 bug in savefile load/restore to figure out but everything else seems ok.

I checked out how infocom games behave and its very much the same for them as my interpreter, mine behaves a bit nicer but I dont consider it good behaviour :P
--/\\-[ Stu ]-/\\--
Commodore 128DCR, JiffyDOS, Ultimate 1541 II, uIEC/SD, CBM 1902A  Monitor