Index: trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm
===================================================================
--- trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm	(revision 44)
+++ trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm	(revision 45)
@@ -2,5 +2,5 @@
 ; Project name	:	Assembly Library
 ; Created date	:	6.9.2010
-; Last update	:	27.9.2010
+; Last update	:	28.9.2010
 ; Author		:	Tomi Tilli
 ; Description	:	Displays file dialog.
@@ -253,7 +253,7 @@
 	xchg	ax, cx
 	CALL_DISPLAY_LIBRARY SetCharacterPointerFromBXAX
-	mov		dl, ATTRIBUTES_NOT_USED
+	mov		bl, ATTRIBUTES_NOT_USED
 	mov		ax, BUFFER_OUTPUT_WITH_CHAR_ONLY
-	CALL_DISPLAY_LIBRARY SetCharOutputFunctionFromAXwithAttribFlagInDL
+	CALL_DISPLAY_LIBRARY SetCharOutputFunctionFromAXwithAttribFlagInBL
 
 	call	.FormatFileOrDirectoryToBufferFromDTAinDSSI
Index: trunk/Assembly_Library/Src/Menu/Dialog/DialogProgress.asm
===================================================================
--- trunk/Assembly_Library/Src/Menu/Dialog/DialogProgress.asm	(revision 44)
+++ trunk/Assembly_Library/Src/Menu/Dialog/DialogProgress.asm	(revision 45)
@@ -2,5 +2,5 @@
 ; Project name	:	Assembly Library
 ; Created date	:	15.8.2010
-; Last update	:	16.9.2010
+; Last update	:	28.9.2010
 ; Author		:	Tomi Tilli
 ; Description	:	Displays progress bar dialog and starts progress task.
@@ -167,5 +167,5 @@
 	jcxz	.DrawEmptyCharsOnly
 
-	mov		al, SCROLL_THUMB_CHARACTER
+	mov		al, PROGRESS_COMPLETE_CHARACTER
 	CALL_DISPLAY_LIBRARY PrintRepeatedCharacterFromALwithCountInCX
 
@@ -173,5 +173,5 @@
 	mov		cx, dx
 	jcxz	.NothingLeftToDraw
-	mov		al, SCROLL_TRACK_CHARACTER
+	mov		al, PROGRESS_INCOMPLETE_CHARACTER
 	CALL_DISPLAY_LIBRARY PrintRepeatedCharacterFromALwithCountInCX
 
Index: trunk/Assembly_Library/Src/Menu/MenuBorders.asm
===================================================================
--- trunk/Assembly_Library/Src/Menu/MenuBorders.asm	(revision 44)
+++ trunk/Assembly_Library/Src/Menu/MenuBorders.asm	(revision 45)
@@ -2,5 +2,5 @@
 ; Project name	:	Assembly Library
 ; Created date	:	14.7.2010
-; Last update	:	27.9.2010
+; Last update	:	28.9.2010
 ; Author		:	Tomi Tilli
 ; Description	:	Functions for drawing menu borders.
@@ -45,11 +45,11 @@
 ;		Nothing
 ;	Corrupts registers:
-;		AX, DX, SI, DI
+;		AX, BX, SI, DI
 ;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
 MenuBorders_AdjustDisplayContextForDrawingBorders:
-	mov		dl, ATTRIBUTES_ARE_USED
+	mov		bl, ATTRIBUTES_ARE_USED
 	mov		ax, MenuCharOut_MenuBorderTeletypeOutputWithAttribute
-	CALL_DISPLAY_LIBRARY SetCharOutputFunctionFromAXwithAttribFlagInDL
+	CALL_DISPLAY_LIBRARY SetCharOutputFunctionFromAXwithAttribFlagInBL
 
 	mov		ax, bp
@@ -269,9 +269,9 @@
 	call	MenuAttribute_SetToDisplayContextFromTypeInSI
 
-	push	dx
-	mov		dl, ATTRIBUTES_ARE_USED
+	push	bx
+	mov		bl, ATTRIBUTES_ARE_USED
 	mov		ax, FAST_OUTPUT_WITH_ATTRIBUTE_ONLY
-	CALL_DISPLAY_LIBRARY SetCharOutputFunctionFromAXwithAttribFlagInDL
-	pop		dx
+	CALL_DISPLAY_LIBRARY SetCharOutputFunctionFromAXwithAttribFlagInBL
+	pop		bx
 
 	call	PrintMultipleBorderCharactersFromAL	; AL does not matter
Index: trunk/Assembly_Library/Src/Menu/MenuText.asm
===================================================================
--- trunk/Assembly_Library/Src/Menu/MenuText.asm	(revision 44)
+++ trunk/Assembly_Library/Src/Menu/MenuText.asm	(revision 45)
@@ -2,5 +2,5 @@
 ; Project name	:	Assembly Library
 ; Created date	:	21.7.2010
-; Last update	:	27.9.2010
+; Last update	:	28.9.2010
 ; Author		:	Tomi Tilli
 ; Description	:	Functions for drawing menu texts by the user.
@@ -218,11 +218,11 @@
 ;		Nothing
 ;	Corrupts registers:
-;		AX, DX, SI, DI
+;		AX, BX, SI, DI
 ;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
 AdjustDisplayContextForDrawingTexts:
-	mov		dl, ATTRIBUTES_ARE_USED
+	mov		bl, ATTRIBUTES_ARE_USED
 	mov		ax, MenuCharOut_MenuTextTeletypeOutputWithAttribute
