]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - builtin/fstk/buttonbar.lua
Add HTTP API to main menu (#9998)
[dragonfireclient.git] / builtin / fstk / buttonbar.lua
index 1ad175624afacb7306e18995d0967f3395e3d6e6..465588324a4ae8885ed6e3b085ac95c09552325c 100644 (file)
@@ -145,7 +145,12 @@ local buttonbar_metatable = {
                        if image == nil then image = "" end
                        if tooltip == nil then tooltip = "" end
 
-                       table.insert(self.buttons,{ name=name, caption=caption, image=image, tooltip=tooltip})
+                       self.buttons[#self.buttons + 1] = {
+                               name = name,
+                               caption = caption,
+                               image = image,
+                               tooltip = tooltip
+                       }
                        if self.orientation == "horizontal" then
                                if ( (self.btn_size * #self.buttons) + (self.btn_size * 0.05 *2)
                                        > self.size.x ) then