From 1569867f8fed0d0d71618a92086673c9040f8fb9 Mon Sep 17 00:00:00 2001 From: SimonFlapse Date: Mon, 10 Jun 2019 01:14:23 +0200 Subject: [PATCH] Made soundpaths selectable --- features/gui/radio.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/features/gui/radio.lua b/features/gui/radio.lua index 87389183..a1fcc5c9 100644 --- a/features/gui/radio.lua +++ b/features/gui/radio.lua @@ -103,8 +103,12 @@ local function draw_radio(event) for type, sound in pairs(sounds) do for i = 1, #sound do local name = (type == 'default') and sound[i] or type .. '/' .. sound[i] - main_table.add {type = 'label', caption = type .. '/' .. sound[i]} - main_table.add {type = 'button', name = 'radio_play:' .. name, caption = 'Play'} + local textbox = main_table.add {type = 'text-box', text = type .. '/' .. sound[i]} + textbox.read_only = true + textbox.style.height = 28 + textbox.style.width = 250 + local button = main_table.add {type = 'button', name = 'radio_play:' .. name, caption = 'Play'} + button.style.width = 54 end end