-
Notifications
You must be signed in to change notification settings - Fork 20
Creating UI Config File
{
"output_file": "settings.json",
"cd_response": {
"type": "textbox",
"value": "{0} the command is still on cooldown for {1} seconds!",
"label": "Cooldown Response",
"tooltip": "The message that the bot will display.",
"group": "Responses"
},
"use_cd": {
"type": "checkbox",
"value": false,
"label": "Use Cooldown Message",
"tooltip": "To display CoolDown Message?",
"group": "Checkboxes"
},
"cd": {
"type": "numberbox",
"label": "COOLDOWN (seconds)",
"value": 10,
"tooltip": "Cooldown in seconds.",
"group": "Numbers"
},
"choice": {
"type": "dropdown",
"label": "Mode",
"value": "Mode 1",
"tooltip": "This will determine the mode.",
"items": [
"Mode 1",
"Mode 2",
"Mode 3"
],
"group": "Dropdowns"
},
"headcolor": {
"type": "colorpicker",
"label": "Header Color",
"value": "rgba(255,0,0,1.0)",
"tooltip": "",
"group": "Color Pickers"
},
"interval": {
"type": "slider",
"label": "Interval",
"value": 1,
"min": 0,
"max": 10,
"ticks": 0.1,
"tooltip": "",
"group": "Sliders"
},
"btnStart": {
"type": "button",
"label": "Start Timer",
"tooltip": "Starts the Timer!",
"function": "StartTimer",
"wsevent": "EVENT_START_TIMER",
"group": "buttons"
}
}Each UI_Config file has to start off with the first element being "output_file" this will tell the bot where the file should be saved to and how it should be called. This file has to always be of type .json.
"output_file": "settings.json"In order to create a Textbox you need to follow this format. The group label will be used to sort all your UI elements in nice Expander boxes so everything looks clean.
{
"cd_response": {
"type": "textbox",
"value": "{0} the command is still on cooldown for {1} seconds!",
"label": "Cooldown Response",
"tooltip": "The message that the bot will display.",
"group": "Responses"
}
}In order to create a Checkbox you need to follow this format.
{
"use_cd": {
"type": "checkbox",
"value": false,
"label": "Use Cooldown Message",
"tooltip": "To display CoolDown Message?",
"group": "Checkboxes"
}
}In order to create a Numberbox which is a Textbox that only allows Numbers to be typed you would need to follow this format.
{
"cd": {
"type": "numberbox",
"label": "COOLDOWN (seconds)",
"value": 10,
"tooltip": "Cooldown in seconds.",
"group": "Numbers"
}
}In order to create a Dropdown you will need to follow this format.
{
"choice": {
"type": "dropdown",
"label": "Mode",
"value": "Mode 1",
"tooltip": "This will determine the mode.",
"items": [
"Mode 1",
"Mode 2",
"Mode 3"
],
"group": "Dropdowns"
}
}In order to create a Colorpicker you will need to follow this format.
{
"headcolor": {
"type": "colorpicker",
"label": "Header Color",
"value": "rgba(255,0,0,255)",
"tooltip": "",
"group": "Color Pickers"
}
}In order to create a Slider you will need to follow this format.
{
"interval": {
"type": "slider",
"label": "Interval",
"value": 1,
"min": 0,
"max": 10,
"ticks": 0.1,
"tooltip": "Determines the polling interval.",
"group": "Sliders"
}
}In order to create a Button you will need to follow this format. The function refers to the Python Script function that should be called. The wsevent refers to the Websocket Event that should be sent when clicking the button.
{
"btnStart": {
"type": "button",
"label": "Start Timer",
"tooltip": "Starts the Timer!",
"function": "StartTimer",
"wsevent": "EVENT_START_TIMER",
"group": "buttons"
}
}