WidgetsTemplets.xc/Widgets.xc

Published by dkruben on

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #112201
    dkruben
    Participant

    Widgets.xc

    /**
     * List of widgets.
     */
    {
      “widgets”: {
        // Referenced templates:
        // * every widget can be enabled or disabled separately by “enabled” switch in their settings.
        // * extended format supported, see extra-field.txt
        “login”: [
        ],
        “lobby”: [  (==>Hangar)
          ${ “widgetsTemplates.xc”:”clock*” }  ==>This is field from clock in hangar
        ]
      }
    }

    P.S. If you want to add more functions, either in the lobby or in the login, just create new fields.

    /**
     * Widgets templates(.xc)
     */
    {
      “clock”: { ==> same name in widgets*
        // Show clock in hangar.
        “enabled”: true,
        // layer – “bottom”, “normal” (default), “top”.
        “layer”: “normal”,
        “type”: “extrafield”,
        “formats”: [
          {
            “updateEvent”: “ON_EVERY_SECOND”,
            // Horizontal position.
            “x”: -10,
            // Vertical position.
            “y”: 41,
            // Width.
            “width”: 200,
            // Height.
            “height”: 50,
            // Horizontal alignment of field at screen (“left”, “center”, “right”).
            “screenHAlign”: “right”,
            “shadow”: {
              // false – no shadow
              // false – ??? ????
              “enabled”: true,
              “distance”: 0,             // (in pixels)     / offset distance
              “angle”: 0,                // (0.0 .. 360.0)  / offset angle
              “color”: “0x000000”,       // “0xXXXXXX”      / color
              “alpha”: 70,               // (0 .. 100)      / opacity
              “blur”: 4,                 // (0.0 .. 255.0)  / blur
              “strength”: 2              // (0.0 .. 255.0)  / intensity
            },
            “textFormat”: { “align”: “right”, “valign”: “center”, “color”: “0x959688” },
            “format”: “<font face=’$FieldFont’><textformat leading=’-38′><font size=’36’>{{py:xvm.formatDate(‘%H:%M’)}}</font><br></textformat><textformat rightMargin=’85’ leading=’-2′>{{py:xvm.formatDate(‘%Au’)}}<br><font size=’15’>{{py:xvm.formatDate(‘%d %bu %Y’)}}</font></textformat></font>”
          } // IIf you add new field to clock, need change the symbol for ” }, ”

    // If you need added one image just add new fiel do clock setting.

    Exemple:

          {
          “x”: -320, // X Line
          “y”: -12,  // Y Line
          “width”: 200, //width
          “height”: 80,  //height
          “screenHAlign”: “center”,
          “shadow”: {  “enabled”: true,   “distance”: 0, “angle”: 0, “color”: “0x000000”, “alpha”: 100,   “blur”: 4, “strength”: 2 },
          “textFormat”: { “align”: “right”, “valign”: “center”, “color”: “0xBCBCBC” },
          “format”: “<img src=’cfg://exemple/image.png’>”
          }
        ]
      }
    }

    #112202
    soulza
    Participant

    this new clock caused me a few problems , here is my config, note the AM and PM shows (needs to be lowered a pixel or two ;)

    shot_057.jpg

    /**
     * Widgets templates.
     */
    {
      “clock”: {
        “enabled”: true,
        “layer”: “top”,
        “type”: “extrafield”,
        “formats”: [
          {
            “updateEvent”: “ON_EVERY_SECOND”,
            “x”: -10,
            “y”: 41,
            “width”: 300,
            “height”: 55,
            “screenHAlign”: “right”,
            “shadow”: {
              “enabled”: true,
              “distance”: 0,             // (in pixels)     / offset distance / дистанция смещения
              “angle”: 0,                // (0.0 .. 360.0)  / offset angle    / угол смещения
              “color”: “0x000000”,       // “0xXXXXXX”      / color           / цвет
              “alpha”: 70,               // (0 .. 100)      / opacity         / прозрачность
              “blur”: 4,                 // (0.0 .. 255.0)  / blur            / размытие
              “strength”: 2              // (0.0 .. 255.0)  / intensity       / интенсивность
            },
            “textFormat”: { “align”: “right”, “valign”: “center”, “color”: “0xd6c598” },
            “format”: “<font face=’$FieldFont’><textformat leading=’-38′><font size=’28’>{{py:xvm.formatDate(‘%I:%M %p’)}}</font><br></textformat><textformat rightMargin=’120′ leading=’1′><font size=’15’>{{py:xvm.formatDate(‘%Au’)}}<br>{{py:xvm.formatDate(‘%d %bu %Y’)}}</font></textformat></font>”
          }
        ]
      }
    }

    #112203
    dkruben
    Participant

    i have same fking problem

    #112204
    one-fifty
    Participant

    I want to put a image for the bg and am having  a problem doing it.

     

    “clock”: {  
        “enabled”: true, 
        “layer”: “top”,
        “type”: “extrafield”,
        “formats”: [
          {
            “updateEvent”: “ON_EVERY_SECOND”,        
            “x”: 0,     
            “y”: 88,       
            “width”: 300,      
            “height”: 50,       
            “screenHAlign”: “center”,      
            “borderColor”: “0xa8ffbb”, “alpha”: 90,      
            “bgColor”: “0x586e9e”, “alpha”: 60, 
            “scr”:  null,        
            “shadow”: { “enabled”: true, “distance”: 0, “angle”: 0, “color”: “0x000000”, “alpha”: 80, “blur”: 4, “strength”: 2},     
            “textFormat”: { “align”: “right”, “valign”: “top”, “color”: “0xa8ffbb” },       
            “format”: “<font face=’$FieldFont’><textformat leading=’-38′><font size=’38’>{{py:xvm.formatDate(‘%I:%M:%S %p’)}}</font><br></textformat><textformat rightMargin=’200′ leading=’-2′>{{py:xvm.formatDate(‘%Au’)}}<br><font size=’18’>{{py:xvm.formatDate(‘%d %bu %Y’)}}</font></textformat></font>”
          }
        ]
      }
    }

    #112205
    soulza
    Participant

    yep some interesting results can be had with a little thought

    Untitled.png

    #112206
    Hawg
    Member

    Added this code to get players name to Show as you  login 
            //   My Name    
        { // text block
            “updateEvent”: ” ON_EVERY_SECOND”,
            “x”: 0,
            “y”:310,        
            “screenHAlign”: “center”,
            “shadow”: {“enabled”: true, “alpha”: 90, “blur”: 3, “strength”: 3 },
            “textFormat”: { “color”: “0xa8ffbb”, “size”: 15 },
            “format”: “<font size=’85’ color=’#a8ffbb’>  <font size=’85’>{{mystat.name}} </font>”
        },

    Note: This is someones Alt acct not mine

    vTp769h.png

    #112207

    how would I add a picture along with user name

    #112208
    Hawg
    Member
    6 hours ago, Racthndrdrake said:

    how would I add a picture along with user name

    You must direct it to a folder with you .png file in it.

    That’s what the format line is doing.

    “enabled”: true
        // layer – “bottom”, “normal” (default), “top”.
        “layer”: “normal”,
        “type”: “extrafield”,
        “formats”: [
          { // Event Handler
            “updateEvent”: ” ON_PANEL_MODE_CHANGED”,
            “x”: 0,
            “y”:50,
            “screenHAlign”: “center”,
            “format”: “<img src=’cfg://HAWGS/img/hawg.png’>”
          },    

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.