#JSON-UI General

1 messages · Page 6 of 1

restive crag
#

It doesn't exist so i added it, it works for all light buttons but except my form buttons which is a light button too. 🤔

hexed briar
#

that variable exists.

#

also do not put variables on another variables.

wintry crater
#

why it only show 10x10 of the texture i created?

hexed briar
#

cell_image has .json format. this is nineslice config file for cell_image.

#

you'll have to change its image size and nineslice on textures/ui/cell_image.json

wintry crater
#

ok

#
{
  "nineslice_size": 1,
  "base_size": [
    5,
    5
  ]
}

uhh what is nineslice_size and base_size mean?

hexed briar
#

nineslice_size means how much pixel it will copy for each corners, and base_size means the image size of cell_image.

#

nineslice makes your texture go this

restive crag
hexed briar
#

could be.

#

perhaps on your image size.

#

there's a lot of example how that is used

#

you can look minecraft buttons for example, or dialog textures. they're really just a small image like 10x10 or 6x6

#

there's json version of the .png format, that's nineslice config for separate image version

#

you change nineslice_size with specific value or you can go [ 2, 2, 2, 2 ]

#

the image above here with numbers on that texture specially 1, 3, 7 and 9 or image corners are how minecraft nineslice works

#

you can ignore 2, 4, 6 and 8 because that doesn't exist in minecraft

restive crag
#

[ part1, part3, part7, part9]

hexed briar
#

yeah

#

that should work

#

though without that, you're taking advantage of all corners.

#

you can look vanilla textures specially on textures/ui folder with .json and see how it works

restive crag
#

oh okay 👍

hexed briar
#

there's too many of them because that is to adjust the texture and properly work with scaling

#

so it doesn't look stretched out

restive crag
#

Ooh

#

Stretching but it doesn't affect its resolution ?

hexed briar
#

the above one are without nineslice

#

the below one are with nineslice

restive crag
#

they look clean

hexed briar
#

yeah.

#

if minecraft doesn't have that

#

you can see stretched image about all screens.

wintry crater
#

thanks! now i know why almost every ui texture is sooo small like 10x10 or something xD

hexed briar
#

yeah, it's a cool optimization.

last pollen
#

how can i add a hover to my button?

hexed briar
#

uh

#

what is kind of button are you using

last pollen
#

I have a simple button that has @common_buttons.light_text_button, but I don't know how to add a hover over it, like a texture that appears when the mouse cursor is placed over the button

restive crag
#

You could edit the texture

#

button_borderless

#

and just find the light button hover

last pollen
#

i don't wanna edit the button hover texture, but i wanna add a texture

empty jacinth
#

On it

restive crag
#

textures/ui/button_borderless_lighthover

last pollen
#

like this #1128355133999296653

restive crag
#

It's custom background ig?

#

"$custom_background"

hexed briar
#

no

last pollen
#

no

hexed briar
#

there's a lot of variation of buttons type.

#

light_text = basically only for text and no custom elements for it

#

light_content = allows custom elements to be added though no text bundled, so $button_text does not exist.

#

the light part also has dark version. just, dark

#

though dark version has more customization than light version for some reason.

#

you can look more variations in vanilla_template/ui/ui_template_buttons.json

restive crag
#

Can we edit this so it shows a label when dark button gets hovered?

     {
        "hover@$button_state_panel": {
          "$new_ui_button_texture": "$hover_button_texture",
          "$text_color": "$dark_button_hover_text_color",
          "$secondary_text_color": "$dark_button_secondary_hover_text_color",
          "$content_alpha": 1,
          "$border_color": "$dark_border_hover_color",
          "$border_layer": 4,
          "$hover_state": true,
          "layer": 4 // This is several layers higher than default in case two buttons share a border and that shared border needs to turn with with either button hover/press state

        }
      },
last pollen
empty jacinth
#

Controls: [] is your custom content

hexed briar
last pollen
hexed briar
#

for example, if I wanna make my button purple when I pressed the button. I place a color button variables in pressed element on control array.

#

and vice versa.

last pollen
restive crag
last pollen
#

before I had a button @common.button but it didn't work, and it had hover controls in it, which was possible to add elements

hexed briar
#
"[email protected]": {
    "type": "button",
    "controls": [
      {
        "default": {
          "type": "panel"
        }
      },
      {
        "hover": {
          "type": "panel"
        }
      },
      {
        "pressed": {
          "type": "panel"
        }
      }
    ]
  },```
#

perhaps that might work

#

I forgot about I and can't see my old snippets

#

can't 100% sure if it work or not

last pollen
#

I will test thanks

restive crag
#

Still need help

unique swan
#

I moved Titleraw up but there is no such space between them. Can you help me, what should I do?

#

@pine matrix Can you help me?

dusty ether
#

Okay my form backgrounds disappeared and I don't know how to get it back

#

I was editing the common_dialog, common_buttons, etc. and somehow changed something that removed the backgrounds for my forms. I also copied the vanilla textures/ui for the backgrounds, buttons, etc. to edit so maybe that could be it?

wintry crater
#

how can i make the item render smaller?

hexed briar
wintry crater
#

i want to make it fit to the cell background i created

restive crag
hexed briar
restive crag
#

nvm

#

worst thing to do

#

where can I add the paper doll in a form?

#

I tried adding it on controls of form@common_dialogs.main_panel_no_buttons, it removed the form but the paper doll showed

hexed briar
#

Modify the size in vanilla_template/ui/inventory_screen.json

"item_renderer": {
    "type": "custom",
    "renderer": "inventory_item_renderer",
    "size": [ 16, 16 ]
  },```
wintry crater
#

i actually already modified the number value to 5, 5 but nothing happen

hexed briar
#

Inventory screen?

wintry crater
#

yes

hexed briar
#

not sure but that should work.

#

lemme test brb

#

weeeeeeeeeeee

#

