Announcement

Collapse
No announcement yet.

gfx_RoundPanel

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • gfx_RoundPanel

    Hi,

    I've just got my Gen4-uLCD-50D and I'm learning how to use it.

    In the Arduino libraries, in "Diablo_Const4D.h" there is "#define F_gfx_Panel -161" given by "cmd 0xFF5F" in "DIABLO16_serialcmdmanual_R_2_0.pdf"
    There is not a define for gfx_RoundPanel though.

    gfx_RoundPanel
    is used in the example in "DIABLO16_InternalFunctions_R_2_0.pdf" @ "2.6.34. gfx_RoundPanel(state, x, y, width, height, radius, bevelwidth, Colour)", with "Syntax = gfx_Panel(state, x, y, width, height, radius, bevelwidth, Colour);"

    But the signature of
    gfx_Panel
    is:
    void Diablo_Serial_4DLib::gfx_Panel(word Raised, word X, word Y, word Width, word Height, word Color)

    Thanks for clarifying!



  • #2
    Hello

    Welcome to the forum,

    The gfx_RoundPanel isn't a support command in the Serial environment but there is a method you can use to make a function for a Internal function that isn't accessible via Serial.

    In the Serial commands manual you will find a section of file commands and file_LoadFunction and file_CallFunction will allow you to create a function, save it on the SD and call it as a function.

    Here is the example function

    Code:
    #platform "Gen4-uLCD-50D"
    
    #inherit "4DGL_16bitColours.fnc"
    
    func RoundedPanel(var state, var x, var y, var width, var height, var radius, var bevelwidth, var Colour)
    
        gfx_RoundPanel(state, x, y, width, height, radius, bevelwidth, Colour);
    
    endfunc
    The parameters for the function are sent with the file_CallFunction command and the function returns after completing the task. I have attached a compiled version of the function that you could save directly to your SD card

    I hope this helps

    Best regards

    Paul
    Attached Files

    Comment


    • #3
      Thanks, Paul!

      It worked... and then there was a change in the design :-/

      Comment

      Working...
      X