Author Topic: DebugCenter colors  (Read 170 times)

HSE

  • Member
  • *****
  • Posts: 1130
  • <AMD>< 7-32>
DebugCenter colors
« on: October 18, 2019, 02:06:53 AM »
Hi all!

Here some modifications to obtain a better personalization:
  • Debug.inc
Code: [Select]
;Debug coloring setup
;DBG_COLOR_BACKGROUND  equ   $RGB(255,255,255)
DBG_COLOR_BACKGROUND  equ   $RGB(000,000,048)
DBG_COLOR_TEXT        equ   $RGB(230,230,230)     ;for dark background
;DBG_COLOR_TEXT        equ   $RGB(000,000,000)     ;for bright background
DBG_COLOR_COMMENT     equ   00B7F7F5h;$RGB(208,208,208)

   *  *  *

DBG_COLOR_LINE equ   $RGB(150,150,255)

DBG_FONT_TEXT        textequ <Fixedsys>   
;DBG_FONT_TEXT        textequ <Courier New>   
  • DebugCenter_ChildTxt.inc
Code: [Select]
Method DbgMdiChildTxt.OnCreate, uses xsi, wParam:WPARAM, lParam:LPARAM
  SetObject xsi
  invoke CreateWindowEx, WS_EX_LEFT or WS_EX_CLIENTEDGE or WS_EX_ACCEPTFILES, \
                         offset szRichEdit20, NULL, EDTSTYLE, \
                         0, 0, 10, 10, [xsi].hWnd, RICHEDITID, hInstance, NULL
  mov [xsi].hEdit, xax
 
  invoke SendMessage, xax, EM_SETEVENTMASK, 0, ENM_SELCHANGE
  ;------------------------------------------------------------------
  invoke SendMessage, [xsi].hEdit, EM_SETBKGNDCOLOR, 0, DBG_COLOR_BACKGROUND
  ;------------------------------------------------------------------

  mov [xsi].pEdtIptor, $New(REdtIptor)
  OCall xax::REdtIptor.Init, xsi, [xsi].hEdit, offset szPropREdtIptor
  xor eax, eax
MethodEnd
  • DebugCenter_Main.inc
Code: [Select]
Method DebugCenter.OnCreate, uses xbx xsi, wParam:WPARAM, lParam:LPARAM

    *  *  *

1309:
  FillString LF.lfFaceName, <DBG_FONT_TEXT>
 
    *  *  *
MethodEnd

Method DebugCenter.OnCopyData, uses xbx xdi xsi, wParam:WPARAM, lParam:LPARAM

*  *  *
1180:
;m2z CFD.crTextColor
  mov CFD.crTextColor, DBG_COLOR_LINE
*  *  *
MethodEnd

    Biterider

    • Moderator
    • Member
    • *****
    • Posts: 383
    • ObjAsm32 + ObjAsm64 = ObjAsm
      • ObjAsm
    Re: DebugCenter colors
    « Reply #1 on: October 18, 2019, 03:45:55 AM »
    Hi HSE
    Thanks for the customization. I'll replace my files with yours.  :thumbsup:

    Regards, Biterider

    HSE

    • Member
    • *****
    • Posts: 1130
    • <AMD>< 7-32>
    Re: DebugCenter colors
    « Reply #2 on: October 18, 2019, 05:02:39 AM »
    Hi Biterider!

    Another little thing testing Demo04.

    Changing in DbgHex (Debug.inc):
    Code: [Select]
        DbgOutHex <Var = >,0 , ??VarRBX, 0 , ??DbgDstWnd
    to
    Code: [Select]
        DbgOutHex <Var = >, , ??VarRBX, , ??DbgDstWnd

    Biterider

    • Moderator
    • Member
    • *****
    • Posts: 383
    • ObjAsm32 + ObjAsm64 = ObjAsm
      • ObjAsm
    Re: DebugCenter colors
    « Reply #3 on: October 18, 2019, 06:30:50 AM »
    Hi HSE
    Quote
    DbgOutHex <Var = >, , ??VarRBX, , ??DbgDstWnd

    Good catch. I probably would never have seen it if you had not changed the color scheme.
    It might be a good idea to turn on the "high contrast mode" automatically and introduce a small color management similar to the OA_Tools.

    Biterider


    PS: I changed the background of the ChildBmp to match the ChildTxt.

    HSE

    • Member
    • *****
    • Posts: 1130
    • <AMD>< 7-32>
    Re: DebugCenter colors
    « Reply #4 on: October 19, 2019, 12:35:52 AM »
    PS: I changed the background of the ChildBmp to match the ChildTxt.
    :thumbsup:

    I don't know if to modify DebugCenter is a good idea. Perhaps is easy to put DBG colors in a diferent file, and to make an utility to modify that file. This still wiil allow to set different colors like in RedBlackTree (btw some modification)
    « Last Edit: October 19, 2019, 03:27:51 AM by HSE »

    Biterider

    • Moderator
    • Member
    • *****
    • Posts: 383
    • ObjAsm32 + ObjAsm64 = ObjAsm
      • ObjAsm
    Re: DebugCenter colors
    « Reply #5 on: October 19, 2019, 04:58:38 PM »
    Hi HSE
    Thank you!

    Biterider