change it to .json (discord hates .JSON so that's why I uploaded it as .txt) and place it to ui folder. Warning - every blocks/items will uh. be large

#

also change its value depends on what size you want

#

have fun

wintry crater
#

thanks you!

#

is decimal numbers working in json ui?

hexed briar
#

yesnt

#

you can only go like just <numbers>.5

#

another than that, no.

wintry crater
#

ah ok

hexed briar
#

you can't go 0.2, or 0.8, either 0.05

#

just only .5

restive crag
#

lol

#

why'd they do thst

wintry crater
#

thanks! it looks better now :>

hexed briar
#

don't know, when I look at it in vanilla codes

#

it does not make absolutely difference at all

#

I seen 1.25 before in vanilla json-ui code, they're literally no difference in 1.25 and 1

restive crag
#

@hexed briar is it true that we could put a toggle in pause_screen.json then it could like toggle a image from hud_screen.json? Yes or No?

hexed briar
#

uh technically.

restive crag
#

Kyra said its true, but I'm confuse if it's real or not

hexed briar
#

you can make togglable stuff in hud_screen, them clone those elements to pause screen. add few property on hud_screen element like always rendering and interactable from another screen

#

and there you have it

restive crag
#

ohh so thats how other ui creators do it

hexed briar
#

the thing is, you can't really send custom data from pause screen to hud screen. though you can make it like both screens has the same element and make them acts like the same screen

#

so, that is rather a trick question

#

I would say yesn't

restive crag
#

oh okay👍

hexed briar
#

this method is kinda buggy these days

#

since you're doing something what mojang wouldn't

restive crag
#

I'm confused why mojang wouldn't add horizontal scrollbars

#

it's pretty useful in some things

hexed briar
#

they can't I guess

#

the legacy devs left bedrock development and it looks like they can't do anything with json-ui without breaking them, only to add new stuff

restive crag
#

wait json ui is famous before?

hexed briar
#

i.e those 2 new element type that uses [ or ] keys to switch images for some reason

hexed briar
#

though yeah json-ui exists since 1.2 or something i don't remember

restive crag
#

i remember json ui tools before but idk how to use it

hexed briar
#

they're modifiable since that day, though there's not ideally to modify since you can't almost do anything

#

expect only modify pre-game and couple of hotbar and just it

#

no fancy customized server forms or npc screen

#

those does not exist, even though they do people wouldn't be interested

restive crag
#

It's sad that json ui isnt popular

#

that much*

hexed briar
#

heavy modified UI packs like UIPack (pretty old though) was revolutionary back then

#

most people would really interested to see what new and how will it change to the game

#

and now look at today, there's too many of them and they're not interesting anymore

#

most UI packs would claim themselves "client" and that is ridiculous thing I ever heard.

restive crag
#

I hope ore-ui could make ui's popular since its easier

hexed briar
#

same events of render dragon existence

#

but at the same time most would be interested how will it work

#

though ore-ui still wasn't data-driven, so that isn't happening anytime soon

unique swan
#

I was able to do this with titleraw, but I can't make spaces between them, how can I do it like this

tender flare
#
"furnace_selection": {
    "type": "panel",
    "size": ["100%", "100%"],

    "$flag_foundry": "§0§0§3",

    "controls": [
      {
        "[email protected]_screen_content": {
          "bindings": [
            {
              "source_property_name": "(not (($container_title - $flag_foundry) = $container_title))",
              "binding_type": "view",
              "target_property_name": "#visible"
            }
          ],
          "controls": [
            {
              "label": {
                "type": "image",
                "texture": "textures/ui/background",
                "size": ["100%", "100%"]
              }
            }
          ]
        }
      },
      {
        "[email protected]_panel": {
          "bindings": [
            {
              "source_property_name": "(($container_title - $flag_foundry) = $container_title)",
              "binding_type": "view",
              "target_property_name": "#visible"
            }
          ]
        }
      }
    ]
  }

why are both screens shown on top of each other? this does work for server_forms for example

restive crag
#

Guys how would I go adding new element in the server forms?

#

I tried adding it in some form controls but they all didn't work well or unless i did it wrong.

dusty ether
#

( don't know how to fix it. My dialog_hollow 3 or 4 wont work and I really don't know what to do

#

I've reverted so much code, deleted files, etc.

unique swan
#

How can I put a space between titleraw?

grizzled crypt
#

that’s just normal action form

rapid barn
#

where can I find documentation for '§z §1...'

#

regex :v

grizzled crypt
#

dont think u can do regex in json ui

#

also '§z §1...' isnt regex thats just color codes

last pollen
grizzled crypt
#

only to a certain extent

#

script api

#

world.beforeEvents.chatSend then if message matches something run the command kick on them

rapid barn
grizzled crypt
#

idk??

#

yes, then get the sender

#

then run a command on them

#

/kick @s and a reason if u want

#

what?

#

not sure u have to for loop through it

#

just test if banned includes message

#

move to #1067535382285135923

opal aurora
restive crag
#

Is there a similar thing in json ui that works like slice()??

grizzled crypt
#

javascript regex != a string - a string

opal aurora
#

basic operators for strings

restive crag
opal aurora
#

???

#

it's me

nimble mortar
hexed briar
#

wrong chat?

#

#1067535382285135923

undone marsh
#

Why when my anchor is bottom_right the element renders on top_right in a stack_panel

undone marsh
vocal urchin
#

Is there a way to put player paper doll on screen but only the Armor is visible that the player is wearing??

last pollen
#

Nooe

#

Nope

vocal urchin
#

Oh ok thx

last pollen
vocal urchin
#

Ok

undone marsh
hexed briar
undone marsh
#

?

hexed briar
#

a response for pinging me

last pollen
#

This guy accepts pings

#

I think

#

Sorry

#

For the ping

undone marsh
hexed briar
#

pinging me with no reason is sometimes definitely not okay for me but I don't really mind and send the car picture anyways.

last pollen
dusky hornet
#

is json ui hard?

undone marsh
#

Needed help with something

hexed briar
#

you didn't even specify anything.

#

and secondly, I'm too busy.

#

next time, don't ping random person

obsidian crest
#

i unironically love pings

obsidian crest
restive crag
#

@obsidian crest @obsidian crest

dusty ether
#

weird ahh game

mystic heart
hasty hamlet
#

hi experts, what is the best element to use to render a custom HUD?
I was using actionbar text so far, which works good and have a better performance than title, but the system itself have many vanilla messages that is fired when you do some action, like ridding horses, boats, etc, and when this happen it flicker a bit the HUD because of the different message.

is there any other option or better way to fix it? is it possible to disable any vanilla messages from actionbar and let only the custom one?

hasty hamlet
#

also is there any more intelligent way to do this variable for conditional sizing? json { "requires": "((('%.51s' * $atext) - ('%.48s' * $atext)) = 98)", "$size": ["98%", "100%"] }, { "requires": "((('%.51s' * $atext) - ('%.48s' * $atext)) = 99)", "$size": ["99%", "100%"] }, { "requires": "((('%.51s' * $atext) - ('%.48s' * $atext)) = 100)", "$size": ["100%", "100%"] }

hasty hamlet
#

I m using variables to define the size

#

but in a percentil 1-100 I have to define the line for all possibilities, I wanted to make something shorther, like 1 line and done if possible

normal moat
#

no other ways, you have to detect actionbar.

broken trail
#

performance: 💀

left yew
#

"Performance is never needed"

hexed briar
#

it should be fine as long you have the element factory/reloader e.g actionbar and title

hasty hamlet
#

I havent noticed any performance degradation with the variables, I decided to make like this because using a single "texture" with lots of different images was flickering every time the bar changed the value, like it was still downloading the image, after the first time it downloaded the image everything get smoothly, but it was annoying to see it flickering, so using a single image with the variables it was just perfect, the only problem now is these 100 lines of variables, that is why I wanted to check if there is a better way to do it

dusty ether
#

I added some code to template_dialogs and changed the panel background and name ( multiple panels for multiple titles/pages ) and for some reason it just doesn't load the new background. Not sure how much code in template_dialogs or ui_common I have to change

#

it threw an error though

#
[UI][error]-UI Control: long_form | UI Control: zappy_form | UI Control: common_panel | UI Control Key: bg_image@$dialog_background | UI control reference not found: 'page_E_dialog_background_hollow_3'

[UI][error]-UI Control: long_form | UI Control: zappy_form | UI Control: common_panel | ----------------------------------------------------
Unknown properties found in def[bg_image] from namespace[common]
- Unknown property [layer]
----------------------------------------------------
restive crag
dusty ether
#

added the bottom code

#

copy of dialog background 3 but with new file name (prefix: "custom_")

#

and

restive crag
dusty ether
#

yes I want the custom_dialog_background_hollow_3 on the new form

#

last time I was adding a lot of new elements in ui_common and everywhere that it broke all the forms and stuff but I don't know how simple it is

restive crag
#

what?

dusty ether
#

custom_... is my new texture

#

a copy of the original form background, dialog_background_hollow_3

restive crag
#

You could do "$custom_background": "namespace.img_element"

dusty ether
#

well I tried something like that

#

maybe this?

#

common_dialogs.page_E_dialog_background_hollow_3

restive crag
#

Try it

#

also why there's no type?

dusty ether
#

but other things say "[email protected]_panel": { "$dialog_background": "dialog_background_hollow_4" } and such

#

without namespace.

restive crag
#

huh

#

I'm confused

dusty ether
#

but what I'm saying is other parts of the code that define the dialog_background" don't use namespace

restive crag
dusty ether
#

oh carp

#

it opened 2 backgrounds

#

this is after I removed the namespace

#

with the namespace, no error but it duplicates the background and moves the title and all that

#

oh

#

wait

restive crag
dusty ether
#

I think I know, 1 sec

#

I should define "page_E_dialog_background_hollow_3" in ui_common

#

that's new

#

\bazinga

#

but I need to fix the black background

restive crag
#

It looks new

dusty ether
#

I made the dynamic button panel a grid, and edited a few things

#

Moved the body text slightly

restive crag
dusty ether
#

just want to figure out multiple form pages and such

restive crag
#

Dog water test

dusty ether
#

instead of every form changing

#

those are just random names from a-i

restive crag
dusty ether
#

Kinda

#

not "at once" but just changing the way the forms look based on title

dusty ether
restive crag
#

Title based forms

dusty ether
#

yes

#

so the plan is I can have like little title names that define what form to show

#

or

restive crag
#

Ye

dusty ether
#

idk

restive crag
#

Your design is pretty cool

dusty ether
#

thank you

#

I need to figure out something else if I wanted to put dynamic titles tho

#

such as a player profile

#

I don't know if a prefix is possible

restive crag
#

I'm having trouble of adding new elements to server forms

#

It doesn't work as expected

dusty ether
#

I haven't even tried that yet

restive crag
dusty ether
#

ah I see

#

I'm assuming you just add new elements to the scrolling_panel?

dusty ether
#

no I'm asking how you add new elements

restive crag
#

I tried adding it in long_form_dynamic_buttons_panel which is really dumb and definitely didn't work

dusty ether
#

the buttons panel is for... buttons

restive crag
restive crag
dusty ether
#

long_form_dynamic_buttons_panel is for buttons

restive crag
#

Ye💀

dusty ether
#

scrolling panel would be the best place to put it, possibly

dusty ether
#

long_form_scrolling_content

restive crag
#

Oh ok

zinc charm
#

can someone help me? why this code doesn't work?

  "$atext": "$actionbar_text",
  "ignored": "(not(($atext - 'test') = $atext))"
}```
dusty ether
#

is $atext a variable? or is it $text

zinc charm
restive crag
#

It's not js

dusty ether
#

variable isn't js exclusive

zinc charm
#

"ignored" doesn't seen to work at all

#

don't know why

dusty ether
#

have you tried "controls"?

zinc charm
#

nope

dusty ether
#

it'd be a little longer but it may work

restive crag
#

try bindings

dusty ether
#

yea bindings

zinc charm
#

i think it's broken or something like that

zinc charm
dusty ether
#

now how do I change the size of the black background to forms....

zinc charm
#

you need to add one

restive crag
#

it has

dusty ether
#

no it does

#

the "control" texture set to 0.8 alpha

zinc charm
restive crag
dusty ether
#
"dialog_background_hollow_common@common_dialogs.dialog_background_common": {
  "layer": 2,
  "$fill_alpha|default": 0.8,
  "$dialog_background_texture|default": "textures/ui/control",
#

I duplicated this and now I need to change the size of the background somehow

restive crag
#

Ohh 👍

zinc charm
#

i think the problem it's with both "visible" and "ignored"

#

🕊️

restive crag
dusty ether
#

np, just read through the code and try to figure out what it says and then you'll figure out everything

mortal monolith
#

Using font_scale_factor

nimble jungle
#

It goes for the label

frank bay
#

there is a way to remove a player Health bar how
and the food and shield and xp bar

frank bay
#

anyone

dusty ether
#

try looking

#

there's a player hud file

#

there's resources for hearts and etc.

dusty ether
#
"buttons_panel": {
    "type": "stack_panel",
    "orientation": "vertical",
    "size": [ "30%", "50%" ],
    "anchor_from": "bottom_middle",
    "anchor_to": "bottom_middle",
    "controls": [
      {
        "respawn_button@common_buttons.light_text_button": {
          "size": [ "100%", 26 ],
          "$button_text": "deathScreen.respawn",
          "$pressed_button_name": "button.respawn_button",
          "bindings": [
            {
              "binding_name": "#respawn_enabled",
              "binding_name_override": "#enabled"
            },
            {
              "binding_name": "#respawn_visible",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
    ]
  },
#

add "$button_font_size". default is "normal"

vocal urchin
#

Not a place to ask the question, but does anyone knows how to remove entity shadow? When I ask in other chats they don't answer the question

vocal urchin
#

Thx

unique swan
#

When you click on the form button, it turns green, how can I change it?

green grail
hexed briar
#

@low pawn hey uh don't break this server rules by literally dm'ing random people for help. thanks

#

and also don't join my discord server order to bypass "message requests" too.

#

It's not cool.

#

don't make me disable DM all together because of that.

unique swan
#

@normal moat i made a json ui, when i click the button, the button turns green, how can i turn it off?

normal moat
#

uhhh don't ping random people

normal moat
unique swan
#

how can i turn it off?

normal moat
#

You can't turn it off. You can change the texture.

unique swan
#

hmm, do you have a chance to write the code?

normal moat
#
"$default_button_texture": "path/to/texture",
"$pressed_button_texture": "path/to/texture",
"$hover_button_texture": "path/to/texture"
#

I hope you understand basic JSON UI.

unique swan
#

Also, I want to delete the background of the button so only the text is visible. It's not possible, is it?

normal moat
#

Make the button texture invisible/alpha 0

unique swan
#

i do it doesn't work $default_button_texture": i try it doesn't work

normal moat
#

Show code

unique swan
#

@normal moat can i send you a dm?

normal moat
#

yeah

sturdy pewter
#

Code:

"form_button": {
          "type": "button",
          "default_control": "default",
          "hover_control": "hover",
          "pressed_control": "pressed",
          "sound_name": "random.break",
          "bindings": [
            {
              "binding_type": "collection",
              "binding_condition": "none",
              "binding_collection_name": "form_buttons"
            },
            {
              "binding_type": "collection_details",
              "binding_collection_name": "form_buttons"
            },
            {
              "binding_name": "#form_button_text",
              "binding_type": "collection",
              "binding_collection_name": "form_buttons"
            },
            {
              "binding_type": "view",
              "source_property_name": "(not (#form_button_text = ''))",
              "target_property_name": "#visible"
            }
          ],
          "controls": [
            {
              "default": {
                "type": "image",
                "size": [
                  64,
                  64
                ],
                "texture": "textures/ui/Black",
                "color": "white"
              },
              "hover": {
                "type": "image",
                "size": [
                  68,
                  68
                ],
                "texture": "textures/ui/Black",
                "color": "white"
              },
              "pressed": {
                "type": "image",
                "size": [
                  64,
                  64
                ],
                "texture": "textures/ui/Black",
                "color": "white"
              }
            }
          ]
        }
#

There are 2 invisible buttons and i dont quite understand why.

#

And they are clickable and do the sound

lost crescent
#

does anyone have a basic jsion ui template

#

trying to make something like this

#

actually like this

valid spoke
#

Hey ! Does anyone know how to interract with grids ? Even though I specify my grid to be 4 rows and 2 columns, it makes me something like this ??

lost crescent
#
 "namespace": "start"
"blank_element": {
    "size": [
        0.9
    ]
}
fierce cedarBOT
#
Critical error:

Unsupported language: json

waxen coral
#

Someone know how to make crafting table 1x1 because I want similar in stonecutter

marsh wing
#

Hello, I really need some help with adding some of the missing minecraft settings into the pvp pack I am making!

#

Does anyone and I mean anyone know how?

restive crag
#

What element does control the close button in server forms?

normal moat
normal moat
normal moat
#

yeah

lost crescent
restive crag
#

garage monkey

median spoke
#

Is there a data we can get from the elements generated using grid which we can then use for animation timings, so that the second element will have a slightly delayed start than the 1st. Kinda like the heart animation when you have the regeneration (?) effect

median spoke
waxen coral
normal moat
# median spoke How do I use that? Can you share any examples?

You can assume collection_index as the number given to each element of a collection in a order.

{
  "test": {
    "type": "stack_panel",
    "orientation": "vertical",
    "size":[20, "100%c"],
    "layer": 31,
    "collection_name": "inventory_items",
    "controls": [
      {
        "1@slot_template": {
          "collection_index": 0
        }
      },
      {
        "2@slot_template": {
          "collection_index": 1
        }
      },
      {
        "3@slot_template": {
          "collection_index": 2
        }
      }
    ]
  }
}

In the given example, we are only editing the first 3 slots of the inventory. collection_index -> 0, 1, 2

median spoke
normal moat
#

Yeah

normal moat
median spoke
# normal moat Yeah

Ok, I think I got it. Btw, why are these in control of the stack panel instead of the actual grid?

normal moat
#

#old-json-ui message

waxen coral
restive crag
normal moat
#

idk maybe persona_screen

restive crag
#

is there a border-radius thingy in json ui that makes element corners rounded?

hexed briar
#

nope

restive crag
#

sad

valid spoke
#

Is it possible to control a certain element of a grid ?

#

For example, I have a grid of multiple slots, is it possible to make the 3rd slot bigger ?

median spoke
#

Or this
#1067870274894172260 message

valid spoke
median spoke
valid spoke
#

Ok so the index is set automatically in a grid

#

My question being how to use it ?

#

Like if I want to modify the properties of the slot with the index 5, how do I do it ?

valid spoke
#

My game's crashing 😅

hexed briar
#

uh

valid spoke
#

Oh shit

#

Maybe I forgot the index lmao

past stirrup
hexed briar
#

do you have chest_grid_item element on this thing

#

common crashes by that is of course missing elements

valid spoke
#

Yes ?

hexed briar
#

iirc

valid spoke
#

I'm editing the chest screen

hexed briar
#

having index or not shouldn't crash the game.

#

It just gonna fallback to 0 (index) as default.

valid spoke
#

I have first this

#

And then the game's crashing

hexed briar
#

so basically the UI can't find element or detect the collection

#

lemme check for moment.

valid spoke
#

It seems weird to me that an element can control itself ?

#

When I completely delete the controls property, it works just fine

rancid pollen
#

how to delete it

hexed briar
#

just checked

hexed briar
#

that might uh, cause some bugs or crashes

#

so, don't do that

valid spoke
#

Like increasing the size of the 3rd slot only ?

hexed briar
#

replace it to chest.chest_grid_item instead and try

#

actually nevermind

valid spoke
#

Yup it crashes x)

hexed briar
#

just realized you don't do that with grid

#

so uh, can't help without trial and error myself

#

look on #1067869374410657962 forums or check and search by in #old-json-ui

hexed briar
#

you can replace slot_template to chest.chest_grid_item` and change to correct collection_name

#

another than that, can't help without trial and error.

valid spoke
#

Would the chest still work ?

hexed briar
#

uh no

#

don't change to grid

#

since grid expecting another element specially the grid_item_template property

#

adding another grid can cause crashes because of uh, loopings

valid spoke
#

No I mean

hexed briar
#

though, stack_panel would work familiarly with grid, since it's stacks element just like grid, use the appropriate size and you should able to get what you desired to.

valid spoke
#

the origin element

restive crag
valid spoke
#

Like

#

I have this

#
    "type": "grid",
    "size": [ 69, 60 ],
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "grid_dimensions": [ 3, 3 ],
    "grid_item_template": "chest.chest_grid_item",
    "collection_name": "container_items"
  },```
#

I would have to change this type to stack panel ?

#

That's the grid on the chest's slots

hexed briar
#

yeah, you might also have to get rid of grid_dimensions and grid_item_template

#

then use control array like what you did.

#

should work

valid spoke
#

would I be able to put items in the slots by doing that ?

hexed briar
#

yeah

#

It works on mine before probably many months ago so why not

valid spoke
#

wait a second

#

I'm gonna try

hexed briar
#

what are you trying to do though

#

oh nevermind I saw

valid spoke
# hexed briar oh nevermind I saw
    "type": "stack_panel",
    "size": [ 69, 60 ],
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "collection_name": "container_items",
    "controls" : [
      {"[email protected]_grid_item" : {
        "size" : [ 24 , 24 ]
        }
      }
    ]
  },```

