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


12 Comments

  • Log in to leave a comment
  • Profile image
    2,856 lafario

    @TheVizzyLucky ok

    5 hours ago
  • Profile image

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

    11 hours ago
  • Profile image
    2,856 lafario

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

    11 hours 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).

    11 hours ago
  • Profile image
    2,856 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.

    21 hours ago
  • Profile image
    2,856 lafario

    @TheVizzyLucky ty.

    21 hours ago
  • Profile image

    @lafario Pictures added

    23 hours ago
  • Profile image
    2,856 lafario

    @TheVizzyLucky ok

    yesterday
  • Profile image

    @lafario I'm currently quite busy because of Easter, I don't know if I can add the pictures today. Gonna try my best though!

    yesterday
  • Profile image
    2,856 lafario

    @TheVizzyLucky I dont understand it properly, You will have to show me visually.

    yesterday
  • Profile image
    2,856 lafario

    @TheVizzyLucky add then when your ready.

    2 days ago
  • Profile image

    @lafario Created a forum myself so I can add pictures later

    +1 2 days ago

No Upvotes

Log in in to upvote this post.