If you can't see the pictures, try reloading the page



How do I make a Button on an MfD that when clicked asks you to enter a text that is then rendered on the MfD until you enter a new text?

1. Create MfD

You can't display anything when there's nothing to display it on. Create a new MfD in the designer and set its Flight Program property to "Custom". Then, click on Edit Flight Program.


2. Create widgets

To show anything on a MfD, you'll first need widgets. In this case, you need:

1. A Rectangle or Ellipse
This will be the Button. Create a rectangle (or, if you want a round Button, an ellipse). It's the first block of the MfD-only blocks (the last tab) I think. Remember setting a name. If necessary, adjust its position and size using other more blocks. Finally, put a Broadcast on click block at the end. This one requires two inputs: Use the rectangle's (or ellipse's) name in the one that asks what has to be clicked and another (new) name in the Broadcast name.

vO0Dfz.20250421-215954.jpeg

2. A text
Much easier: Create a label (same block as rectangle/ellipse), if necessary change size, position and font size (or set Auto-Size to true) and you're finished.

vO0U9F.Screenshot-20250421-200141-Juno-New-Origins.jpeg


3. The Broadcast

1. A new function
This part will be used when the button is clicked (instead of launch), so it needs its own "function". Find the On recieve message block and put it ... anywhere. You just have to be able to find it again later. As name, use the same as in the rectangle's last block (the Broadcast... block). All new blocks will now be put under this one (instead of the on start).

The orange block in the picture under "2. Display"

2. Display
- Create a new variable
- Add a Set variable to user input block and put your variable in that
- Add a Set label ... text to ... block and set the label's name to your text's name (the widget) and the text to your variable

vO0xLP.20250421-220057.jpeg



This is how the finished program should look like:

vO5ZpM.20250421-220047.jpeg


Comments

  • Log in to leave a comment
  • Profile image
    3,192 lafario

    @TheVizzyLucky thx

    one month ago
  • Profile image

    @lafario I don't use anything apart from ChatGPT (mostly for formulas) and Google (for formulas). But depending on your current programming skills you could read w3schools' intro to programming or watch Youtube tutorials (like "Vizzy for Dummies" or "Vizzy Tutorial" - for some programs, there even are step-by-step tutorials).

    one month ago
  • Profile image
    3,192 lafario

    @TheVizzyLucky do you use any apps that can tell you how to make programs step by step, On Juno New Origins, Other than ChatGPT, If so can you show me, So I can use them to.

    2 months ago
  • Profile image
    3,192 lafario

    @TheVizzyLucky Thx

    2 months ago
  • Profile image

    @lafario Fixed! Tagged you in the fix

    +1 2 months ago
  • Profile image
    3,192 lafario

    @TheVizzyLucky Here is the craft!

    2 months ago
  • Profile image

    @lafario Can you send me your craft?

    2 months ago
  • Profile image
    3,192 lafario

    @TheVizzyLucky Fixed it but still the same issue.

    2 months ago
  • Profile image
    3,192 lafario

    @TheVizzyLucky Were both clumbsy😂

    2 months ago
  • Profile image

    @lafario For the rectangle you used two slightly different names ("Button" and "button"). Took me a while to find this 😂

    2 months ago
  • Profile image
    3,192 lafario
    2 months ago
  • Profile image
    3,192 lafario

    @TheVizzyLucky oh silly me lol!😂

    2 months ago
  • Profile image

    @lafario There's a typo in "receive btnClicked with data". You typed "btnCliked" instead of "btnClicked". But that's the only mistake I think.

    2 months ago
  • Profile image
    3,192 lafario

    @TheVizzyLucky

    The Image

    2 months ago
  • Profile image
    3,192 lafario

    @TheVizzyLucky ok

    2 months ago
  • Profile image

    @lafario I'll need pictures of your program

    2 months ago
  • Profile image
    3,192 lafario

    @TheVizzyLucky I did that but nothing happens when I click the box.

    2 months ago
  • Profile image
    3,192 lafario

    @TheVizzyLucky I did that but nothing happens when I click the box.

    2 months ago
  • Profile image

    @lafario Video, the button will be on the left (first) MfD, the text on the right (second).

    2 months ago
  • Profile image
    3,192 lafario

    @TheVizzyLucky ok

    2 months ago
  • Profile image

    @lafario Sorry, I currently don't have enough time. I'll try to add some later

    2 months ago
  • Profile image
    3,192 lafario

    @TheVizzyLucky sorry to be a pain but can you show it on pictures.

    2 months ago
  • Profile image

    @lafario For multiple Displays: Move the Create Label block and the whole second part (everything under the second orange block) to the MfD that should render the text and replace the text in that orange block with a new name. Then, go to the MfD with the Button and put a new receive message with data. Replace message with btnClicked (or whatever name you use). Finally, put a Broadcast message with data 0 to craft under that and replace message with the name you used in the MfD that shows the text. Once your done, the MfD with the button should contain: 1. The same first part as before (except for the Create Label) and 2. This (Important: I accidentally used Broadcast showText with data 0 in this picture, you need to use Broadcast showText with data 0 to Craft instead). The MfD that shows the text should contain 1. the Create Label block you moved there from the other MfD and 2. the second part you moved there from the other MfD (visually: The picture under 3. Broadcast).

    This probably all seems quite complicated (especially because I currently can barely add any pictures), so try following this step by step - read one sentence, do that and then read the next sentence - I hope this helps


    For a better Button: You can only change the rectangle's position, size, color and rotation. For anything else, you have to use other widgets (like Ellipses).

    2 months ago
  • Profile image
    3,192 lafario

    @TheVizzyLucky how to a make the rectangle into rectangular boarder instead of a chunky rectangle, Also how do I make it so the text box is on one multi display screen and the text is on the other, Basically like a computer.


    So whatever you type on the rectangle on one multi display screen, Transfers the text to the other.

    2 months ago
  • Profile image
    3,192 lafario

    @TheVizzyLucky ty.

    2 months ago
  • Log in to see more comments

No Upvotes

Log in in to upvote this post.