Fixed bug #674532: Last Unit cost should not display when typing a message

This commit is contained in:
jsalmon3 2003-01-25 18:54:36 +00:00
parent fab3b3eff4
commit fc28a83fd9
3 changed files with 6 additions and 4 deletions

View file

@ -1046,6 +1046,8 @@
units (from Jimmy Salmon).
<LI>Fixed bug #672463: Editor Crash with missing expansion graphics (from
Jimmy Salmon).
<LI>Fixed bug #674532: Last Unit cost should not display when typing a
message (from Jimmy Salmon).
<LI>+++
</UL>
</UL>

View file

@ -476,7 +476,7 @@ global void DrawButtonPanel(void)
//
// Update status line for this button
//
if( ButtonUnderCursor==i+10 ) {
if( ButtonUnderCursor==i+10 && KeyState!=KeyStateInput ) {
SetStatusLine(buttons[i].Hint);
// FIXME: Draw costs
v=buttons[i].Value;

View file

@ -93,9 +93,8 @@ local void ShowInput(void)
sprintf(InputStatusLine,"MESSAGE:%s~!_",Input);
input=InputStatusLine;
// FIXME: That is slow!
// FIXME: Must use the real status line length!!
while( VideoTextLength(GameFont,input)>448 ) {
// FIXME: This is slow!
while( VideoTextLength(GameFont,input)>TheUI.StatusLine.Graphic->Width ) {
++input;
}
KeyState=KeyStateCommand;
@ -112,6 +111,7 @@ local void UiBeginInput(void)
KeyState=KeyStateInput;
Input[0]='\0';
InputIndex=0;
ClearCosts();
ShowInput();
}