-	CALL_DISPLAY_LIBRARY SetCharOutputFunctionFromAXwithAttribFlagInDL
+	CALL_DISPLAY_LIBRARY SetCharOutputFunctionFromAXwithAttribFlagInBL
 
 	mov		ax, bp
Index: trunk/Assembly_Library/Src/Menu/MenuTime.asm
===================================================================
--- trunk/Assembly_Library/Src/Menu/MenuTime.asm	(revision 44)
+++ trunk/Assembly_Library/Src/Menu/MenuTime.asm	(revision 45)
@@ -2,5 +2,5 @@
 ; Project name	:	Assembly Library
 ; Created date	:	25.7.2010
-; Last update	:	27.9.2010
+; Last update	:	28.9.2010
 ; Author		:	Tomi Tilli
 ; Description	:	Menu timeouts other time related functions.
@@ -56,21 +56,15 @@
 ALIGN JUMP_ALIGN
 MenuTime_UpdateSelectionTimeout:
-	cmp		WORD [bp+MENUINIT.wTimeoutTicks], BYTE 0
-	je		SHORT .ReturnSinceTimeoutDisabled	; CF cleared
 	push	ds
 
-	call	GetSecondsUntilTimeoutToAXandPtrToTimeoutCounterToDSBX
-	cmp		al, [bp+MENU.bLastSecondPrinted]
-	je		SHORT .SetCFifTimeoutAndReturn
-	mov		[bp+MENU.bLastSecondPrinted], al
-	call	DrawTimeoutInAXoverMenuBorders
+	call	MenuTime_DrawWithoutUpdating
+	jnc		SHORT .TimeoutDisabled
+	call	PointDSBXtoTimeoutCounter
+	call	TimerTicks_SetCarryIfTimeoutFromDSBX
 
 ALIGN JUMP_ALIGN
-.SetCFifTimeoutAndReturn:
-	call	TimerTicks_SetCarryIfTimeoutFromDSBX
+.TimeoutDisabled:
 	pop		ds
-.ReturnSinceTimeoutDisabled:
 	ret
-
 
 ;--------------------------------------------------------------------
@@ -79,5 +73,6 @@
 ;		SS:BP:	Ptr to MENU
 ;	Returns:
-;		Nothing
+;		CF:		Set if timeout enabled
+;				Cleared if timeout disabled
 ;	Corrupts registers:
 ;		AX, BX, CX, DX, SI, DI
@@ -86,12 +81,34 @@
 MenuTime_DrawWithoutUpdating:
 	cmp		WORD [bp+MENUINIT.wTimeoutTicks], BYTE 0
-	je		SHORT .ReturnSinceTimeoutDisabled
+	je		SHORT .ReturnSinceTimeoutDisabled	; Clear CF
 
 	push	ds
-	call	GetSecondsUntilTimeoutToAXandPtrToTimeoutCounterToDSBX
+	call	GetSecondsLeftUntilTimeoutToAXandCounterToDSBX
 	call	DrawTimeoutInAXoverMenuBorders
 	pop		ds
+	stc
+ALIGN JUMP_ALIGN, ret
 .ReturnSinceTimeoutDisabled:
 	ret
+
+
+;--------------------------------------------------------------------
+; GetSecondsLeftUntilTimeoutToAXandCounterToDSBX
+;	Parameters
+;		SS:BP:	Ptr to MENU
+;	Returns:
+;		AX:		Seconds until timeout
+;		DS:BX:	Ptr to timeout counter
+;	Corrupts registers:
+;		AX, CX, DX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+GetSecondsLeftUntilTimeoutToAXandCounterToDSBX:
+	call	PointDSBXtoTimeoutCounter
+	call	TimerTicks_GetElapsedToAXfromDSBX
+	neg		ax			; Negate since DS:BX points to end time
+	MAX_S	ax, 0		; Set to zero if overflow
+	xchg	dx, ax
+	jmp		TimerTicks_GetSecondsToAXfromTicksInDX
 
 
@@ -111,24 +128,4 @@
 	lea		bx, [bp+MENU.wTimeoutCounter]
 	ret
-
-
-;--------------------------------------------------------------------
-; GetSecondsUntilTimeoutToAXandPtrToTimeoutCounterToDSBX
-;	Parameters
-;		SS:BP:	Ptr to MENU
-;	Returns:
-;		AX:		Seconds until timeout
-;		DS:BX:	Ptr to timeout counter
-;	Corrupts registers:
-;		AX, CX, DX
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-GetSecondsUntilTimeoutToAXandPtrToTimeoutCounterToDSBX:
-	call	PointDSBXtoTimeoutCounter
-	call	TimerTicks_GetElapsedToAXfromDSBX
-	neg		ax			; Negate since DS:BX points to end time
-	MAX_S	ax, 0		; Set to zero if overflow
-	xchg	dx, ax
-	jmp		TimerTicks_GetSecondsToAXfromTicksInDX
 
 
@@ -173,4 +170,5 @@
 	pop		bp
 
+	; Draw right border with normal border color
 	mov		al, DOUBLE_RIGHT_HORIZONTAL_TO_SINGLE_VERTICAL
 	jmp		MenuBorders_PrintSingleBorderCharacterFromAL
@@ -178,5 +176,5 @@
 	db		DOUBLE_BOTTOM_LEFT_CORNER
 	db		DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL
-	db		"%AAutoselection in %2-ds",NULL
+	db		"%AAutoselection in %2-us",NULL
 
 ;--------------------------------------------------------------------
