Jump to content

Buttons are not displayed

Not a Bug 2.0.72

usukejp
usukejp

Posted (edited)

When I try to create a new one, I can't save it.

Writing directly to “CuiData.json” will allow editing in /cb

But I can't save it.

Directly written to “CuiData.json” is not displayed on the screen

 

[CuiData.json]

{
  "phone": {
    "uiType": "Overlay",
    "panelType": "button",
    "OffsetMin": "257 -125",
    "OffsetMax": "290 -66",
    "text": null,
    "panelColor": null,
    "panelChatCmd": "phone",
    "imageUrl": "https://URL/rust/img/phone/phonebtn6.png",
    "imgAnchorMin": null,
    "imgAnchorMax": null,
    "onCmdHide": "null"
  }
}

 

 

[CustomButtons.json]

{
  "Run toggle command when clicking on button": false,
  "Hide Buttons": {
    "When using Computer Station": [
      "button_name",
      "panel_name"
    ],
    "When Player is dead": [
      "button_name",
      "panel_name"
    ],
    "When Player is looting": [
      "button_name",
      "panel_name"
    ]
  },
  "Base Position": {
    "Anchor Min": "0.5 0",
    "Anchor Max": "0.5 0"
  },
  "Font Settings": {
    "Font Style": "robotocondensed-bold.ttf",
    "Base Font Size": 13,
    "Base Font Color": "1 1 1 1",
    "Font Outline Color": "0 0 0 1",
    "Font Outline Thickness": "0.1 0.1"
  },
  "Chat Commands": {
    "Open GUI": "cb",
    "List all Panels": "cb_list",
    "Toggle buttons on/off": "cb_toggle"
  }
}

Edited by usukejp
add code
David

Posted

Hey, button you created wasn't showing up for me as well. Image link you used was not working, you did not define any color for the button and you might also positioned it outside of your screen. 

I created example for you here. 
Also don't forget to assign permission or the button is not going to show up after reloading plugin.

{
  "phone": {
    "uiType": "Overlay",
    "panelType": "button",
    "OffsetMin": "190 20",
    "OffsetMax": "230 75",
    "text": null,
    "panelColor": "0 0 0 0.7",
    "panelChatCmd": "phone",
    "imageUrl": "https://static-mpm-optimized.s3.eu-west-2.amazonaws.com/0c67f666-9a63-44a6-bd1c-bba66bfe3ca7_large.png",
    "imgAnchorMin": null,
    "imgAnchorMax": null,
    "onCmdHide": "false"
  }
}

 

David

Posted

Changed Status from Pending to Not a Bug

1.6m

Downloads

Total number of downloads.

7.7k

Customers

Total customers served.

115.4k

Files Sold

Total number of files sold.

2.4m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.