Prev: 28535 Up: Map Next: 28564
28539: Highlight Menu Line
Input
A The active menu item number
HighlightMenuLine 28539 LD C,3 C= MAGENTA.
28541 LD (28418),A Write A to *ControlMethod.
This entry point is used by the routine at ClearActiveMenuItem.
SetActiveMenuItem 28544 LD A,(28418) Fetch *ControlMethod.
Locate the desired line for highlighting.
28547 LD HL,22763 HL=22763 (attribute buffer location).
28550 LD DE,32 DE=32 (one line).
Keep moving down one line in relation to the active menu number.
FindMenuLine 28553 ADD HL,DE HL+=DE.
28554 DEC A Decrease A by one and jump back to FindMenuLine until the correct line is referenced.
28555 JR NZ,FindMenuLine
Highlight the line.
28557 LD B,18 Set a counter of 18 (the maximum number of characters on any line).
HighlightMenuLine_Loop 28559 LD (HL),C Write the attribute byte to the currently referenced attribute buffer location.
28560 INC HL Increment the referenced attribute buffer location by one.
28561 DJNZ HighlightMenuLine_Loop Decrease the counter by one and loop back to HighlightMenuLine_Loop until the whole line is highlighted.
28563 RET Return.
Prev: 28535 Up: Map Next: 28564