2012-10-12 16:27 UTC+0200 Viktor Szakats (harbour syenar.net)

* contrib/hbnf/menu1.prg
  * contrib/hbnf/popadder.prg
  * contrib/hbnf/tbwhile.prg
    % using color setting ability of HB_DISP*()/HB_SCROLL() function
This commit is contained in:
Viktor Szakats
2012-10-12 14:27:59 +00:00
parent 4d0b9c1fb3
commit 9d61b5ceae
4 changed files with 13 additions and 12 deletions

View File

@@ -16,6 +16,12 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-10-12 16:27 UTC+0200 Viktor Szakats (harbour syenar.net)
* contrib/hbnf/menu1.prg
* contrib/hbnf/popadder.prg
* contrib/hbnf/tbwhile.prg
% using color setting ability of HB_DISP*()/HB_SCROLL() function
2012-10-12 16:05 UTC+0200 Viktor Szakats (harbour syenar.net)
* contrib/hbmisc/hbedit.prg
* contrib/hbnf/clrsel.prg

View File

@@ -162,8 +162,7 @@ FUNCTION FT_MENU1( aBar, aOptions, aColors, nTopRow, lShadow )
IF lShadow == NIL .OR. lShadow
hb_Shadow( nTopRow + 1, aBoxLoc[ t_nHPos ], Len( t_aChoices[ t_nHPos, 1 ] ) + nTopRow + 2, aBarWidth[ t_nHPos ] + 3 + aBoxLoc[ t_nHPos ] )
ENDIF
SetColor( cBorder )
hb_DispBox( nTopRow + 1, aBoxLoc[ t_nHPos ], Len( t_aChoices[ t_nHPos, 1 ] ) + nTopRow + 2, aBarWidth[ t_nHPos ] + 3 + aBoxLoc[ t_nHPos ], hb_UTF8ToStrBox( "╔═╗║╝═╚║ " ) )
hb_DispBox( nTopRow + 1, aBoxLoc[ t_nHPos ], Len( t_aChoices[ t_nHPos, 1 ] ) + nTopRow + 2, aBarWidth[ t_nHPos ] + 3 + aBoxLoc[ t_nHPos ], hb_UTF8ToStrBox( "╔═╗║╝═╚║ " ), cBorder )
SetColor( cBox + "," + cCurrent + ",,," + cUnselec )
t_nVPos := AChoice( nTopRow + 2, aBoxLoc[ t_nHPos ] + 2, Len( t_aChoices[ t_nHPos, 1 ] ) + nTopRow + 2, aBarWidth[ t_nHPos ] + 1 + aBoxLoc[ t_nHPos ], t_aChoices[ t_nHPos, 1 ], t_aChoices[ t_nHPos, 3 ], "__ftAcUdf", aLastSel[ t_nHPos ] )
DO CASE
@@ -238,10 +237,9 @@ STATIC FUNCTION _ftBailOut( cBorder, cBox )
nOldCursor := SetCursor( SC_NONE )
sOldScreen := SaveScreen( t_nMaxRow / 2 - 1, 24, t_nMaxRow / 2 + 2, 55 )
cOldColor := SetColor( cBorder )
hb_Shadow( t_nMaxRow / 2 - 1, 24, t_nMaxRow / 2 + 2, 55 )
hb_DispBox( t_nMaxRow / 2 - 1, 24, t_nMaxRow / 2 + 2, 55, hb_UTF8ToStrBox( "╔═╗║╝═╚║ " ) )
SetColor( cBox )
hb_DispBox( t_nMaxRow / 2 - 1, 24, t_nMaxRow / 2 + 2, 55, hb_UTF8ToStrBox( "╔═╗║╝═╚║ " ), cBorder )
cOldColor := SetColor( cBox )
@ t_nMaxRow / 2, 26 SAY "Press ESCape To Confirm Exit"
@ t_nMaxRow / 2 + 1, 27 SAY "Or Any Other Key To Resume"
nKeyPress := Inkey( 0 )
@@ -249,7 +247,7 @@ STATIC FUNCTION _ftBailOut( cBorder, cBox )
RestScreen( t_nMaxRow / 2 - 1, 24, t_nMaxRow / 2 + 2, 55, sOldScreen )
SetCursor( nOldCursor )
RETURN !( nKeyPress == K_ESC )
RETURN nKeyPress != K_ESC
STATIC FUNCTION _ftValKeys( nNum, t_aChoices, t_aValidKeys )

View File

@@ -956,8 +956,7 @@ STATIC FUNCTION _ftDisplayTape( aAdder, nKey )
SetColor( "N/W" )
cTapeScr := SaveScreen( 4 + nTopOS, 6 + nTapeSpace, 22 + nTopOS, 35 + nTapeSpace )
hb_Shadow( 4 + nTopOS, 6 + nTapeSpace, 21 + nTopOS, 33 + nTapeSpace )
SetColor( "R+/W" )
hb_DispBox( 4 + nTopOS, 6 + nTapeSpace, 21 + nTopOS, 33 + nTapeSpace, B_SINGLE )
hb_DispBox( 4 + nTopOS, 6 + nTapeSpace, 21 + nTopOS, 33 + nTapeSpace, B_SINGLE, "R+/W" )
SetColor( "GR+/W" )
@ 4 + nTopOS, 17 + nTapeSpace SAY " TAPE "
SetColor( "N/W" )

View File

@@ -148,10 +148,8 @@ FUNCTION FT_BRWSWHL( aFields, bWhileCond, cKey, nFreeze, lSaveScrn, ;
ENDIF
/* make a window shadow */
SetColor( cColorShad )
hb_Scroll( nTop + 1, nLeft + 1, nBottom + 1, nRight + 1 )
SetColor( cColorBack )
hb_Scroll( nTop, nLeft, nBottom, nRight )
hb_Scroll( nTop + 1, nLeft + 1, nBottom + 1, nRight + 1,,, cColorShad )
hb_Scroll( nTop, nLeft, nBottom, nRight,,, cColorBack )
SetColor( cColorSave )
nCursSave := SetCursor( SC_NONE )