Something like that ?
#

oups

#

without the collection name property

hexed briar
#

Yeah, put index on it too.

valid spoke
#

of course

hexed briar
#

it should output only one slot since you only have one element on that thing

#

so, duplicate it more.

#

and add up index.

#

after that you should have what you wanted.

valid spoke
#

so there we go

hexed briar
#

select your appropriate slot element, and you can setup customized one from there

#

the maximum slots I think is 0 to 26 indexes.

#

( for small chest only since you've picked small chest ones )

valid spoke
#

Sooo it works

#

I'm gonna try with 2

#

it works fine !!

#

Thank you very much !

rancid pollen
restive crag
#

I would suggest using custom emojis instead of symbols since some of them are not supported

limber quartzBOT
valid spoke
#

@hexed briar I have a new problem, maybe you'll have an idea

#

The offset property of stack_panel's child element is useless, right ?

#

I can't move them how I like

#

Would it still work work with a normal panel ? It doesn't seems so

#

Also, with this method, I think I can only make one row or one column

hexed briar
#

you can use something like this stack_panel > panel (control array) > element

#

so you can use offset directly in stack_panel.

pallid arrow
#

Hello

#

can anyone help me with this

#

I need that when the binding is "true" it determines a variable for true, and if it is false, it determines it for false

#
         {
            "[email protected]":{
                "$va":"body",
               "bindings":[
                  {
            "binding_type":"view",
            "source_control_name":"mod_menu",
            "source_property_name":"#toggle_state",
            "target_property_name":"#visible"
                  }
               ]
            }
         },
         {
            "[email protected]":{
               "$va":"none",
               "bindings":[
                  {
            "binding_type":"view",
            "source_control_name":"mod_menu",
            "source_property_name":"(not #toggle_state)",
            "target_property_name":"#visible"
                  }
               ]
            }
         }
}
#

