added arrow button textures

master
Alexander Weber 2020-01-12 14:13:16 +01:00
parent b02d730978
commit 8ff56a3322
4 changed files with 3 additions and 2 deletions

View File

@ -74,3 +74,4 @@ License: [LGPL-3](https://github.com/bell07/minetest-smart_inventory/blob/master
Textures:
- Workbench: WTFPL (credits: to xdecor project)
- Buttons: WTFPL (credits to Stix (Minetest-forum))
- Arrow buttons: WTFPL (credits to daretmavi)

View File

@ -228,14 +228,14 @@ function buttons_grid:update()
if btnid == 1 and self.data.list_start > 1 then
-- setup back button
button:setVisible(true)
button:setImage("left_arrow.png")
button:setImage("smart_inventory_left_arrow.png")
button:setText(tostring(self.data.list_start-1))
button:setSize(self.data.cell_size.w, self.data.cell_size.h)
self.data.pagesize = self.data.pagesize - 1
elseif btnid == self.data.grid_size.w * self.data.grid_size.h and self.data.list[itemindex+1] then
-- setup next button
button:setVisible(true)
button:setImage("right_arrow.png")
button:setImage("smart_inventory_right_arrow.png")
self.data.pagesize = self.data.pagesize - 1
button:setText(tostring(#self.data.list-self.data.list_start-self.data.pagesize+1))
button:setSize(self.data.cell_size.w, self.data.cell_size.h)

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 460 B