# How to create a series of buttons

**URL:** <https://forums.unrealengine.com/t/how-to-create-a-series-of-buttons/342521>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [December 27, 2015, 5:56pm UTC](https://forums.unrealengine.com/t/how-to-create-a-series-of-buttons/342521 "2015-12-27T17:56:06Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rorog2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rorog2](https://forums.unrealengine.com/u/rorog2)\
**Post date:** [December 27, 2015, 5:56pm UTC](https://forums.unrealengine.com/t/how-to-create-a-series-of-buttons/342521/1 "2015-12-27T17:56:06Z")

</div>

Hello,  
I want to know how to create a serie of buttons side by side and they have a different function.  
Thank you beforehand.

---

<div class="post-metadata">

**Author:** ![Sean\_Flint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Flint](https://forums.unrealengine.com/u/Sean_Flint)\
**Post date:** [December 28, 2015, 2:38pm UTC](https://forums.unrealengine.com/t/how-to-create-a-series-of-buttons/342521/2 "2015-12-28T14:38:29Z")

</div>

Hello,

The best way to create buttons in your game is to make use of UMG. You can find the documentation on UMG here: [UMG UI Designer | Unreal Engine Documentation](https://docs.unrealengine.com/latest/INT/Engine/UMG/)

First, you’ll need to create a new Widget Blueprint:

![72065-widgetblueprint.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/1/a/81a8d66979f6e844577cba25fa1b13c284f35a62.png)

Open the widget blueprint, and then add a few buttons to the canvas panel. You can do that by dragging the Buttons from the Palette onto your Canvas Panel:

 ![72066-addingbuttons.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/b/d/9bd32e5e1a87036f3e2dc982a6f910348f947d6c.png)

I added two buttons, but feel free to add as many as you need, and format them in any way you’d like. In order to get the logic working on your buttons, you’ll need to add an OnClicked event. To do this, select one of your buttons, and in the Details panel click the + next to OnClicked. This will add the event and take you to your Event Graph.

 ![72067-onclickedevent.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/b/2/ab26bf5d3c92bdc5e18446afe4778b422c455474.png)

From here, you can add the functionality that you would like your buttons to have. Each button will have a separate OnClicked event, so you can customize the functionality on a per-button basis.

 ![72068-eventgraph.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/0/6/d06222ac37fabddf8bf82df741c048c3219ca409.png)

Feel free to let me know if there are any further questions.

Have a great day,

Sean Flint

---

<div class="post-metadata">

**Author:** ![rorog2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rorog2](https://forums.unrealengine.com/u/rorog2)\
**Post date:** [December 28, 2015, 5:09pm UTC](https://forums.unrealengine.com/t/how-to-create-a-series-of-buttons/342521/3 "2015-12-28T17:09:39Z")

</div>

Thanks for your answer.  
But I talked button in the game.

---

<div class="post-metadata">

**Author:** ![Sean\_Flint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Flint](https://forums.unrealengine.com/u/Sean_Flint)\
**Post date:** [December 29, 2015, 3:05pm UTC](https://forums.unrealengine.com/t/how-to-create-a-series-of-buttons/342521/4 "2015-12-29T15:05:55Z")

</div>

Once you’ve created the buttons as detailed in the steps above, you can go into your Level Blueprint, and on Event Begin Play add a Create Widget node (ensure that you select your Widget blueprint from the dropdown), and then connect the return value of the Create Widget node to an Add to Viewport node. This will display the widget on your screen when you PIE.

---

<div class="post-metadata">

**Author:** ![rorog2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rorog2](https://forums.unrealengine.com/u/rorog2)\
**Post date:** [December 30, 2015, 10:28am UTC](https://forums.unrealengine.com/t/how-to-create-a-series-of-buttons/342521/5 "2015-12-30T10:28:39Z")

</div>

Thank you for the clarification, but I meant the buttons in the game with a model like elevator buttons.

---

<div class="post-metadata">

**Author:** ![Sean\_Flint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Flint](https://forums.unrealengine.com/u/Sean_Flint)\
**Post date:** [December 30, 2015, 2:18pm UTC](https://forums.unrealengine.com/t/how-to-create-a-series-of-buttons/342521/6 "2015-12-30T14:18:30Z")

</div>

If you run a search here [Unreal Engine 5 Documentation | Unreal Engine Documentation](https://docs.unrealengine.com/latest/INT/) and search for Elevator Button, this is the first result that you will see [https://answers.unrealengine.com/questions/335628/elevator-button-blueprints.html](https://answers.unrealengine.com/questions/335628/elevator-button-blueprints.html)

---

<div class="post-metadata">

**Author:** ![rorog2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rorog2](https://forums.unrealengine.com/u/rorog2)\
**Post date:** [January 2, 2016, 1:56pm UTC](https://forums.unrealengine.com/t/how-to-create-a-series-of-buttons/342521/7 "2016-01-02T13:56:57Z")

</div>

I speak as a button in a control room