I did that, but it doesn't work as I want, it needs to be the same element, it can't be 2

valid spoke
#

It doesn't seems to work

#
"small_chest_grid": {
    "type": "stack_panel",
    "size": [ 10, 60 ],
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "orientation": "horizontal",
    "controls" : [
      {"testpanel" : {
        "type" : "panel",
        "controls" : [
          {"[email protected]_grid_item" : {
              "size" : [ 26 , 26 ],
              "$cell_image_size": [ 26, 26 ],
              "collection_index": 0,
              "offset" : [ 26 , 0 ]
              }
            },
            {"[email protected]_grid_item" : {
              "size" : [ 26 , 26 ],
              "$cell_image_size": [ 26, 26 ],
              "collection_index": 1,
              "offset" : [ 52 , 0 ]
              }
            },
            {"[email protected]_grid_item" : {
              "size" : [ 26 , 26 ],
              "$cell_image_size": [ 26, 26 ],
              "collection_index": 2,
              "offset" : [ 78 , 0 ]
              }
            },
            {"[email protected]_grid_item" : {
              "size" : [ 26 , 26 ],
              "$cell_image_size": [ 26, 26 ],
              "collection_index": 3,
              "offset" : [ 104 , 0 ]
              }
            },
            {"[email protected]_grid_item" : {
              "size" : [ 26 , 26 ],
              "$cell_image_size": [ 26, 26 ],
              "collection_index": 4,
              "offset" : [ 130 , 0 ]
              }
            }
          ]
        }
      }
    ]
  },```
hexed briar
#

not like that

#

actually nevermind

#

you don't even have the collection_name

valid spoke
#

It worked fine without when I was using only a stack panel

hexed briar
#

for those to work properly and intended?

valid spoke
hexed briar
#

that panel element

valid spoke
hexed briar
valid spoke
#

i don't have the need to set one, do I ?

#

Ok so

hexed briar
#

you need one for every slots to work

valid spoke
#

Well

hexed briar
#

yeah but change the value to "container_items"

valid spoke
#

like if i put an iron ingot in one slot

#

all the 5 slots are filled with the iron ingot

#
"small_chest_grid": {
    "type": "stack_panel",
    "size": [ 10, 60 ],
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "orientation": "horizontal",
    "collection_name" : "teststackpanelname",
    "controls" : [
      {"testpanel" : {
        "type" : "panel",
        "collection_name" : "container_items",
        "controls" : [
          {"[email protected]_grid_item" : {
              "size" : [ 26 , 26 ],
              "$cell_image_size": [ 26, 26 ],
              "collection_index": 0,
              "offset" : [ 26 , 0 ]
              }
            },
            {"[email protected]_grid_item" : {
              "size" : [ 26 , 26 ],
              "$cell_image_size": [ 26, 26 ],
              "collection_index": 1,
              "offset" : [ 52 , 0 ]
              }
            },
            {"[email protected]_grid_item" : {
              "size" : [ 26 , 26 ],
              "$cell_image_size": [ 26, 26 ],
              "collection_index": 2,
              "offset" : [ 78 , 0 ]
              }
            },
            {"[email protected]_grid_item" : {
              "size" : [ 26 , 26 ],
              "$cell_image_size": [ 26, 26 ],
              "collection_index": 3,
              "offset" : [ 104 , 0 ]
              }
            },
            {"[email protected]_grid_item" : {
              "size" : [ 26 , 26 ],
              "$cell_image_size": [ 26, 26 ],
              "collection_index": 4,
              "offset" : [ 130 , 0 ]
              }
            }
          ]
        }
      }
    ]
  },```
