Single-Line Window
Posted: Wed Jun 01, 2005 8:22 pm
Because of the layout of my new game, I needed to mess around with the status line. It'll go all the way across the top, like normal, without graphics. But with graphics, I wanted it to appear at the top of the "status" area (I grabbed the window defs from Guilty Bastards and modified them), with the graphic going to the top (status line doesn't stretch above it). In order to do this, I can't just use a "window 1" command (that would make it go all the way across the top). I could do a custom "window" command, but I was trying to get the window_class to work.
What I found was odd. If I tried a 1-line window, it would always give me a 10-line window instead. I could do a 2-line window, but nothing shorter.
I found the problem in window.h, and modified a duplicate copy for my purpose. But, I thought I'd shared this. I don't know if it intentionally doesn't support a 1-line window, but here's what I did to change it:
What I found was odd. If I tried a 1-line window, it would always give me a 10-line window instead. I could do a 2-line window, but nothing shorter.
I found the problem in window.h, and modified a duplicate copy for my purpose. But, I thought I'd shared this. I don't know if it intentionally doesn't support a 1-line window, but here's what I did to change it:
Code: Select all
height = self.win_bottom - self.win_top
!!!MPS 06/01/2005 - increment first, to support 1-line windows.
!if height++ = 0: height = 10
if ++height <= 0: height = 10
if self.win_title: height++