[I7] Force position of right-status text

If i place the following code:

change the right hand status line to "[the time of day to the nearest 15 minutes in words]"

I get statuses like “quarter to eleve”.

Is there a way to force it to adjust the positioning of the right-hand status on the fly when the time of day is being shown in words?

Try this.

[spoiler][code]“Test”

Include (-

#Ifdef TARGET_ZCODE;
#Iftrue (#version_number == 6);
[ DrawStatusLine; Z6_DrawStatusLine(); ];
#Endif;
#Endif;

#Ifndef DrawStatusLine;
[ DrawStatusLine width posb;
@push say__p; @push say__pc;
BeginActivity(CONSTRUCTING_STATUS_LINE_ACT);
VM_StatusLineHeight(1); VM_MoveCursorInStatusLine(1, 1);
if (statuswin_current) {
width = VM_ScreenWidth(); posb = width - (+ right alignment depth +);
spaces width;
ClearParagraphing();
if (ForActivity(CONSTRUCTING_STATUS_LINE_ACT) == false) {
VM_MoveCursorInStatusLine(1, 2);
switch(metaclass(left_hand_status_line)) {
String: print (string) left_hand_status_line;
Routine: left_hand_status_line();
}
VM_MoveCursorInStatusLine(1, posb);
switch(metaclass(right_hand_status_line)) {
String: print (string) right_hand_status_line;
Routine: right_hand_status_line();
}
}
VM_MoveCursorInStatusLine(1, 1); VM_MainWindow();
}
ClearParagraphing();
EndActivity(CONSTRUCTING_STATUS_LINE_ACT);
@pull say__pc; @pull say__p;
];
#Endif;

-) instead of “Status Line” in “Printing.i6t”.

To decide what number is the right alignment depth:
decide on the number of characters in the right hand status line.

When play begins (this is the set time rule):
now the right hand status line is “[the time of day to the nearest 15 minutes in words]”.

The Testing Room is A Room.[/code][/spoiler]

Hope this helps.

I appreciate the effort, climbing, but believe it or not this actually cut an additional letter off. It now says “quarter to elev” with that code installed. In two different interpreters. I don’t know enough about I6 to attempt a fix…

Curious! It works fine when I retried it. However, you can easily shift the text over to the left by replacing this:

To decide what number is the right alignment depth: decide on the number of characters in the right hand status line.

with this:

To decide what number is the right alignment depth: decide on (the number of characters in the right hand status line plus N).

Where N is whatever number shifts the text far enough to see the whole thing.

Hope this helps.

I tracked it down to a conflict with Emily Short’s Basic Screen Effects. Let me see if I can figure out where it’s conflicting in that extension.

You’re using “Emily Short’s Basic Screen Effects”? Then it will definitely conflict! The right alignment depth is a number variable in that extension. I was assuming you weren’t using that extension because you mentioned the right hand status line text variable, which is rendered useless with the extension along with the left hand status line text variable when using the extension’s built in status line capabilities. If you are using the extension’s status line code, all you need to do is this.

When play begins: now the right alignment depth is N.

Otherwise, just change the “right alignment depth” variable name to something else, like so.

[spoiler][code]“Test”

Include (-

#Ifdef TARGET_ZCODE;
#Iftrue (#version_number == 6);
[ DrawStatusLine; Z6_DrawStatusLine(); ];
#Endif;
#Endif;

#Ifndef DrawStatusLine;
[ DrawStatusLine width posb;
@push say__p; @push say__pc;
BeginActivity(CONSTRUCTING_STATUS_LINE_ACT);
VM_StatusLineHeight(1); VM_MoveCursorInStatusLine(1, 1);
if (statuswin_current) {
width = VM_ScreenWidth(); posb = width - (+ right positioning expanse +);
spaces width;
ClearParagraphing();
if (ForActivity(CONSTRUCTING_STATUS_LINE_ACT) == false) {
VM_MoveCursorInStatusLine(1, 2);
switch(metaclass(left_hand_status_line)) {
String: print (string) left_hand_status_line;
Routine: left_hand_status_line();
}
VM_MoveCursorInStatusLine(1, posb);
switch(metaclass(right_hand_status_line)) {
String: print (string) right_hand_status_line;
Routine: right_hand_status_line();
}
}
VM_MoveCursorInStatusLine(1, 1); VM_MainWindow();
}
ClearParagraphing();
EndActivity(CONSTRUCTING_STATUS_LINE_ACT);
@pull say__pc; @pull say__p;
];
#Endif;

-) instead of “Status Line” in “Printing.i6t”.

To decide what number is the right positioning expanse:
decide on the number of characters in the right hand status line.

When play begins (this is the set time rule):
now the right hand status line is “[the time of day to the nearest 15 minutes in words]”.

The Testing Room is A Room.[/code][/spoiler]

Where N is a number high enough to prevent text cut off in both cases.

Hope this helps.

Tried that already. No effect whatsoever.

Then it’s just a clash a variables. Try this.

[spoiler][code]“Test”

Include (-

#Ifdef TARGET_ZCODE;
#Iftrue (#version_number == 6);
[ DrawStatusLine; Z6_DrawStatusLine(); ];
#Endif;
#Endif;

#Ifndef DrawStatusLine;
[ DrawStatusLine width posb;
@push say__p; @push say__pc;
BeginActivity(CONSTRUCTING_STATUS_LINE_ACT);
VM_StatusLineHeight(1); VM_MoveCursorInStatusLine(1, 1);
if (statuswin_current) {
width = VM_ScreenWidth(); posb = width - (+ right positioning expanse +);
spaces width;
ClearParagraphing();
if (ForActivity(CONSTRUCTING_STATUS_LINE_ACT) == false) {
VM_MoveCursorInStatusLine(1, 2);
switch(metaclass(left_hand_status_line)) {
String: print (string) left_hand_status_line;
Routine: left_hand_status_line();
}
VM_MoveCursorInStatusLine(1, posb);
switch(metaclass(right_hand_status_line)) {
String: print (string) right_hand_status_line;
Routine: right_hand_status_line();
}
}
VM_MoveCursorInStatusLine(1, 1); VM_MainWindow();
}
ClearParagraphing();
EndActivity(CONSTRUCTING_STATUS_LINE_ACT);
@pull say__pc; @pull say__p;
];
#Endif;

-) instead of “Status Line” in “Printing.i6t”.

To decide what number is the right positioning expanse:
decide on the number of characters in the right hand status line.

When play begins (this is the set time rule):
now the right hand status line is “[the time of day to the nearest 15 minutes in words]”.

The Testing Room is A Room.[/code][/spoiler]

Hope this helps.

Yes, whatever you did, that fixed it. Thanks!