hexed briar
#

put collection name on every slots

#

and see if it work

#

I'ma go to sleep for now

valid spoke
hexed briar
#

yes

valid spoke
valid spoke
#

I have something like this

#

And it does the same thing, every slots are actually the same container

hexed briar
#

try to do something like that

"small_chest_grid": {
    "type": "stack_panel",
    "size": [ 10, 60 ],
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "orientation": "horizontal",
    "controls" : [
      {"testpanel" : {
        "type" : "panel",
        "controls" : [
          {"[email protected]_grid_item" : {
              "size" : [ 26 , 26 ],
              "$cell_image_size": [ 26, 26 ],
              "collection_index": 0,
              "offset" : [ 26 , 0 ]
              }
            }
          ]
        }
      },
      {"testpanel" : {
        "type" : "panel",
        "controls" : [
          {"[email protected]_grid_item" : {
              "size" : [ 26 , 26 ],
              "$cell_image_size": [ 26, 26 ],
              "collection_index": 1,
              "offset" : [ 26 , 0 ]
              }
            }
          ]
        }
      }
    ]
  },```
#

also

#

use "container_items", not "teststackpanelname" as a collection_name value

valid spoke
#

you meant a new panel for every slot

#

yeah I'm pretty sure it would work, you're right

valid spoke
hexed briar
#

teststackpanelname as collection_name does not exist

#

collection_name are for hardcoded stuff

valid spoke
#

I think I just have to not specify anything

#

in fact I do not really understand what the "collection_name" is

lost crescent
#

Any one know have a basic json ui template

valid spoke
#

but if I specify the collection name as anything else, it works

#

I really don't understand lmao

valid spoke
#

Does the same thing, every slots are actually the same

valid spoke
#

Well, I found a way to do what I want, it's really messy but it works

normal moat
# valid spoke Well, I found a way to do what I want, it's really messy but it works

u did it wrong, this will work ->

"small_chest_grid": {
    "type": "stack_panel",
    "size": [ 130, 26 ],
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "orientation": "horizontal",
    "collection_name" : "container_items",
    "controls" : [
          {"[email protected]_grid_item" : {
              "size" : [ 26 , 26 ],
              "$cell_image_size": [ 26, 26 ],
              "collection_index": 0
              }
            },
            {"[email protected]_grid_item" : {
              "size" : [ 26 , 26 ],
              "$cell_image_size": [ 26, 26 ],
              "collection_index": 1
              }
            },
            {"[email protected]_grid_item" : {
              "size" : [ 26 , 26 ],
              "$cell_image_size": [ 26, 26 ],
              "collection_index": 2
              }
            },
            {"[email protected]_grid_item" : {
              "size" : [ 26 , 26 ],
              "$cell_image_size": [ 26, 26 ],
              "collection_index": 3
              }
            },
            {"[email protected]_grid_item" : {
              "size" : [ 26 , 26 ],
              "$cell_image_size": [ 26, 26 ],
              "collection_index": 4
              }
            }
    ]
  }
valid spoke
#

the problem is that I can only put all my slots on one row or one column with this method

normal moat
#

You can use grids if you want more columns/rows

valid spoke
#

So what I did was putting multiple horizontal stack panels into one vertical stack panel

#

Soo it looks like this now, I'm pretty happy with it

#

Also, is it possible via the ui to make the player unable to put items in a slot ? Like on the furnace output slot, for example

normal moat
#

probably some work with button mappings

#

or you can "enabled": false

valid spoke
clever maple
#

what is the npm for json ui?

nimble mortar
#

how can i put the categories on my custom table

soft gorge
#

i'm having issues trying to understand how bindings work through /title
what exactly is being used to tell whether /title has something for the element?

#

intro to json UI mentions $actionbar_text, but does not show where this is declared or where there is a binding

soft gorge
#

and if we're forced to use these variables, how do we make the title bars at least not pop up?

#

oh I think I'm understanding now

hexed briar
#

h

restive crag
#

h

last pollen
#

h

broken trail
soft gorge
#

Json UI makes me cry

#

I yearn for a Barotrauma-esque XML modding setup

#

and also it would be nice if there was bindings in another form

nimble mortar
#

👍

broken trail
#

table?

nimble mortar
last pollen
copper fractal
#

Hi

I want to cut out those three controls out of my chest_panel

{
                    "[email protected]_panel_bottom_half_with_label": {}
                  },
                  {
                    "[email protected]_grid_template": {}
                  },
                  {
                    "[email protected]_take_progress_icon_button": {}
                  }

I want to control it through the chest title
How to do so?

Entire Code

"[email protected]_panel": {
          "$root_panel_size|default": [
            176,
            220
          ],
          "size": "$root_panel_size",
          "layer": 1,
          "controls": [
            {
              "[email protected]_panel": {}
            },
            {
              "chest_panel": {
                "type": "panel",
                "layer": 5,
                "controls": [
                  {
                    "small_chest_panel_top_half@custom_scroll_screen.custom_scroll_panel_top_half": {}
                  },
                  {
                    "[email protected]_panel_bottom_half_with_label": {}
                  },
                  {
                    "[email protected]_grid_template": {}
                  },
                  {
                    "[email protected]_take_progress_icon_button": {}
                  }
                ]
              }
            },
            {
              "[email protected]_selected_icon_button": {}
            },
            {
              "[email protected]_cursor_button": {}
            }
          ]
        }
valid spoke
#

For the screen part

#

you make something like this

#
  "[email protected]_screen_common": {
    "$close_on_player_hurt|default": true,
    "close_on_player_hurt": "$close_on_player_hurt",
    "$customtitle": "Customtitle",
    "variables": [
      {
        "requires": "$desktop_screen",
        "$screen_content": "chest.small_chest_panel",
        "$screen_bg_content": "common.screen_background",
        "$screen_background_alpha": 0.4
      },
      {
        "requires": "$pocket_screen",
        "$screen_content": "pocket_containers.large_chest_panel"
      },
      { //test
        "requires": "($customtitle = $container_title)",
        "$screen_content": "chest.customsmall_chest_panel"
      }
    ]
  }```
