Community

SCI Programming => SCI Syntax Help => Topic started by: gumby on May 25, 2021, 09:51:19 AM

Title: Status line vertical size
Post by: gumby on May 25, 2021, 09:51:19 AM
I'm trying to get the status line to be a few pixels taller, the font I'm using has some characters that drop below the status line and get chopped off.  I was able to get the status line code modified to be larger, but when DrawPic commands are executed, they look to be getting applied at a y=10 and effectively overwriting the status line pixels that extend the 10th y pixel.

Anyone know if making a larger status line is possible?
Title: Re: Status line vertical size
Post by: gumby on May 25, 2021, 06:43:31 PM
I got it figured out.  Just needed to trigger another call to update the status line code during the init of the room, after the picture is drawn.

EDIT: Better still, I just threw it in as the last line of the drawPic method in the room class.
Title: Re: Status line vertical size
Post by: MusicallyInspired on May 25, 2021, 07:04:12 PM
Oh nice. I was wondering if this was possible.
Title: Re: Status line vertical size
Post by: gumby on May 26, 2021, 07:40:11 PM
I think another way to do it would be to use the SetPort kernel call.  I found examples of this when digging around in the TitleScreen.sc.
Title: Re: Status line vertical size
Post by: MusicallyInspired on May 26, 2021, 08:53:15 PM
I remember fiddling with setport but for some reason I thought some of this stuff was hardcoded or at least predisposed to be set up that way, seeing as all Pictures are a set height.
Title: Re: Status line vertical size
Post by: Kawa on May 27, 2021, 05:33:20 AM
I remember fiddling with setport but for some reason I thought some of this stuff was hardcoded or at least predisposed to be set up that way, seeing as all Pictures are a set height.
Depends on the interpreter. SCI0 has no SetPort functionality to change the main port's size, but SCI11 does -- it's why the template game's title screen is the full 320x200. Meanwhile, DrawStatus is always the same size, it and DrawMenuBar use the BARSIZE constant, which is 10. Or rather, they use the menuBar port, which is [0,0, main port width, BARSIZE]. But again, as the SCI11 template shows, you don't need to use DrawStatus to draw the status.
Title: Re: Status line vertical size
Post by: gumby on May 27, 2021, 09:16:41 AM
Thanks for that explanation Kawa