Help with formspecs
Help with formspecs
I would like to get some help from you about coding Formspecs.
I would be very thankful if you could give some examples about launching a formspec with a craftitem, because i'm having some issues about figuring out how to do so.
Thanks.
I would be very thankful if you could give some examples about launching a formspec with a craftitem, because i'm having some issues about figuring out how to do so.
Thanks.
Have a nice day! :D
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: Help with formspecs
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!
DMs are always open if you want to get in touch!
- rubenwardy
- Moderator
- Posts: 6978
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: Help with formspecs
also see https://rubenwardy.com/minetest_modding ... specs.html
Formspecs are a series of "elements" each element has a purpose, such as setting the size of a window or placing a GUI component such as a button.
Formspecs are rather disgusting and badly designed. They're fiddly to place, and they don't respond will to changing screen resolutions.
Formspecs are a series of "elements" each element has a purpose, such as setting the size of a window or placing a GUI component such as a button.
Formspecs are rather disgusting and badly designed. They're fiddly to place, and they don't respond will to changing screen resolutions.
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: Help with formspecs
i couldn't agree more, they are hidousrubenwardy wrote: Formspecs are rather disgusting and badly designed. They're fiddly to place, and they don't respond will to changing screen resolutions.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!
DMs are always open if you want to get in touch!
Re: Help with formspecs
How can i do something similar to "textarea", but without the option of text input. I just want a block showing up some text, with weight and height. I've tried "label", but it just makes the text go plain.
Have a nice day! :D
- TumeniNodes
- Member
- Posts: 2943
- Joined: Fri Feb 26, 2016 19:49
- GitHub: TumeniNodes
- IRC: tumeninodes
- In-game: TumeniNodes
- Location: in the dark recesses of the mind
- Contact:
Re: Help with formspecs
anyone looked into adding support for svg for formspecs?
don't know if it would be viable or makes sense? : /
https://github.com/memononen/nanosvg
and requires this http://www.glfw.org/
don't know if it would be viable or makes sense? : /
https://github.com/memononen/nanosvg
and requires this http://www.glfw.org/
A Wonderful World
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: Help with formspecs
for your text on cards:
Code: Select all
label[X,Y;label]
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!
DMs are always open if you want to get in touch!
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: Help with formspecs
actually, have no idea how to do a multiline label. or yes i have an idea but it requires a real big work.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!
DMs are always open if you want to get in touch!
- Nathan.S
- Member
- Posts: 1147
- Joined: Wed Sep 24, 2014 17:47
- GitHub: NathanSalapat
- IRC: NathanS21
- In-game: NathanS21
- Location: Bigsby Texas
- Contact:
Re: Help with formspecs
Multiline text is done with
Code: Select all
textarea[4.3,0;4,2;;Your text here, or variable;]'
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course
Check out my website, and brand new Minetest Modding Course
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: Help with formspecs
thanks, but we talk about something that you can’t edit :)
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!
DMs are always open if you want to get in touch!
- Nathan.S
- Member
- Posts: 1147
- Joined: Wed Sep 24, 2014 17:47
- GitHub: NathanSalapat
- IRC: NathanS21
- In-game: NathanS21
- Location: Bigsby Texas
- Contact:
Re: Help with formspecs
textarea isn't editable in the fashion I explained. I use it in my autostore mod: https://github.com/NathanSalapat/autost ... it.lua#L82
It pulls text from a field, hence the variable being used, but you could just as easily put in your own text directly. On the vending machine the text can't be changed once saved, it just displays, much like the text on the menu screens.
It pulls text from a field, hence the variable being used, but you could just as easily put in your own text directly. On the vending machine the text can't be changed once saved, it just displays, much like the text on the menu screens.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course
Check out my website, and brand new Minetest Modding Course
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: Help with formspecs
oh, okay, sorry. But is it doable in CSM?
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!
DMs are always open if you want to get in touch!
- Nathan.S
- Member
- Posts: 1147
- Joined: Wed Sep 24, 2014 17:47
- GitHub: NathanSalapat
- IRC: NathanS21
- In-game: NathanS21
- Location: Bigsby Texas
- Contact:
Re: Help with formspecs
I have no idea, I've never used any CSM yet.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course
Check out my website, and brand new Minetest Modding Course
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: Help with formspecs
:D
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!
DMs are always open if you want to get in touch!
- Tmanyo
- Member
- Posts: 196
- Joined: Mon Sep 29, 2014 01:20
- GitHub: Tmanyo
- IRC: Tmanyo
- In-game: tmanyo
- Location: United States
- Contact:
Re: Help with formspecs
If you are looking to make scrollable paragraphs without needing to use a textarea which requires using arrow keys to go up and down, or without using a scrollbar element which is tricky to use for big bodies of text, you can use a textlist where commas act as newlines. The downside is that if you don't know the body of text and it happens to have a comma in it, it will send the rest of the text to the newline. Also, if you didn't know the text you would have to use a function to wrap the text to the next line after a certain amount of characters. That is achievable by using this function: My wrap text function. It would require minor touches such as replacing the \n with , so that it works for the form and replacing the core function name. On another note, some formspec elements in the API don't seem to work so are pretty much garbage kind of like the whole system.
A multiline label is also pretty simple from what I have done in the past.
A multiline label is also pretty simple from what I have done in the past.
Code: Select all
"label[X,Y;label text label text \n label text label text]"
Tmanyo
http://www.rrhmsservers.ml
Servers I Host:
Tmanyo-Realism
Mods of mine that I don't totally hate:
Bank Accounts
T-Rating
Tmusic Player
http://www.rrhmsservers.ml
Servers I Host:
Tmanyo-Realism
Mods of mine that I don't totally hate:
Bank Accounts
T-Rating
Tmusic Player
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: Help with formspecs
okay, cool thank you!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!
DMs are always open if you want to get in touch!
Who is online
Users browsing this forum: No registered users and 9 guests