#

Does anyone know if it's possible to conditionally render an element based on whether or not a slot contains an element?

copper fractal
#

Got it to work
Thank you very much 👌

dusty ether
#

How would you create some kind of secondary buttons that connect to the "parent" button or element kind of thing? I've seen some UIs that have different sections for body text/labels, buttons, etc. and even a list of elements with buttons for each. Is this possible in vanilla?

#

not inspiration but just an example of a complex ui:

#

this one definitely seems not possible in vanilla imo, and I think he's running a server because he has cmd prompt open? if any descendants are possible, that'd be cool

opal aurora
#

That is possible, using button texts

#

But it's hard to make

dusty ether
#

oh so you do like "(#button_text = "text_left")" and whatever to move them?

#

makes sense

#

well. do you have an idea for how they possibly have multiple body texts? such as the green, blue, and red all being different bodies?

opal aurora
#

and those buttons do nothing other than visualize them on screen

dusty ether
#

flags?

median spoke
#

Is it possible to make the stack panel to use both the horizontal and vertical space?

pallid arrow
#

How can I make a binding define the size of an element?

#
{
  "bg": {
    "texture": "textures/ui/screen_background",
    "type": "image",
    "fill": true,
    "layer": -1,
    "alpha": 0.65,
    "size": [
      "100%",
      "100%"
    ],
    "bindings": [
      {
        "binding_type": "view",
        "source_property_name": "(not #toggle_state)",
        "source_control_name": "menu",
        "target_property_name": "#visible",
        "size": [
          10,
          10
        ]
      }
    ]
  }
},
#

this is a exemple what I want, but I know it's not like that

#

it's possible?

median spoke
dusty ether
#

I don't know, I haven't ever seen collection_index yet

valid spoke
median spoke
young dune
#

where is the new ui textures for the create world menu located?

opal aurora
nimble mortar
#

u need that

restive crag
#

Is it possible to get scoreboard score from a specific objective?

nimble mortar
#

yes

#

show u're code

nimble mortar
#

and paste in you're code

#

it's a json ui file

#

it's in the ui of you're table

#

the same file

pulsar trench
#

Howwa people

#

Can someone help me find a Json-UI starter video?

#

I wanna make like a custom trading ui where u can see more items

limber quartzBOT
unique swan
#

How can I use 2 server_form.json files in the world?

#

Or can I combine?

valid spoke
unique swan
#

how can I do it?

valid spoke
unique swan
#

Can we talk in DM about this issue?

valid spoke
#

if*

#

If you want

unique swan
#

can you dm me please

hexed briar
#

h

forest path
#

i need help with a form issue

hexed briar
#

bru-

forest path
#

bruh

#

na fr anyone familiar with form

hexed briar
#

what's the issue though

forest path
#

the buttons in my custom form cant run on press through gametest

#

its undefined and closes right away

#

and its not a gametest issue

past stirrup
past stirrup
#

hmm, interesting

hexed briar
#

have you test the button by putting a warning thing on content log everytime you press the button?

#

try that, maybe that might help what's going on

past stirrup
forest path
#

it was cancelled

past stirrup
#

it’s definitely a jsonui thing

forest path
#

ya

hexed briar
#

did you press the button and the screen immediately closes or something?

forest path
#

ya

#

on regular form it works the custom no

hexed briar
#

I'm certainly sure that this isn't json-ui issues, since the screen does not close whenever the button is blank.

#

unless you put some button mappings on them aka putting close id or something

forest path
#

want me to send json

hexed briar
#

but I'm pretty sure broken button does not do that

forest path
#

because if i make it a regular form it works fine

hexed briar
#

sure I suppose.

forest path
#

then put the custom form on and it breaks

hexed briar
#

Where did the close button located?

forest path
forest path
hexed briar
#

nevermind I think I see the problem

#

your button does not have collection.

forest path
#

o damn

#

how do i fix that again

hexed briar
#

I think that might work

