#JSON-UI General
1 messages · Page 33 of 1
Ahh sorry I didn't check what you replied lol
WTF YOU SAYING MAN?
are you high?
hi
Wtf is those emoji's
what is wrong with it 👀
Can we make the inventory button in touch devices be resized?
I mean, it's in there but I'm not so sure if you can
yep
{
"item_details": {
"type": "custom",
"renderer": "hover_text_renderer",
"allow_clipping": false,
"bindings": [
{
"binding_type": "collection",
"binding_collection_name": "form_buttons",
"binding_name": "#form_button_text",
"binding_name_override": "#hover_text"
}
]
}
}
how do i make it lang compatible?
is it even possible?
I think if you use RawText in form button text (form.button()), it'll automatically translate to your #form_button_text inside UI
i will check
but i guess it wont
nah
doesnt work
like this?
.button({ rawtext: [{ translate: 'tile.lg:block.name' }] });
well
i got another issue
{
"default": {
"type": "custom",
"renderer": "inventory_item_renderer",
// "property_bag": {
// "#item_id_aux": 48627712
// },
"bindings": [
{
"binding_name": "#form_button_texture",
"binding_type": "collection",
"binding_collection_name": "form_buttons"
},
{
"binding_type": "view",
"source_property_name": "(#form_button_texture * 1)",
"target_property_name": "#item_id_aux"
}
]
}
}
it wont render. As far as i know. the source property name doesnt work
i tested the source property name and it did not display when i used it on a label
when i use the property bag it works
this is the same thing I use for chest ui but it works.
Try adding size [16, 16] in it and check if you're passing the id correctly
i think it is something up with the id passing
becuase because property bag is working just fine
when i try passing the id to my label
label disappears
but i have no clue why
you mean the renderer?
by label, you mean this right?
i mean a label to test out the id passing
both dont show up when i use this binding
must be this, if property_bag works fine
"source_property_name": "('§z' + #form_button_texture)" this in my binding?
for your label, yes.
for your renderer, multiply by 1
nope
the hover text works, but the label on top of the banner doesnt
(the banner rendering doesnt work aswell)
yeah
but i changed it to my texture
but it doesnt really matter
the rendering doesnt work
even tho i use the correct property name
You can probably check your script and bindings and change some small things. or you can send your label here if you can so I can check
everything works but the rendering binding
label was for testing
and it displays now (a string integer)
but the rendering doesnt work
even tho i multiply it by 1
what rendering?
the banner
the texture?
you mean the item renderer is not working?
yes
😕
so it is passing correctly?
sorry im dumb for asking many ques
welp, now I have no idea
try somehting like this->.button("click", "20054016")
try to do something and change small things again and again till it works (that's how json ui works lol)
this is crazy
netherite ingot does not work
but this works
wtf
Do you know correct ids?
i tested the netherite id using the property bag
and it worked
using bindings it didnt
weird
true
https://github.com/Herobrine643928/Chest-UI/blob/main/BP/scripts/extensions/typeIds.js
reference from this list
json ui is weird 😭
fr
@weak cape If you're using these aux ids for your map/addon, I don't recommend it. These change every update if new item/block is added or your addon has custom items
yup
i just realised it was a bad idea
all that work for nothing
yeah
is it possible to add an extra slot in the inventory?
nop
I mean, yeah you can but it'll not show on player's inventory
How does someone just casually make a map without an api available for maps😭
It is possible that depending on the name of the entity you have a custom BOSS bar
Hi everyone
How i can get size Y of element?
When i change crosshair size, why doesn't it change the size? Instead it just moving it's position :\
Does anyone have a serverfom base for modalformdata?
what
Yes. You just render your Bossbar depending on the name using bindings
guys, can anyone give me at least a snippet to make a thing fade it and fade out using alpha? like pause before fading out.
-# I suck at searching samples lol
{
"anim_fade_in": {
"anim_type": "alpha",
"easing": "linear",
"duration": 3,
"from": 1,
"to": 0
},
"anim_fade_out": {
"anim_type": "alpha",
"easing": "linear",
"duration": 3,
"from": 0,
"to": 1
}
}
should work
i am such a smooth brain doing this in the worst way possible but it's slowly working
i would make the slots invisible and only be highlighted if you hover over them imo, and yeah offsets would be great aswell
yey.
Thank you
definitely, next step is getting the stuff in the right place then hiding the slots
this is kinda unnecessary but maybe you can make that instead that fire texture you make own texture showing it's burning in the furnace iamge
i was about to say this
no way, i forgot i have more control
i used to have this but the java shader broke
oooh this is gonna be something
it looks bland asf when you don't do that.
oh this is gonna be a chore i'm so excited
omg
i have a nice idea
when you are on a island instead of a banner your paper doll is rendered
wait
wrong chat
sorry
lmao
Ngl, that's kinda brilliant lmfao
can we crop the render somehow?
like making it inside an element that have clip or overflow or whatever it is called off
clips_children
Good idea
how can i manage to edit the behavior of the actionbar to switch from the default to the custom?
blessed
fuel fire is most likely going to take a while
adding the fire animation where the coal is placed
but behind the coal
would be cool af
yeeeee
that's gonna be a banger
can i check what item is in a slot?
i assume not but there's just a lot of stuff
is it possible to render a block just like the paper_doll/hud_player_renderer
i just want to render a banner facing the screen
it would be better with animations a banner has
How to show hover_text when i hover my button
what do you mean
do you mean the tool tip?
or just a label when you hover over your button?
Hover text when i hover button
hover_text_renderer if you mean tooltip
i still dont know. Hover text is a hardcoded property of hover text renderer
its hardcoded?
we can change the text using #hover_text
by hardcoded i mean it was a property of the renderer
but yeah youre right
hm yeah. it's texture background is hardcoded but I think it can be easily replicated using follows_cursor property inside hover control
^^
wtf
why the hell wont this work
or wait
should it even work?
or its only task is to show the dumb axis?
dynamic forms are nice... but is it alot easier to just make each form individually for design purposes?
when redesigning the chestformdata for instance.
How do I do this so that the pressing button stays like this and when I release it now it does the action that was assigned to it?
not possible (i think, since that is ore ui)
21:37
its related to entity materials, not here
oh ok sorry
the $custom_background when I use my own it makes the student not visible?
Did I do something wrong?
I can add a custom background in server form but in npc screen I don't how lol
you need to include $child_control in your custom background
and the title, and the close button
basically, $custom_background it's not just the background, it's the whole thing lol
"form_fitting_main_panel_no_buttons": {
"type": "panel",
"size": [ "100%", "100%c" ],
"anchor_from": "center",
"anchor_to": "center",
"$text_name|default": "",
"$show_close_button|default": true,
"$use_compact_close_button|default": false,
"$close_button_offset|default": [ 0, 0 ],
"$custom_background": "common_dialogs.dialog_background_hollow_3",
"controls": [
{ "common_panel@common_dialogs.common_panel": { "$dialog_background": "$custom_background" } }
]
},
"common_panel": {
"type": "panel",
"size": [ "100%", "100%c" ],
"$dialog_background|default": "common.dialog_background_opaque",
"controls": [
{
"bg_image@$dialog_background": {
"layer": 1
}
}
]
},
(from ui_template_dialogs.json)
you can "solve" this just by changing student@common_dialogs.form_fitting_main_panel_no_buttons to student@common_dialogs.main_panel_no_buttons
This has $child_control and $custom_background separated (and it's the one used in server_form, that's why you can change the background there)
or the best in my opinion, redo all the layout lol
How do I fix the issue of blank buttons?
Yeah, fixed it, I used server form and transferred some into npc
wdym by dynamic forms?
If you mean like custom long_form with a different design, then it's obvious you have to make them individually to make their design special
Is it possible to have item slots in a form? or have something like a second crafting menu where you open the form and your inventory is accessible for you to move items into the slots?
I don't see any kind of item slot element in https://wiki.bedrock.dev/json-ui/json-ui-documentation.html
No, what you see on other stuff is entity inventories.
ty
im trying to learn json UI, can someone explain theese errors?
"hud_actionbar_text": {
"type": "image",
"size": [
"100%c + 12px",
"100%c + 5px"
],
"offset": [
0,
"50%-68px"
],
"texture": "textures/ui/hud_tip_text_background1",
"alpha": 1,
"controls": [
{
"actionbar_message": {
"type": "label",
"anchor_from": "center",
"anchor_to": "center",
"color": "$tool_tip_text",
"layer": 31,
"text": "$actionbar_text",
"localize": true,
"alpha": "@hud.anim_actionbar_text_alpha_out",
"bindings": [
{
"binding_name": "$actionbar_text"
},
{
"binding_type": "view",
"source_property_name": "($actionbar_text = 'ABF')",
"target_property_name": "visible"
}
]
}
}
]
}
JSON UI parse failure means that a error is in your code that prevents Minecraft form parsing it. It basically means that it is a type-error
$actionbar_text is a # property. $ properties are variables set by the developer. # properties are properties set by minecraft, that may be changed.
When you set a target_property_name you should use # for properties or $ for variables
Umm, guys is there a way if there's a specific item in the slot? For example horse inventory
you mean to check if there is a item?
yeah... if possible a specific item
tho, I can just make that it only accepts one item
I dont really know but if it is a controled child (via factory) you could maybe check its existance?
I never touched containers this deep
how about just checking if there's an item
thanks
if there is an item? let me check
how do i delete a part of a string?
"$txt": "$actionbar_text",
"$canshow": "(not ($txt = 'ABF'))",
"text": "($canshow = true ? at - 'ABF')"
the way you did earlier. You need to have a source property/variable and change it like you did earlier.
basically using bindings is the only way
i found a way but i dont know what im doing
this way you set it as the content.
when setting a text you can't just do that. You need to use a binding
im trying to do is
if (text.startsWith('ABF')) text = text.slice(2, text.lenght)
[
{
"binding_name": "#form_button_texture",
"binding_type": "collection",
"binding_collection_name": "form_buttons"
},
{
"binding_type": "view",
"source_property_name": "(('%.6s' * #form_button_texture) = 'banner')",
"target_property_name": "#visible"
},
{
"binding_type": "view",
"source_property_name": "((#form_button_texture - 'banner#') * 1)",
"target_property_name": "#item_id_aux"
}
]
this is one of my binding lists
what are bindings and how do they work
first you get the form button texture
then you set its visibility
at the end you delete "banner#" and make it a number
you can use it for your thing
but you will need to change the properties appropiatly
so if you're gonna ask why make it as Number, it's a string my multiplying it by one will turn it into a number but this don't work with float values btw only integers
im trying to achieve a dark-mode and light-mode actionbar for my script
in that case you will need to change the texture of the sidebar using the binding
update? Lol
ups i forgor 💀
ok so the binding that i need to create is texture and i should edit it based on what the text is?
gimme a minute
"bindings": [
{
"binding_name": "#texture"
}
],
i dont know how to start
detect actionbar and use variables array to change texture
i dont even know what im doing
so something that starts with $ is variaable
i have no idea of how json ui is supposed to work
$ valirables
hard coded properties
well with a "quick" look i cant really tell you sometimes it looks like you could but with inventory? idk you should ask some experts
sorry
$actionbar_text is a variable. but variables are not hardcoded. you can create your own variables
what about opening a post?
texture is hard coded
yup
it's getting messy here
alreddy did
oh
#item_id_aux binding of inventory_item_renderer
Damn I knew it. Lmfao
yeah
Thx perfect answer
hehe. How did you make it always visible?
Always? They are never invisible in the first place
I know, what I mean is the case here.
Not literally always but like doesn't need to be hovered
I edited the container item inside inventory screen.
Also those ids are different labels. Not hover text
The label is not inside the button, it just gets the binding from item renderer
that's why it's always visible? Wait nvm I think label is always visible lol
It allows us to get bindings of the sibling not child
I just hope chests aux id isn't changing when there's a custom item registered. since I planned to make that if there's a chest in the slot it shows the inventory, otherwise no
they change...
How do I JSON code?
Question, can u help me with coding? I wanna learn how.
Oh ye one thing about modified forms
Does it automatically show the one with specific title bindings and function the same or do i need additional code for that
Im trying to find it but I couldve swore there was a thing about making form ui that works with other ones. anyone know what im talking about or how I can do that?
modifications?
yeah but like how is that set up though?
the problem is all the UIs need to use it so they can work together
they way it work is by inserting your ui into other packs or the vanilla
you name the array and the operation and value you want to use
https://wiki.bedrock.dev/json-ui/json-ui-intro.html#modifications
Yeah i know how they work just not sure how to make packs that work together
you need to show a form when a condition is true in your title, and another when it is false
so you will have the modified and vanilla form and show one of them conditionally
for easiness lets just say i have my own packs I want to work together
you just add a modification property to the shared element and insert the modifications, there is some examples in the wiki
Yeah but how does that work with custom forms tho? doesnt the normal form need a databinding to not show if the title matchs text?
you can modify existing array elements and add the binding
Anyone have any idea what's up here?
{
"binding_type": "view",
"source_property_name": "(('%.12s' * #hud_title_text_string) - ('%.4s' * #hud_title_text_string))",
"target_property_name": "#text"
}
For '%.4s', if I use any number except 1, it shows no text at all.
But if I use '%.1s', it does.
You delete the first 4 letters out of the first 12 letters out of your HUD title text
Oh I didn't see the text below the codeblock
Mb
How does your string look like
Right now it's 'u:20125,000 '
And what are you trying to achieve?
Get the last 8 letters of the string
Hopefully
This one
With the space at the end?
Yes
Do you have any idea why the number matters? What makes 1 character different from 2+?
What do you mean by that?
If I use '%.1s' instead of '%.4s', it works.
Works as in shows any text
Can't you just delete the first 4 letters? Without getting the 12
But any number higher than 1, and no text is shown.
'%.4' * #binding
Oh, I see what you're saying.
with %.1s shows :20125,000 ?
The problem is that my string might get longer.
And - binding
So I really just want to get between those two ranges (4-12)
then i think i know whats the problem lol
I think I saw somewhere a function that gets the last letters
I can't remember where
Oh
what about flipping the 12 and 4?
Possible. Let me try inputting a letter instead of one of the zeros?
yeah
What do you mean by that?
It will delete the 12 characters from 4 so nothing will be left
try with this same text
but with - %.7s
it should display ,000
Just add §z to the maths you did
yeah
This didn't work, but it was a good try.
that solves the whole problem
I can try this
And I'll try this first
This worked.. what? 😂
{
"binding_type": "view",
"source_property_name": "(('%.4s' * #hud_title_text_string) - ('%.12s' * #hud_title_text_string))",
"target_property_name": "#text"
}
wouldn't do it?
I'll try that right now
not a number
Adding the '§z' tag
As I said you subtract 12 from 4
It leaves you with -8
You can't have a string with -8 so you have P
0
That is logical but I saw someone using smaller number - bigger number to achieve the same idea
Weird
Ik these bindings are numbers
He just does the math in a weird way I think
After implementing the seperator idea, it works perfectly.
Or they
So weird, I would've never thought of that.
Thank you so much all three of you for your help.
actually it's logical lol
Except I wouldn't think it'd parse a number with commas
Stringwise not quite
It they are jumbers then yea
Are we on the same page lol?
XD
You should know something
if you try to parse 123,456 it returns 123
all after the comma is removed automatically
and the comma itself
That doesn't make any sense 💀
That's true
example Is the coords text
Thanks for that, that's a good point
you get the raw coords x y z
then divide by 16
and boom you get the chunk coords lol
Smart
Im using live horse renderer, but the problem is it follows the cursor
i tried adding this but this seems to only work on player renderer
"property_bag": {
"#look_at_cursor": false
}
It's been a while. And I forgot how to change the scrollbar again 🤦
maybe $scroll_track_image_control
is that for vertical scroll?
Can anyone point me to the texture or part how I can change default server forms texture?
which one? Buttons? The background of the form itself?
Buttons, frame - default is light gray, as in NPC dialogue, but I would like to change that to little darker
Anyone please?
"$default_button_texture": "",
"$hover_button_texture": "",
"$pressed_button_texture": "",
"$locked_button_texture": ""
define these images inside the light text button in server form
Very thank you!
"$custom_background" variable in long_form@common_dialogs.main_panel_no_buttons for the border and background
Sorry for bothering, but I don't know. I don't have "$custom_background" variable in default server_form.json from bedrock samples. I should do it myself right?
Same with the images textures. Is there possibility to use color values as RGB?
The long form (long_form@common_dialogs.main_panel_no_buttons) is from common_dialogs -> main_panel_no_buttons and $custom_background is defined in that file which is default set to the normal server form background, so you change the variable to your own texture
and it'll change the background texture
color can take string or rgb values both
"color": "blue" or "color": [0, 0, 1] (equivalent to 0, 0, 255)
how does #banner_color and #banner_patterns look like?
wait
i can check it using the loom screen
Are you talking about inventory item renderer?
yup
you can just put this in inventory_screen.json to test
true
@normal moat Sorry for ping, but can I use your help once more? How I can change this frame and scroll line color?
Buttons worked and I'm changing them.
.
inside scrolling panel
you have to test it cuz im not sure if this variable will work. also you have to reference a element in it not the texture path
Oki, I will try myself, and the frame? I assume it's in another place too?
you mean the white border?
$custom_background (not texture path) inside long_form@common_dialogs.main_panel_no_buttons
It's not working. Background changed itself to big one color thing - default light gray
oh no, the variable needs to reference to a control, not color
"$custom_background": "server_form.my_background"
additionally ```json
"my_background": {
"type": "custom",
"renderer": "gradient_renderer",
"color1": [0,0,0],
"color2": [0,0,0]
}
Okay, I've done it and added it under namespace, and it's somehow not working
Nevermind, letter missspell
Wow, thank you again!
no problem!
Guys is there a template for horizontal scroll bar.
Why is the paper doll render so broken? The center of the doll is in the middle of its neck. Why?
I think its because of how player model is
it is annoying
now i need to sit and figure out how to make it only show the head whilst being scaled
yea
is it possible to multiply string size by a variable?
Heyyo?
there is a possibility you could find it in the bedrock samples
there is, consider researching https://discord.com/channels/523663022053392405/1252224040433614958
Damn, I suck at searching lmfao
I searched "horizontal" scroll bar and it gave me nothing
Anyways thanks on both of you
Hi, where can I go to learn How to use the blocks UI or rather the crafting table ui? I'm Sorry My english is bad, This is translator
So ummm. This crashes my game
what did you change?
before it started to crash
long_form_dynamic_buttons_scrolling@server_form.horizontal_scroll_view
The @server_form is frim @common I changed that since it throws an error
in that case something with your server_form.horizontal_scroll_view is wrong
let me check
are negative layes acceptable?
yes
interesting lol
any idea how to change this toggle texture from server form?
Figured it out. But not efficient
Chest-UI question!! if i wanted several custom Chest-UI form each with a different background is there some way of setting it via a binding for each one
yup
you will need to change the texture somewhere placed
Welp, it is not created with that in mind so you might have to add several bindings to it to have different textures per different forms with unique title
hhhmmmm...... let me have a look into that, i'm guessing that since the background texture is a vaiable i can jsut expose it out in to the server form??
How to create 'nubs' on a custom bar?
This is using the vanilla XP bar texture, but it doesn't seem to be nineslicing to create ridges.
{
"experience_bar": {
"layer": 1,
"type": "image",
"texture": "textures/ui/experiencebarempty",
"size": [182, 5],
"controls": [
{
"progress": {
"type": "image",
"layer": 2,
"$one": 1,
"$max_health": 20.0,
"clip_direction": "left",
"clip_pixelperfect": false,
"texture": "textures/ui/experiencebarfull",
}
}
]
}
}
The thing you can do is to make a different texture above it so it looks like it has nubs
Hmm, okay
Thank you
That's actually what Mojang does
How I can use Nine-slice texture for json? Can anyone help me?
VS Code telling me it's wrong and I don't know how I can set it up, so my texture will work as nineclice format
I think thats just blockception, its correct tho
Yeah, but still my texture is not properly scaled
This is my texture
.png format, json is in ui/ folder
What am I doing wrong?
You must place the .json and .png files in the same directory
I have both - In ui folder I have style.json and in the textures/ui folder I have the same style.json file
Where png file is
and your texture is style.png?
sorry, all things I have style_dark - style_dark.json and style_dark.png
I used the same information as in #1072983602821861426 -> Notification ui thingy post
hmmm strange
mojang just uses a feature called tiled
"tiled": true will make the image repeat itself to whatever size the panel is
Okay, if I'm modifying json things can I /reload all or exit-start map and it will work or should I export map and again start it to make things working?
If it's stupid question sorry, I'm starting with json ui
If I got you correct. Reload all should do fine for reloading your resource pack
Oh jeez, it worked... Soo, what I did, I just export map and import again with all stuff in resource pack. And it worked xd
So I was wrong about relaying on knowledge that /reload all do all things
- Use conditional title bindings
- Use a form factory
- Works on modals only
Anything else i should note about making custom forms?
Oh 🤔 thank you!
is it possible to add a "add server" feature on console with only json UI?
console doesn't have that function thats why they can't join servers without friend connect
Is it possible to apply alpha to the paper doll renderer?
It doesn't seem to work for me, if so.
And I think this might be more of an OreUI thing, but it (in theory) might be possible to modify the 'Add Friend' feature to be like adding a server, essentially turning FriendConnect into real server support.
But otherwise no. UI modification is for resources; such an implementation would require an actual backend feature to back it up.
but maybe, you know how the "export world" addon worked with mcpe? it only used resource pack for it to unhide the export button
maybe its possible for console players too in terms of unhiding the add server feature, idk
I haven't tried it but probably not
Maybe that's why Mojang uses size animation on it
You can try the following:
- Local world transfer on #1072983602821861426
- add this in your play_screen.json
"add_server_toggle_button": {
"visible": true,
"bindings": []
}
don't know if it works cuz im not a console player XD
probably not
9-slice scaling (also known as Scale 9 grid, 9-slicing or 9-patch) is a 2D image resizing technique to proportionally scale an image by splitting it in a grid of nine parts.
The key idea is to prevent image scaling distortion by protecting the pixels defined in 4 parts (corners) of the image and scaling or repeating the pixels in the other 5 par...
Thank you! I will try learn more about json ui 😄
no, but you can resize the texture
sad
i want to update my nineslice viewer to account for the other two cases, my current code only use Vector4.
do any of you know what the other two mean?
i know int mean the same numbers in all 4 sides, but what does Vector2 mean
x, y
so we don't have to do like: [6, 2, 6, 2] but [6, 2]
so if [2,4,2,4] we can do [2,4]?
yeah
alr
thanks
But please double check cuz the last time i tried it didn't work :/
yeah, docs **maybe ** wrong
let me test and update it if it is
yeah, it doesn't work
💔
sad.
Guys what does focus_enabled do in buttons?
Allows controller or keyboard (Keys only) able to select the content.
Although there's actually alot more than just focus_enabled, so enabling or disabling that alone will do nothing.
{
"button": {
"type": "button",
"size": [
32,
32
],
"layer": 10,
"anchor_from": "top_left",
"anchor_to": "top_left",
"default_control": "default",
"hover_control": "hover",
"pressed_control": "pressed",
"focus_enabled": true,
"$offset|default": [0,0],
"offset": "$offset",
"controls": [
{
"default": {
"type": "image",
"texture": "textures/ui/button_borderless_light"
}
},
{
"hover": {
"type": "image",
"texture": "textures/ui/button_borderless_lighthover"
}
},
{
"pressed": {
"type": "image",
"texture": "textures/ui/button_borderless_lightpressed"
}
}
]
}
}```
guys, how do I change the offset of the button, when hovering and change too when default or pressed
I know you can add another control inside of the hover tho I'm not so sure if I can just set offset like that
"controls": [
{
"hover": {
// ...
"controls": [
{
"offset": {
"$offset": [0, 10]
}
}
]
}
}
]```
valid?
-# those the redundancy is insane asft
Ye uhh one question
How do i change the colour of the background panel in custom forms
Is it a texture or
the somewhat see through black overlays at the back?
Oh boy, i wish there was a video on exactly that!
Are you sarcastic or something? 😭
guy?
do I put it as a panel instead and put the controls in the main panels I used to display?
:)
just add offset in the controls
I mean, a video on purely that would be a bit unreasonable
I apologise if i pinged
{
"custom_form_panel": {
"type": "panel",
"size": [
"100%",
"100%"
],
"controls": [
{
"button@button": {
"offset": "$offset"
}
}
]
},
"button": {
"type": "button",
"size": [
32,
32
],
"layer": 10,
"anchor_from": "center",
"anchor_to": "center",
"default_control": "default",
"hover_control": "hover",
"pressed_control": "pressed",
"focus_enabled": true,
"$offset|default": [0,0],
"offset": "$offset",
"controls": [
{
"default": {
"type": "image",
"texture": "textures/ui/button_borderless_light",
"$offset": [0,0]
}
},
{
"hover": {
"type": "image",
"texture": "textures/ui/button_borderless_lighthover",
"$offset": [0,-50]
}
},
{
"pressed": {
"type": "image",
"texture": "textures/ui/button_borderless_lightpressed",
"$offset": [0,0]
}
}
]
}
}```
Is there a way to move the button itself not just the image
Guys does anyone knows what font used for Studios text in Mojang's logo
Kind of looks like Intervogue Soft or Goldplay Black
Is there a way to modify the UI element for the item renderer that is shown when an item is attached to your cursor?
Like if I grab something in my inventory, and the item is now following my cursor; is there a way to modify that item renderer? I want to make it bigger.
Also, has this been figured out? I'm having this issue as well.
not afaik
I want to display a label that contains the information of the item I'm hovering over in inventory.
I found (very little) information on this, and was tinkering around with collection panels, but I can't seem to figure it out.
Here's what I have:
"collection": {
"type": "collection_panel",
"collection_name": "hotbar_items",
"controls": [
"hotbar_slot_0@hotbar_data_item",
"hotbar_slot_1@hotbar_data_item",
"hotbar_slot_2@hotbar_data_item",
"hotbar_slot_3@hotbar_data_item",
"hotbar_slot_4@hotbar_data_item",
"hotbar_slot_5@hotbar_data_item",
"hotbar_slot_6@hotbar_data_item",
"hotbar_slot_7@hotbar_data_item",
"hotbar_slot_8@hotbar_data_item"
],
"bindings": [
{
"source_control": "hotbar_slot_0",
"source_property": "selected_id",
"target_property": "#hid_0"
},
{
"source_property": "#hid_0",
"target": "#item_id"
}
]
}
I haven't done anything this advanced before, so I'm a little lost. Would anyone be able to provide some insight on this?
source_property is supposed to be a binding, no?
it's ..._name right?
You're right, that's my bad in the example I gave.
But more so my point was I couldn't find much information and I dont really know where to start, so I was wondering if anyone had more knowledge on the topic.
Just use script setLore(). Not discouraging but you should avoid this
maybe he wants to display an image?
tho they can still use glyphs instead
yeah why spent your whole week figuring it out and then item ids shift and all you work is gone
Gone? You can easily change it to the new one. Herobrine updates his map with every item aux id
I mean that there is better option than doing the hard thing
In chest ui, we have no other option so we have to update it everytime
How do I get the lore of that specific item to display?
My goal is to create a stationary label element (in the inventory screen) that displays information (such as the item's name) of the item I'm currently hovered over.
itemStack.getLore() or #selected_hover_text binding of hover text renderer (selected_item_details) in json ui
Don't the Item name displays automatically when you hover it?
Ohh selected hover text works?
Thank you, I didn't know that binding exists. I'll try that.
I mean if you want to change info in hover text, why you are not using setLore?
I don't; the hover text renderer cannot be customized, and I want it to be stationary.
Also, another question I had; if that binding works for the selected item, is there a way to index a specific item? (Ex. The 21st item in your inventory)
are you talking about this?
Yes; it can't be customized from what I can tell, it's a hardcoded renderer.
I wanted to make just like a stationary label with item information.
You can recreate them without renderer, although be noted that it's gonna be shaky as hell if spinning your cursor too much.
or you can recreate them except this time are fixed position and not following the cursor.
That's what I was hoping for. It seems like through the binding LeGend mentioned, I should be able to do it pretty easily now.
But regarding this, is this something that's possible?
apparantly i dont understand what you werer talking about lol mb
it's not that hard to recreate something like this when the renderer itself has the exact bindings you need.
I've seen mentions of people indexing specific form buttons, but I'm not sure how that would work with the inventory collection.
Is there a way to get the binding for a specific item of the item collection?
Eh not quite. you'll need a fixed collection index which will be alot of hassle.
What's that, how does that work?
It's a manual version of index.
something you can directly modify the index if needed, although there's pretty big cons
It's not dynamic, are also unoptimized, will likely cause performance issues if the index is way to much
I've never heard of indexing with JSONUI in the first place, so this is new to me haha
This only useful if you're doing something like a different server forms button in different positions etc
That makes sense, but for just one instance it should be fine, right?
Can you just use:
"collection_index": X,
...as a property, or is there a binding for it?
Eh, not exactly.
you can't really detect which index that has the slot you wanted.
so you just basically gonna copy and paste each elements in different index numbers to find out.
That's fine, I suppose.
But so you do use the collection index property?
But then how do you get the binding of that object from the collection index. Do you just use the #collection_index itself as the collection name?
probably something like this
"test": {
"type": "stack_panel/collection_panel",
"collection_name": "<The name of collection>"
"controls": [
{
"index_0@<element that grid or factory has>": {
"collection_index": 0
}
},
{
"index_1@<element that grid or factory has>": {
"collection_index": 1
}
},
...
]
}```
that's what i remember and somehow wrote it with my phone keyboard for some reason
Oh interesting, you're indexing the individual objects in the factory as property names.
I guess that's a good way to do it.
Thank you, this is extremely helpful.
there's common rules on json-ui — you don't do something like that for unnecessary things.
but if you want that i guess go ahead
but again, creating too many element indexs will cause some increased UI loading time or lag.
Well, something I'm trying to accomplish is using the lore text of an item is as input.
Which means I need that specific slot; I can't think of another way to do that.
but i guess 30~ slots shouldn't be a problem i suppose
And to be clear, it's just the one slot I need.
hi, does anyone have a nine slice viewer website
i remember one surfaced a while back but cant seem to remember it
yea thats it, thanks guys
oh yeah i forgot. if you wanna just fetch only one fixed slot, try to count which slot that was and use it as index.
if you don't want to create too many indexs ofc
Oh, okay! That's easy enough.
I'll try that!
it should pin point the closest slot you want
if that isnt what the slot you want, just decrease or increase the number i suppose
you'll eventually find it
For this, would something like this be correct for the binding?
"type": "label",
"text": "#selected_hover_text",
"bindings": [
{
"binding_name": "#selected_hover_text",
"binding_type": "collection",
"binding_collection_name": "$selected_item_details"
}
]
yeah
it will fetch some stuff from the current index it on.
e.g third slot is dirt block, that binding that has collection will fetch that dirt block
Does it need inside of a specific object? It doesn't seem to be displaying anything.
you need the correct collection name though.
you should see them somewhere like factory or grid elements that contain slots related.
I'm not certain which one though tbh since i don't really modify inventory or chest related that much
That seems to be selected_item_details_factory
for inventory items, collection name is inventory_items
Oh, I was overthinking it. Just the item collection?
"highlighted_item_display": {
"type": "label",
"text": "#selected_hover_text",
"bindings": [
{
"binding_name": "#selected_hover_text",
"binding_type": "collection",
"binding_collection_name": "inventory_items"
}
]
},
In that case, shouldn't this be correct?
not sure never done something like that
you need to put collection name on that element.
though that's as far as i remember. maybe in the future if i do something like server forms again
Isn't that just for panels, though?
Or does it need to be wrapped in a panel to work
Stack_panel or collection_panel accepts collection_name property.
if there's none, you can't use collection index.
because it doesn't know which one it should be looking for.
"type": "stack_panel",
"collection_name": "inventory_items",
"controls": [
{
"label": {
"type": "label",
"text": "#selected_hover_text",
"bindings": [
{
"binding_name": "#selected_hover_text",
"binding_type": "collection",
"binding_collection_name": "inventory_items"
}
]
}
}
]
I tried this, but it still doesn't seem to be working.
This is for the other problem I was trying to solve of getting information for the highlighted item.
collection stuff doesn't work outside of factory or grid unfortunately.
Or am I misunderstanding? Do you still need a collection index for selected_hover_text?
Oh, hmm
"label": {
"type": "label",
"text": "#selected_hover_text",
"bindings": [
{
"binding_name": "#selected_hover_text",
"binding_type": "collection",
"binding_collection_name": "inventory_items"
},
{
"binding_type": "collection_details",
"binding_collection_name": "inventory_items"
}
]
}
}
```try something like this
yeah you can't use collection property without either factory or grid.
but if index, again. it's manual and therefore you'll have to do stuff like the one i showed you.
you can hide your slot like this and put your edited slot in placfe of it
Still inside of a panel?
yeah ig
Still doesn't seem to be any change.
yeah idk what's easier for you.
but you could do condition renderer.
actually nevermind it's getting complicated than i thought.
Yeah, this whole thing has gotten way more complicated than I would've guessed to just get the hover text details without using the hover text renderer.
I guess that's JSON UI for you, though. I'm just going to keep experimenting.
i kinda know how but too busy unfortunately.
actually #selected_hover_text seems like some hardcoded thing which works in its factory or something and not associated with collections
still no idea, good luck experimenting
No worries, thank you for your help. Both of you.
I've begun to notice that too; I'm going to see if there's something I can do with that, though.
Maybe I can interject something between the factory and the tooltip text.
your best bet is to use condition render.
you can use it to detect a certain strings and make the entire text element invisible.
also use that to display your custom one aswell.
there's wiki for that
What do you mean by detect certain strings?
like if my string ("hello world") contains "hello", element disappears.
this also means you can use prefix too.
I might be misunderstanding, but I don't understand how that would accomplish my goal of getting the item details for a selected item
Alright, thank you again for your help. Have a good day!
good news. i got it.
{
"binding_name": "#hover_text",
"binding_type": "collection",
"binding_collection_name": "$item_collection_name"
}
```this is all you need
😮 Oh my gosh!
I need to try this!! Thank you, LeGend!!
Wait, but is that still parented to the tooltip text?
nah its an element in ui_common.json
I meant does it still follow the cursor? I was still hoping to make it stationary.
you can make it stationary thou. just remove the hover text and use label
That's what I was thinking. I'll try that right now.
It's working!
Now I only need to figure out how to unanchor it from the inventory slot.
This is a huge step up. Thank you so much, LeGend.
Glad to help
I am coming to find that this is seemingly just as hard as the original problem.
Is there no way to anchor a child element to something that isn't its parent?
try these binds
On what? A different element or something?
just try anywhere
make sure to define $item_collection_name: inventory_items
Where do you actually want your text to show btw?
Just to confirm, this is what you had in mind?
"custom_text": {
"layer": 29,
"type": "label",
"text": "#hover_text",
"$item_collection_name": "inventory_items",
"bindings": [
{
"binding_name": "#hover_text",
"binding_type": "collection",
"binding_collection_name": "$item_collection_name"
}
]
},
yeah
Bottom of the inventory, ideally.
that's some issue because there is no way to change its parent. You probably have to adjust or find a workround
UPDATE:
I created the element, but forgot to actually insert it into the inventory UI.
Weirdly, it now works (there's a stationary text label)
But it only reads the first item of my inventory consistently.
And if I change the first item, it changes too. It's just indexing the first item for some reason.
I guess that might make sense, because the highlight slot panel was probably receiving an index value as it was attached to a slot.
yeah
Do you know of any workarounds to kind of force a position on the screen?
I'm not sure which is more viable to attempt at this point.
What you can try is put it in a collection panel and define collection index
Is there any way to know what the collection index of the current selected item is?
probably complex/dunno
you can try "use_child_anchors": true
on [email protected]_slot
I tried using that, and I couldn't seem to figure out how it works.
Or maybe it just didn't work 🤷
Thanks for your help. I now have a few kind of working pieces, which is way more than I had before. Hopefully I can figure something out.
Guys.
how do I use offset anim type? how do I add anims in the whole button, not the texture only itself since they have separate shit
{
"button": {
"type": "button",
"size": [
32,
32
],
"layer": 10,
"anchor_from": "center",
"anchor_to": "center",
"default_control": "default",
"hover_control": "hover",
"pressed_control": "pressed",
"focus_enabled": true,
"controls": [
{
"default": {
"type": "image",
"texture": "textures/ui/button_borderless_light"
}
},
{
"hover": {
"type": "image",
"texture": "textures/ui/button_borderless_light"
}
},
{
"pressed": {
"type": "image",
"texture": "textures/ui/button_borderless_light"
}
}
]
}
}```
guy, can someone help me how do I make the button will animate to move offset -50 in y axis and stay there FOREVER unless when I unhover it will animate going back to 0
i guess add a button on the button
marketplace itself is bad 😦
the only thing I like is the opening animation lol
just a size animation 👍
(not just a size animation 👎)
Umm. I think this is not possible but is there a way to make the crosshair show up?
Forcefully?
because when you're in touch you can disable the crosshair right? But when you hold range weapons like bow, triden and etc... they forcefully show it
Possible to do that?
-# just a hunch
yeah I know but I want the most important one lol
the color inversion of it.
-# wait iirc someone made a material for particle
json ui support color inversion?
-# advanced answer: no i think?
Kinda
i made one, but instead to make the world bright, like night vision
how'd you do that?
anyways... Is there a way to make the image change color based on the value of the slider?
like a preview.
-# I'm coming back to my old projects lol
Since it doesn't accept a value inside of an array.
Without making it as a whole array
the only color inversion in ui you can think of is, the hud crosshair
i saw someone played the game in inverted colors but only the world is affected
I want to create new health bar and hunger bar displays. Are there any good approaches?
Currently, I plan to get data from a string thrown by sapi through the title, but I can't distinguish whether the data is for health or hunger. In JSON UI, is it possible to conditionally store and update variables?
Like in JavaScript:
var foo = 1;
if (STH) foo = 2;
This is my test. A problem occurs whenever I input something that doesn't start with 'test.
Can someone help me please because my json ui isn't working and idk if I did anything wrong?
This is what I'm trying to get it to look like
But it looks like this instead
you have to put controls inside {}
Like this?
^
no, im talking about the things inside the controls. controls is an array[]
oh
Im pretty sure i have it right, right?
they're not
you have to put everything inside controls array inside {}
I dont recommend this tree editor
Linting is the ability to validate code as correct, or incorrect. JsonLinter is a website that will point out json-formatting issues like mismatches curly braces for you.
Check your code ^
notepad++ 🔛🔝
Is the problem because I have : instead of ,
that is not the problem
Then I'm confused
just use a better code editor with better error detection than the tree editor. something like vscode or notepad++
Ok
also controls array is like this
"controls":[
{"elem1": {}},
{"elem2": {}},
{"elem3": {}}
]```
"controls": [
{
"image": {
"type": "image",
"size": [
18,
18
],
"layer": 4,
"texture": "$overlay_texture"
}
},
{
"stack": {
"type": "stack_panel",
"orientation": "none",
"layer": 1,
"collection_name": "crafting_input_items",
"size": [
"100%c",
"100%c"
],
"controls": [
{
"[email protected]_input_grid_item": {
"collection_index": "$slot_index"
}
}
]
}
}
]
Is that right now?
LMAO. I read " issues like mismatches curly braces OR you.
instead of "for"
Hi, does anyone know if it is possible to call an element that is inside a panel?
what do you mean?
like if you have a panel with "image1"
and you want to have image1 displayed in panel2?
in that case just define image1 inside the namespace
and use namespace.image1
use tile
we both know I'm slow asf lmfao... At least send some snippets 😭
dude im telling you it just "tiled": true
yeah, but what I meant is can you control how many of them in width or height
if your size property goes higher than the width of your image it will tile/repeat.
Thank you
Hey lucky
I wanna show something
it is automatically sized now... I also didn't use a whole bar of image, I used the "tiled": "x"
-# not an impressive thing but I'm happy since it took me 1 hour to discover it lmfao
Hey.
I came back since I need it... AGAIN lol
{
"centered_gui_elements_at_bottom_middle_touch": {
"offset": [0, 0.0],
"$update_string": "bar.",
"use_anchored_offset": true,
"property_bag": {
"#anchored_offset_value_y": 0.0
},
"modifications": [
{
"array_name": "controls",
"operation": "insert_front",
"value": [
{
"[email protected]_progress_bar": {}
}
]
}
],
"bindings": [
{
"binding_name": "#hud_title_text_string"
},
{
"binding_name": "#hud_title_text_string",
"binding_name_override": "#preserved_text",
"binding_condition": "visibility_changed"
},
{
"binding_type": "view",
"source_property_name": "(not (#hud_title_text_string - $update_string = #hud_title_text_string))",
"target_property_name": "#bool"
},
{
"binding_type": "view",
"source_property_name": "((#bool * -1))",
"target_property_name": "#anchored_offset_value_y"
}
]
}
}```
i can't make this work
yes it moves it tho, when it's true the whole panel disappears
did it use it wrong?
how to do this? or can someone send me the rp? Pls
with Json-UI 🐳
why would we have this specific rp lol
guys, why the anchored offset doesn't work on the hotbar chooser.
{
"exp_progress_bar_and_hotbar/resizing_xp_bar_with_hotbar/empty_progress_bar/full_progress_bar/progress_bar_nub/horse_jump_rend/dash_rend/hotbar": {
"offset": [
4,
16
],
"$update_string": "bar.",
"$percent": 0.01,
"use_anchored_offset": true,
"property_bag": {
"#anchored_offset_value_y": 0.0
},
"modifications": [
{
"array_name": "bindings",
"operation": "insert_front",
"value": [
{
"binding_name": "#hud_title_text_string"
},
{
"binding_name": "#hud_title_text_string",
"binding_name_override": "#preserved_text",
"binding_condition": "visibility_changed"
},
{
"binding_type": "view",
"source_property_name": "(not (#hud_title_text_string - $update_string = #hud_title_text_string))",
"target_property_name": "#bool"
},
{
"binding_type": "view",
"source_property_name": "((#bool * 30) * $percent)",
"target_property_name": "#anchored_offset_value_y"
}
]
}
]
}
}```
I set the value very high and still don't work
try placing bindings without using modifications
Also, i recommend you enable content log gui
Yah lol, I just realized that while eating since it doesn't have a binding originally lol
so you can see wheres the error
I'll be back
yeah maybe thats the problem
Didn't work 😔
hmmm
try removing the $percent part
or set $percent = 1
maybe you cant use floats lol
quick question guys
in the xp bar, their size is based on hotbar_chooser right? When I ignore or visible it the xp bar is affected too?
Right?
guys, for some reason I can't use the include thing in chat
when I do (#text = 'bar.') it shows when the text is exactly that but when I do (not (#text - 'bar.' = #text)) it shows the image even if it's not included
use ('%.4s' * #text = 'bar.') (or (('%.4s' * #text) = 'bar.'))
so if starts with bar. then shows the image
if still not working, pass your code lol
it should work with this
It works now yey
tho, know any reasons why it doesn't work in the chat?
idk lol
Yo so I downloaded this pack and wanted to edit the scoreboard
When I edit it the whole config stoped working can someone help
Chat messages usually have some § symbols always at the start. therefore stuff like that will not work.
also little reminder that (#string = 'something') has pretty high chance of not working if there's hidden symbols like these.
ngl, it kinda doesn't make sense to me since everything is color cod supported, like titles actionbar
like almost everything
i think it kinda was, since you can change the entire chat colors in the chat settings. — including a "pinged" color too.
maybe they did that in such a hacky way that they have to slide some § symbol to do so.
fair enough.
there's no color bindings or anything anywhere so, yeah they just did that.
damn that's why (not (('%.4s' * #text) = 'bar.'))
Doesn't return true even if the word bar. is in the first place
you could try skip that after the color symbol, maybe that might work.
hmm, what I'm doing is bar.<number>
It will always only returns true if the text is exactly that
not if it's included or it's in the first place
ui_common.json
ty
anyways, what's the size of root_panel?
i need to know since I'm using an anchored offset value and what I'm moving is under the root panel
default.
aka — "100%" within safezone area.
knew it but how do I use that for my 😭😭
they're default so i don't think offset aren't gonna work.
unless you're using it on stack panel.
Looks like I'll be manually position it sigh
which most hud elements are usually just stack panels might probably be the cause of your problem i suppose.
I'm moving the centered_gui_elements_at_bottom_middle
is it a bad idea if I just move each hearts individually?
Since their parent is that
and I know the size in y-axis
Depends on the UI mode.
It's classic both touch and not
if you're using classic UI, the extra heart goes up. if pocket UI, extra heart goes bottom.
that's hardcoded.
nah it's okay, I just need to move them up for 6px, It's better I guess if I move them up individually than me wasting my time moving this.
also it's uh renderer. i don't think you can move them individually
you move the render and all heart will just follow along with it
I'm talking about this.
"controls": [
{
"heart_rend@heart_renderer": {
"offset": [ -1, -40 ],
"anchor_from": "bottom_left",
"anchor_to": "bottom_left"
}
},
{
"horse_heart_rend_0@horse_heart_renderer": {
"offset": [ 180, -56 ],
"anchor_from": "bottom_left",
"anchor_to": "bottom_left",
"bindings": [
{
"binding_name": "#creative_horse_hearts",
"binding_name_override": "#visible"
}
]
}
},
```
sorry, if my English was bad lol
Not literally EVERY heart
like every heart tyoe
Horse, player, hunger, bubble, and so on tho their not actually hearts
anyone know where i can find text with a scroll bar? i'm looking at popup dialog but i'm having trouble finding where it's at
wdym by text with a scroll bar
how could i make these work like the normal modal buttons?
"buttons": {
"type": "panel",
"size": [
"100%",
"100%"
],
"anchor_from": "bottom_middle",
"anchor_to": "bottom_middle",
"controls": [
{
"modal_middle_button@common_buttons.light_text_button": {
"anchor_to": "bottom_middle",
"anchor_from": "bottom_middle",
"size": [
"20%",
"10%"
],
"offset": [
"-11%",
0
],
"$button_text": "#modal_rightcancel_button_text",
"$pressed_button_name": "#modal_rightcancel_button_text",
"button_mappings": [
{
"from_button_id": "button.menu_select",
"to_button_id": "$pressed_button_name",
"mapping_type": "pressed"
},
{
"from_button_id": "button.menu_ok",
"to_button_id": "$pressed_button_name",
"mapping_type": "focused"
}
]
}
},
{
"modal_left_button@common_buttons.light_text_button": {
"anchor_to": "bottom_middle",
"anchor_from": "bottom_middle",
"size": [
"20%",
"10%"
],
"offset": [
"11%",
0
],
"$button_text": "#modal_left_button_text",
"$pressed_button_name": "#modal_left_button_text",
"button_mappings": [
{
"from_button_id": "button.menu_select",
"to_button_id": "$pressed_button_name",
"mapping_type": "pressed"
},
{
"from_button_id": "button.menu_ok",
"to_button_id": "$pressed_button_name",
"mapping_type": "focused"
}
]
}
}
]
}
button code above ^^
idk much about button mappings / buttons in general
where you found that button, there should be a button id there
button id?
You are using ModalForm right (popup_dialog.json)?
wait I meant MessageForm
modal_dialog_popup
you can try these in $pressed_button_name though I never edited messageform:
popup_dialog.left_button
popup_dialog.rightcancel_button
{
"centered_gui_elements_at_bottom_middle_touch/heart_rend": {
"anchor_from": "bottom_middle",
"anchor_to": "bottom_middle",
"$percent": 0.02,
"use_anchored_offset": true,
"property_bag": {
"#anchored_offset_value_y": 0.0,
"#anchored_offset_value_x": 0.0
}/*,
"bindings": [
{
"binding_name": "#hud_title_text_string"
},
{
"binding_name": "#hud_title_text_string",
"binding_name_override": "visibility_changed"
},
{
"binding_type": "view",
"source_property_name": "(not (#hud_title_text_string - 'bar.' = #hud_title_text_string))",
"target_property_name": "#bool"
},
{
"binding_type": "view",
"source_property_name": "(#bool * 6) * $percent",
"target_property_name": "#anchored_offset_value_y"
}
]*/
}
}```
guys, for some reason the heart moved even tho I didn't really messed with the offset, I only added anchored offset
Yah i just realized that but there's new problem
It goes under the hotbar, like it's a stack panel
{
"centered_gui_elements_at_bottom_middle_touch/heart_rend": {
"$percent": 0.02,
"use_anchored_offset": true,
"property_bag": {
"#anchored_offset_value_y": 0.0
},
"bindings": [
{
"binding_name": "#hud_title_text_string"
},
{
"binding_name": "#hud_title_text_string",
"binding_name_override": "visibility_changed"
},
{
"binding_type": "view",
"source_property_name": "(not (#hud_title_text_string - 'bar.' = #hud_title_text_string))",
"target_property_name": "#bool"
},
{
"binding_type": "view",
"source_property_name": "(#bool * 6) * $percent",
"target_property_name": "#anchored_offset_value_y"
}
]
}
}```
oh yeah, when you use anchored offset, normal offset no longer works
ohh that's why
BRUH
Know any way to counter that?
set an offset in the offset lol
((#bool * 6) * $percent + 5)
like that
just find the right value
lmfao, I did a much more complicated way because I'm stupid
Dude, it works with non zero values but zero values it's still under the hotbar.
(((#bool * 6) * $percent) + 0.8)
(0.8 + all the thingy
didn't work :(
(0.8 + ((#bool * 6) * $percent))
{
"centered_gui_elements_at_bottom_middle_touch/heart_rend": {
"$percent": 0.02,
"use_anchored_offset": true,
"property_bag": {
"#anchored_offset_value_y": 0.0
},
"bindings": [
{
"binding_name": "#hud_title_text_string"
},
{
"binding_name": "#hud_title_text_string",
"binding_name_override": "visibility_changed"
},
{
"binding_type": "view",
"source_property_name": "(not (#hud_title_text_string - 'bar.' = #hud_title_text_string))",
"target_property_name": "#bool"
},
{
"binding_type": "view",
"source_property_name": "(0.8 + ((#bool * 6) * $percent))",
"target_property_name": "#anchored_offset_value_y"
}
]
}
}```
try that, if doesnt works then idk lol
Yes. It didn't work
So anyone can explain why using anchored offset doesn't work in renderers
{
"centered_gui_elements_at_bottom_middle_touch": {
"$percent": 0.01,
"use_anchored_offset": true,
"property_bag": {
"#anchored_offset_value_y": 0.0
},
"bindings": [
{
"binding_name": "#hud_title_text_string"
},
{
"binding_name": "#hud_title_text_string",
"binding_name_override": "#preserved_text",
"binding_condition": "visibility_changed"
},
{
"binding_type": "view",
"source_property_name": "(not (#hud_title_text_string - 'bar.' = #hud_title_text_string))",
"target_property_name": "#bool"
},
{
"binding_type": "view",
"source_property_name": "((#bool * 3) * $percent)",
"target_property_name": "#anchored_offset_value_y"
}
],
"modifications": [
{
"array_name": "controls",
"operation": "insert_back",
"value": [
{
"[email protected]_bar": {}
}
]
}
]
}
}```
I just sued my old one....
it's almost perfect but there's 1px difference that I can't fix or I dunno how to fix.
-# since I can't access the height size of the parent
how to remove existing binding??
"modifications": [
{
"array_name": "bindings",
"operation": "remove",
"where": {
"binding_name": "#abc"
}
}
]
my recipies keep overlapping when I scroll in the crafting table; anyone know a fix for this?
Does anyone know of a way to 'cache' a variable in UI when it is opened?
So for example, if I have an element with the value 'a' when the UI is opened, no matter what value it changes to (even empty), it should still evaluate 'a'.
Not sure if I'm explaining this very well.
binding_condition: once?
How I can rotate the paper doll when I touching on
Oh my gosh, thank you.
I haven't tried it yet, but that sounds right.
The paper doll doesn't rotate to follow the cursor (to my knowledge?)
Try live_player_renderer
{
"paper_doll": {
"type": "custom",
"renderer": "live_player_renderer",
"property_bag": {
"#look_at_cursor": true
},
"animation_reset_name": "screen_animation_reset",
"anims": [
"@common.screen_exit_size_animation_push",
"@common.screen_exit_size_animation_pop",
"@common.screen_entrance_size_animation_push",
"@common.screen_entrance_size_animation_pop"
]
}
}
Oh wait, I misread it. You want to be able to drag it?
Yes
I don't really know; maybe hud_player_renderer?
I cannot thank you enough; such a simple fix that I desperately needed. ❤️
Works perfectly.
{
"centered_gui_elements_at_bottom_middle_touch": {
"modifications": [
{
"array_name": "bindings",
"operation": "insert_front",
"value": [
{
"binding_type": "global",
"binding_name": "#hud_visible_centered",
"binding_name_override": "#bool1"
},
{
"binding_name": "#hud_title_text_string"
},
{
"binding_name": "#hud_title_text_string",
"binding_name_override": "#preserved_text",
"binding_condition": "visibility_changed"
},
{
"binding_type": "view",
"source_property_name": "(not (#hud_title_text_string - 'bar.' = #hud_title_text_string))",
"target_property_name": "#bool2"
},
{
"binding_type": "view",
"source_property_name": "(#bool1 and #bool2)",
"target_property_name": "(not #visible)"
}
]
},
{
"array_name": "bindings",
"operation": "remove",
"where": {
"binding_name": "#hud_visible_centered"
}
}
]
}
}```
guys, did I do something wrong? I want that if the #hud_visible_centered is true but the #hud_title_text_string isn't, if both are true hide the element
Tho it doesn't wor
I just discovered I can't change the visibility, or ignore it or enable it directly... I put the binding in the root_panel/.... of it.
hey bakedpotato!! You there?
hellol
