# Any way to create/edit overlays in LUA?

**URL:** <https://forum.electra.one/t/any-way-to-create-edit-overlays-in-lua/1160>\
**Category:** Ideas / Feature requests\
**Created:** [November 28, 2021, 9:09pm UTC](https://forum.electra.one/t/any-way-to-create-edit-overlays-in-lua/1160 "2021-11-28T21:09:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![oldgearguy](https://avatars.discourse-cdn.com/v4/letter/o/f4b2a3/32.png) [@oldgearguy](https://forum.electra.one/u/oldgearguy)\
**Post date:** [November 28, 2021, 9:09pm UTC](https://forum.electra.one/t/any-way-to-create-edit-overlays-in-lua/1160/1 "2021-11-28T21:09:17Z")

</div>

Is there any way to directly access the overlay structures from LUA?  
I would love to be able to generate a list of preset names for the user to use as a selection list.

If there was a way to even edit/replace the text in an overlay, I could create a blank list of 127 overlay entries and then update them with patch names dynamically. I know we can get/set the overlay ID, but that is just swapping between existing overlays rather than creating a new one on the fly.

---

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/martin/32/145_2.png) [@martin](https://forum.electra.one/u/martin)\
**Post date:** [November 29, 2021, 7:33am UTC](https://forum.electra.one/t/any-way-to-create-edit-overlays-in-lua/1160/2 "2021-11-29T07:33:12Z")

</div>

Yeah, this makes perfect sense. The main reasons why I was staying away from that is it might cause a memory fragmentation and may result in Electra running out of memory. Even the updates of the texts may cause that. I will give it some quality thinking.

---

<div class="post-metadata">

**Author:** ![oldgearguy](https://avatars.discourse-cdn.com/v4/letter/o/f4b2a3/32.png) [@oldgearguy](https://forum.electra.one/u/oldgearguy)\
**Post date:** [November 29, 2021, 10:30am UTC](https://forum.electra.one/t/any-way-to-create-edit-overlays-in-lua/1160/3 "2021-11-29T10:30:39Z")

</div>

Based on my reading of LUA in general, I know that the memory fragmentation and string handling can be difficult in any environment.

I would be OK with having to pre-define an overlay (in my specific case it would be 128 entries of 14 characters each plus trailing NULL if required), attach it to a control, and then be able to edit it as needed.

That way, all the space is predefined and the OS would only have to check for string length overflows.