"bindings": [
            {
              "binding_type": "collection_details",
              "binding_collection_name": "form_buttons"
            }
          ]```
#

put that on button element in sdfsdf parent element thing

valid spoke
#

Hey ! Does anybody knows if it would be possible to like get the number of item placed in a certain slot ?

#

With bindings or variable, I don't know

#

Or at least if it's possible to know if there's an item in the slot or not ?

forest path
valid spoke
#

Same thing, with binding or variables

forest path
#

worked thanks

#

❤️

last pollen
forest path
#

working on cosmetics

unique swan
#

@hexed briar hello do you know how to combine jsons?

#

hi, i want to put 2 user interfaces in mcpe, how can i do it?

#

In the game, the user interface with the title A will open, then the user interface with the title E will open, how can I do it? can you help me with this?

hexed briar
#

busy atm

unique swan
#

@forest path can you help?

#

@hexed briar I don't understand?

hexed briar
#

I said I'm busy

#

I'd suggest not to ping me any further. thanks.

vocal urchin
#

Bedwars?

forest path
#

its a skygen realm project

#

just cosmetics

vocal urchin
#

Oh

unique swan
#

@forest path How can I combine 2 json ui?

forest path
#

of the same file? no idea

vocal urchin
#

Give me a example

forest path
#

mythic you can join vc if you want to talk im bord

vocal urchin
#

I don't want to reveal my voice, but I can watch

forest path
#

no worries

unique swan
#

I have 2 json ui files, I want to use them in mcpe, how can I do it?

#

@vocal urchin

young dune
#

First ever custom ui for me

#

spent all night on it 💀

vocal urchin
unique swan
#

@young dune do you know how to use 1 or more json ui in the world

#

@vocal urchin it takes 1 json ui not the other

young dune
#

im confused

forest path
vocal urchin
#

Means u want to like switch the packs while in the world like that?

unique swan
#

I threw the server_form.json file, I tried to add the 2.server_form.json to the ui file, it didn't work

young dune
forest path
#

😔

vocal urchin
young dune
#

rn im kinda basing it off of your old scoreboard ui for 5fs

forest path
#

o ya i forgot i made that

unique swan
#

@vocal urchin I'm not doing it again

vocal urchin
#

Give me the files I'll make it into one

unique swan
#

@vocal urchin okey

young dune
#

Alright now to sleep since i spent all night doing that

forest path
#

heres a better version of the sidebar

#

like the theme

vocal urchin
#

Can text labels be given an animation??? Pls answer anyone

unique swan
#

@vocal urchin dm

#

@vocal urchin I sent you a dm can you check it out?

valid spoke
#

Did you even watch it ?

unique swan
#

@valid spoke I watched my brother, it's not what I want, what I want is to build 2 json ui in the world

#

@valid spoke Only 1 server_form.json file goes to the ui file, I want to make 2 of them, it doesn't work.

valid spoke
#

Putting 2 differents "server form" in your RP will not make it works magically

unique swan
#

Is it possible to combine?

valid spoke
#

You want to make a form that uses the second json files if it has a specific title, right ?

unique swan
#

@valid spoke I want to use these in my world with different UI

unique swan
#

No

#

I will send you a video on dm, check it out

valid spoke
#

Soo what's your final goal ?

restive crag
#

Guys how do I get ore ui themed buttons?

valid spoke
#

speaking of that, has anyone the location of this folder ?

#

I keep forgetting it lmao

#

Oops nvm I just found it

grizzled crypt
#

@valid spoke

valid spoke
grizzled crypt
#

my folder is corrupt and i cant access it

valid spoke
grizzled crypt
#

the textures

valid spoke
grizzled crypt
#

yeah

valid spoke
vocal urchin
#

Can someone pls answer can text label be given animations?

opal aurora
#

yes

restive crag
#

can text label be given animations?

hexed briar
#

yes

gentle hemlock
#

Hello

#

Are there experts here who know how to change the input window in the form, or what is the name of its texture?

fierce cove
#

#1134152358113321031 please

acoustic ivy
#

is it possible to only change the size of a specific button that a specific label on it?

gentle hemlock
#

Who here is very well versed in JSON UI for the server (server_form.json) and willing to help me / do my simple little quirks for money?

limber quartzBOT
#
Finding a Team or Dev

This discord isn't suited for finding or offering paid work. We can't moderate these transactions, so we ask that you move to a more suitable place.

For a casual discord community, consider joining Skill Share: https://discord.gg/sZ7fkcN.

For more long-term contracts, consider visiting Bucket of Crabs: https://www.bucketofcrabs.net/

somber violet
#

Does anyone know where else I can learn JSON UI besides the Bedrock wiki?
Any youtube tutorials or something like that would be great.

gentle hemlock
# hexed briar this server isn't for hiring.

I need to do a lot of things, for example, add two buttons in different places (with a different color and size, that is, a different texture, a modified input, that is, an input field (in size and texture of a separate one), a dropdown with its own texture and another in size

#

how much is it

#

@hexed briar

normal moat
#

? ui video tutorial

limber quartzBOT
gentle hemlock
#

Who can do this and for how much? Connoisseurs

dusty ether
#

depends what you want done

vocal urchin
#

Can anyone help? My durability bar dosen't show

fathom bluff
gentle hemlock
#

Easily? Well, since it's so simple, I'm going to buy because I have no idea how to make a simple form with different buttons.

#

there will be people here who want to sell

hexed briar
gentle hemlock
#

ok, maybe you have this resource pack, for example with adding your own button?

#

with my texture, I mean, I have two such resource packs, but there is a lot of extra code

gentle hemlock
acoustic ivy
gentle hemlock
#

It looks like they won’t help you like me, you can’t buy here and you won’t get it for free...

acoustic ivy
#

i mean i asked help a lot of times and i got ghosted but thats how it works here tho

#

i've been here for 3 years, you either have to wait, or ask again

hexed briar
#

bro this isn't for hiring offer server jesus christ

#

you can't expect someone to answer json-ui questions immediately

acoustic ivy
#

exacly

hexed briar
#

we're not slaves.

gentle hemlock
#

sorry

#

I don't understand you

hexed briar
#

bros so salty over asking for offer that speaks in russian

#

for god sakes, go learn json-ui. it isn't really hard

#

There's wiki everywhere.

acoustic ivy
gentle hemlock
#

what do you have against Russians?

hexed briar
#

don't have anything against russians but you're insulting me in russian.

gentle hemlock
#

clear, no buy, no free, no logic and ok explanation for this even

hexed briar
#

how ridiculous you can be.

gentle hemlock
#

I wrote in Russian, maybe this is offensive to you, but I used a translator and maybe I offend you somehow, I don’t want to do this

hexed briar
#

they immediately deleted it so

gentle hemlock
#

i deleted it because you wouldn't understand it maybe not natural russian maybe partially

hexed briar
#

again, there's wiki for json-ui.

gentle hemlock
#

didn't mean to offend anyone

hexed briar
#

secondly, #1067869374410657962 is a forum, scroll down or maybe use search

#

and find what you wanted. maybe those were answers

gentle hemlock
#

but not for server_form

hexed briar
#

#1067869374410657962 were 75% for server_form.

#

There's also a tag for it

#

use that tag and look for already answered questions.

gentle hemlock
#

it's very hard to put together pieces of answers)

hexed briar
#

well there's nothing I can do with it.

gentle hemlock
#

Moreover, there is not always good code

#

It's clear

hexed briar
#

this is question related json-ui as a forum.

#

there'll be a no template for it.

#

so you gotta do on your own.

#

server_form is the most basic thing. so with little json acknowledge, you can start modifying it with ease.

#

again, there's wiki for it. so check it out.

acoustic ivy
hexed briar
#

what are you trying to do though

acoustic ivy
#

i just need to move the left and right some margin from the cam button

#

and change the size

#

i need the cam button to be longer and the side ones small

#

thats it

#

i know it has something to do with #form_button_text but since it's a hardcoded value i need to use binding or something but i suck at it

#

and i also know that you can use hardcoded values in the variables array

this one was a test

hexed briar
#

bindings and variables does not mix together.

acoustic ivy
#

ye

hexed briar
#

and also you might need to change a dynamic buttons into static button with index.

#

this way you can edit any button you want with ease and without using condition rendering.

acoustic ivy
#

how

hexed briar
#

though it's a chest but can help you understand how it works

#

you can change item slots into button and change collection name to server form's button

acoustic ivy
hexed briar
#

yeah

#

collection_name allows index to work properly so with this you can add any amount of buttons you want (max 20 for forms) and you can customize your button from there

#

aka making button number 2 larger while another buttons are small

#

or change button texture entirely for one specifically buttons

#

you can achieve what featured server does with this.

acoustic ivy
#

perfect

#

so technically this one should work

#

ok wtf

hexed briar
#

you haven't referenced the button template.

acoustic ivy
#

i probably forgot to replace

#

yeah

#

the slot_template with form_button which is the namespace of the server form button

hexed briar
#

If the element is in the same file as what you're modifying, namespace might not be required.

#

but if the element is outside of the file where you modifying, yeah that one must have namespace

acoustic ivy
#

hm

hexed briar
#

either way, might as well always have namespace in case of errors

acoustic ivy
#

still getting this

hexed briar
#

what's the form_button looks like

acoustic ivy
#
    "type": "stack_panel",
    "size": ["10%", 32],
    "orientation": "horizontal",
    "collection_name": "form_buttons",
    "controls":[
      {
        "1@form_button": {
          "collection_index": 0,
          "visible":false
        }
      },
      {
        "2@form_button": {
          "collection_index": 1
        }
      },
      {
        "3@form_button": {
          "collection_index": 2
        }
      },
      {
        "form_button@common_buttons.light_text_button": {
          "$pressed_button_name": "button.form_button_click",
          "anchor_from": "bottom_middle",
          "anchor_to": "bottom_middle",
          "size": [ "fill", 32 ],
          "$button_text": "#form_button_text",
          "$button_text_binding_type": "collection",
          "$button_text_grid_collection_name": "form_buttons",
          "$button_text_max_size": [ "100%", 20 ],
          "$focus_enabled|default": false,
          "focus_enabled": "$focus_enabled",
          "bindings": [
            {
              "binding_type": "collection_details",
              "binding_collection_name": "form_buttons"
            },
                        {
                            "binding_type": "view",
                            "source_property_name": "(not (#form_button_text = 'Cam 5'))",
                            "target_property_name": "#visible"
                        }
          ]
        }
      }
    ]
  },```
hexed briar
#

oh you can't reference stuff inside of control array.

acoustic ivy
#

hm

hexed briar
#

wait nevermind

acoustic ivy
hexed briar
#

you don't need to put condition rendering on that

acoustic ivy
#

?

hexed briar
#

your form button has condition rendering strings at bindings

#

remove that.

acoustic ivy
#

oh damn i just realized

#

i left it there

hexed briar
#

yeah it won't display if the string is that string

#

because the button is simply not visible

