aboutsummaryrefslogtreecommitdiff
path: root/textures/base/pack
ModeNameSize
-rw-r--r--blank.png95logplain
-rw-r--r--camera_btn.png729logplain
-rw-r--r--chat_btn.png399logplain
-rw-r--r--debug_btn.png895logplain
-rw-r--r--down.png1328logplain
-rw-r--r--down_arrow.png373logplain
-rw-r--r--drop_btn.png1035logplain
-rw-r--r--fast_btn.png875logplain
-rw-r--r--fly_btn.png720logplain
-rw-r--r--gear_icon.png1005logplain
-rw-r--r--halo.png144logplain
-rw-r--r--inventory_btn.png343logplain
-rw-r--r--jump_btn.png434logplain
-rw-r--r--left_arrow.png400logplain
-rw-r--r--logo.png12188logplain
-rw-r--r--menu_bg.png124logplain
-rw-r--r--menu_header.png1628logplain
-rw-r--r--minimap_mask_round.png1858logplain
-rw-r--r--minimap_mask_square.png420logplain
-rw-r--r--minimap_overlay_round.png22044logplain
-rw-r--r--minimap_overlay_square.png1686logplain
-rw-r--r--no_screenshot.png140logplain
-rw-r--r--noclip_btn.png1087logplain
-rw-r--r--object_marker_red.png449logplain
-rw-r--r--player_marker.png2178logplain
-rw-r--r--rangeview_btn.png1476logplain
-rw-r--r--rare_controls.png349logplain
-rw-r--r--right_arrow.png396logplain
-rw-r--r--server_flags_creative.png273logplain
-rw-r--r--server_flags_damage.png713logplain
-rw-r--r--server_flags_favorite.png916logplain
-rw-r--r--server_flags_pvp.png1048logplain
-rw-r--r--smoke_puff.png1233logplain
-rw-r--r--sunrisebg.png4231logplain
-rw-r--r--unknown_item.png292logplain
-rw-r--r--unknown_node.png193logplain
-rw-r--r--unknown_object.png254logplain
-rw-r--r--up_arrow.png373logplain
nil and self.startbutton < #self.buttons then self.startbutton = self.startbutton + 1 return true end if fields["btnbar_dec_" .. self.name] ~= nil and self.startbutton > 1 then self.startbutton = self.startbutton - 1 return true end for i=1,#self.buttons,1 do if fields[self.buttons[i].name] ~= nil then return self.userbuttonhandler(fields) end end end local buttonbar_metatable = { handle_buttons = buttonbar_buttonhandler, handle_events = function(self, event) end, get_formspec = buttonbar_formspec, hide = function(self) self.hidden = true end, show = function(self) self.hidden = false end, delete = function(self) ui.delete(self) end, add_button = function(self, name, caption, image, tooltip) if caption == nil then caption = "" end if image == nil then image = "" end if tooltip == nil then tooltip = "" end table.insert(self.buttons,{ 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 self.btn_initial_offset = self.btn_size * 0.05 + 0.5 self.have_move_buttons = true end else if ((self.btn_size * #self.buttons) + (self.btn_size * 0.05 *2) > self.size.y ) then self.btn_initial_offset = self.btn_size * 0.05 + 0.5 self.have_move_buttons = true end end end, set_bgparams = function(self, bgcolor) if (type(bgcolor) == "string") then self.bgcolor = bgcolor end end, } buttonbar_metatable.__index = buttonbar_metatable function buttonbar_create(name, cbf_buttonhandler, pos, orientation, size) assert(name ~= nil) assert(cbf_buttonhandler ~= nil) assert(orientation == "vertical" or orientation == "horizontal") assert(pos ~= nil and type(pos) == "table") assert(size ~= nil and type(size) == "table") local self = {} self.name = name self.type = "addon" self.bgcolor = "#000000" self.pos = pos self.size = size self.orientation = orientation self.startbutton = 1 self.have_move_buttons = false self.hidden = false if self.orientation == "horizontal" then self.btn_size = self.size.y else self.btn_size = self.size.x end if (self.btn_initial_offset == nil) then self.btn_initial_offset = self.btn_size * 0.05 end self.userbuttonhandler = cbf_buttonhandler self.buttons = {} setmetatable(self,buttonbar_metatable) ui.add(self) return self end