acoustic ivy
#
    "type": "stack_panel",
    "size": ["10%", 32],
    "orientation": "horizontal",
    "collection_name": "form_buttons",
    "controls":[
      {
        "1@form_button": {
          "collection_index": 0,
          "visible":false
        }
      },
      {
        "2@form_button": {
          "collection_index": 1
        }
      },
      {
        "3@form_button": {
          "collection_index": 2
        }
      },
      {
        "form_button@common_buttons.light_text_button": {
          "$pressed_button_name": "button.form_button_click",
          "anchor_from": "bottom_middle",
          "anchor_to": "bottom_middle",
          "size": [ "fill", 32 ],
          "$button_text": "#form_button_text",
          "$button_text_binding_type": "collection",
          "$button_text_grid_collection_name": "form_buttons",
          "$button_text_max_size": [ "100%", 20 ],
          "$focus_enabled|default": false,
          "focus_enabled": "$focus_enabled"
        }
      }
    ]
  },```
hexed briar
#

also I don't see collection_index either on form button

acoustic ivy
#

so i gotta add it on both?

#

or move the controls to form_button

hexed briar
#

smh

#

I knew it won't go anywhere so here

#
"dynamic_button": {
    "type": "stack_panel",
    "size": ["10%", 32],
    "orientation": "horizontal",
    "collection_name": "form_buttons",
    "controls":[
      {
        "1@custom_form_button": {
          "collection_index": 0
        }
      },
      {
        "2@custom_form_button": {
          "collection_index": 1
        }
      },
      {
        "3@custom_form_button": {
          "collection_index": 2
        }
      }
    ]
  },
  "custom_form_button@common_buttons.light_text_button": {
    "$pressed_button_name": "button.form_button_click",
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "size": [ "fill", 32 ],
    "$button_text": "#form_button_text",
    "$button_text_binding_type": "collection",
    "$button_text_grid_collection_name": "form_buttons",
    "$button_text_max_size": [ "100%", 20 ],
    "bindings": [
      {
        "binding_type": "collection_details",
        "binding_collection_name": "form_buttons"
      }
    ]
  },```
#

The dynamic_button is stack_panel type so size may not work just yet

#

if you want fully customize it, you can change it to panel type.

#

be warned that button will no longer be stackable, keep that in mind.

#

so you gotta use offset for every buttons or use anchors to place it somewhere without them overlapping each others

#

I cannot guarantee whenever this gonna work or not because I have never tried modifying server forms so keep that in mind too.

#

but this should be example of how index buttons or static buttons should work.

acoustic ivy
#

i see, something changed tho

hexed briar
#

so basically you got it working

#

also remove the visible property in 1 element

#

make the collection_index higher number everytime you cloned one

hexed briar
#

aka

...
  {
    "4@custom_form_button": {
       "collection_index": 3
    }
  },
  {
    "5@custom_form_button": {
       "collection_index": 4
    }
  },
  {
    "6@custom_form_button": {
       "collection_index": 5
    }
  },```
acoustic ivy
#

i think that duplicates

#

for each index it add 3 more

hexed briar
#

Change the dynamic button size

acoustic ivy
#
"dynamic_button": {
    "type": "stack_panel",
    "size": ["10%", 32],
    "orientation": "horizontal",
    "collection_name": "form_buttons",
    "controls":[
      {
        "1@custom_form_button": {
          "collection_index": 0
        }
      }
    ]
  },
  "custom_form_button@common_buttons.light_text_button": {
    "$pressed_button_name": "button.form_button_click",
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "size": [ "fill", 32 ],
    "$button_text": "#form_button_text",
    "$button_text_binding_type": "collection",
    "$button_text_grid_collection_name": "form_buttons",
    "$button_text_max_size": [ "100%", 20 ],
    "bindings": [
      {
        "binding_type": "collection_details",
        "binding_collection_name": "form_buttons"
      }
    ]
  },
hexed briar
#

it's 10% so it gonna look like that for some reason

acoustic ivy
#

yeah bit in general each index will add 3 buttons

hexed briar
#

perhaps remove the bindings in custom_form_button

acoustic ivy
#

sure

hexed briar
#

I think I can see the problem

#

change dynamtic_button to long_form_dynamic_buttons_panel instead

acoustic ivy
#

alright

#

wouldnt it conflict with this one?

hexed briar
#

this element creates factory and therefore may duplicate depends on how many buttons you have on forms

#

so yeah perhaps.

#

actually put "factory": {} on that too

acoustic ivy
#
    "type": "stack_panel",
    "size": ["10%", 32],
    "orientation": "horizontal",
    "collection_name": "form_buttons",
    "controls":[
      {
        "1@custom_form_button": {
          "collection_index": 0,
          "visible":false
        }
      },
      {
        "2@custom_form_button": {
          "collection_index": 1
        }
      }
    ],
    "factory":{
      "name": "buttons",
      "control_name": "server_form.dynamic_button"
    }

  },
  "custom_form_button@common_buttons.light_text_button": {
    "$pressed_button_name": "button.form_button_click",
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "size": [ "fill", 32 ],
    "$button_text": "#form_button_text",
    "$button_text_binding_type": "collection",
    "$button_text_grid_collection_name": "form_buttons",
    "$button_text_max_size": [ "100%", 20 ],
    "$focus_enabled|default": false,
    "focus_enabled": "$focus_enabled"
  },```
#

like this

hexed briar
#

yeah but the factory property

#

just "factory": {},

acoustic ivy
#

idk if now it's working

#

technically i put visibility on the first button so it's not working

gentle hemlock
#

@hexed briar, can you help me? I need the simplest form, just with one button and a definition through "source_property_name", as I understand it, if you make certain conditions, then if there is such a name, then the desired form is executed

#

from a large amount of code in my forms that I have, it is very difficult to figure it out and it is difficult to simply separate their personal code

#

😕

hexed briar
#

maybe [ 64, 32 ] something like that

acoustic ivy
#

same issue

hexed briar
#

put sizes on each 1 or 2 element

acoustic ivy
#

same thing again

#

i think the collection index is not working

hexed briar
#

what's the code looks like

acoustic ivy
#

okay fixed

#
    "type": "stack_panel",
    "size": ["10%", 32],
    "orientation": "horizontal",
    "collection_name": "form_buttons",
    "controls":[
      {
        "1@custom_form_button": {
          "collection_index": 0,
          "size": [ "10%", 32 ]
        }
      },
      {
        "2@custom_form_button": {
          "collection_index": 1,
          "size": [ "10%", 32 ]
        }
      }
    ],
    "factory":{
    }

  },
  "custom_form_button@common_buttons.light_text_button": {
    "$pressed_button_name": "button.form_button_click",
    "anchor_from": "bottom_middle",
    "anchor_to": "bottom_middle",
    "size": [ "10%", 32 ],
    "$button_text": "#form_button_text",
    "$button_text_binding_type": "collection",
    "$button_text_grid_collection_name": "form_buttons",
    "$button_text_max_size": [ "100%", 20 ],
    "$focus_enabled|default": false,
    "focus_enabled": "$focus_enabled"
  },```
hexed briar
#

fixed?

acoustic ivy
#

i mean that it's not big anymore

#

but still

hexed briar
#

yeah I think there's nothing I can do without me actually messing around with server form

#

Which something I never done before since I don't really know how to use script-api for it

valid spoke
#

Hey, does someone knows if it's possible to make ore-ui-like buttons/toggles ?

#

The best I could do is to make the texture, however I have no idea on how to make the content of the button (text or image) shift, like it does in the ore-ui

valid spoke
normal moat
#

Yeah, you can make them.

gentle hemlock
#

not work add button

valid spoke
gentle hemlock
#

can anyone help me?

gentle hemlock
normal moat
gentle hemlock
#

Experts, can you help me please?

gentle hemlock
#

if I press the button itself, then there is not even a sound, if there is