Commit Graph

312 Commits

Author SHA1 Message Date
6da71e1819 Merge remote-tracking branch 'upstream/master' 2022-03-05 11:37:32 +01:00
SmallJoker
dbe06be68b
Add scroll bar for overflowing tab buttons (#195) 2022-02-26 11:41:15 +01:00
SmallJoker
3074d625e2 Version 4: Feature checks and deprecate internal functions 2022-02-26 11:38:45 +01:00
James William Fletcher
5ac2558da4 Speed up group filtering code
This improves the startup time dramatically by lowering the algorithm complexity.
Mainly noticeable with large inventory sizes.

Written by Test_User, post-edited by SmallJoker
2022-02-26 11:03:21 +01:00
SmallJoker
25c40fea6c Fix filter reset for empty search boxes 2022-01-24 15:20:57 +01:00
SmallJoker
23a45b8131 Only update formspec on search filter changes 2022-01-23 18:15:17 +01:00
9649c0ed0e Merge remote-tracking branch 'github/master' 2022-01-22 20:08:35 +01:00
Oversword
d6688872c8
Fix two occasional runtime errors (#191) 2021-12-25 17:31:18 +01:00
4633a276a2 Merge remote-tracking branch 'upstream/master' 2021-12-17 18:16:48 +01:00
SmallJoker
64b0248c77 Remove mod name from tooltips
Requested in #190. The mod name is not relevant for most players, and the full item name can still be seen in the craft recipe viewer mode.
2021-12-11 17:15:58 +01:00
1ac54a017d Merge remote-tracking branch 'github/master' 2021-11-26 21:45:26 +01:00
OgelGames
28a5d4db49
Show wear and description in crafting guide (#189) 2021-11-21 19:42:54 +01:00
4c4fb3ba88 Merge remote-tracking branch 'github/master' 2021-11-01 10:43:50 +01:00
Oversword
8c84751ff8
Add u_i initialization and craft registration callbacks (#184)
Main purpose: custom recipe sorting provided by cuszom mods.
2021-10-14 18:38:07 +02:00
9d66a21271 Merge remote-tracking branch 'upstream/master' 2021-08-31 20:12:45 +02:00
SmallJoker
b1c85a2cb8 Fix waypoint initialization order 2021-08-29 07:47:32 +02:00
SmallJoker
3fffa41eaf Remove unused internal functions 2021-08-24 19:44:36 +02:00
SmallJoker
077bed90eb Move default inventory draw calls to separate functions 2021-08-14 15:25:55 +02:00
15a84bdbf4 Merge remote-tracking branch 'upstream/master' 2021-07-24 13:14:48 +02:00
SmallJoker
6d123da61c Update translation strings 2021-07-20 20:41:23 +02:00
SmallJoker
d39dd78cb5 Use player meta for waypoints 2021-07-20 20:41:23 +02:00
838c67ae86 Merge remote-tracking branch 'upstream/master' 2021-07-17 20:48:14 +02:00
SmallJoker
aeb9841e3a Remove default hard dependency for use in devtest 2021-07-17 10:35:39 +02:00
132a362f85 Merge remote-tracking branch 'upstream/master' 2021-06-20 17:33:07 +02:00
David Leal
afd38e0c73
Fix LuaCheck warning (#175) 2021-05-25 19:31:34 +02:00
SmallJoker
4d4355a741 Home: Fix error on missing write permission 2021-05-13 15:19:46 +02:00
03b077cd1b Merge remote-tracking branch 'upstream/master' 2021-04-08 13:39:49 +02:00
Oversword
6e6383f082
Add filter-by-category functionality (#171)
- Added API for configuring categories
- Added display for categories above page
- Reduced height of page by 1 row to make room for categories
- Added L/R scroll through when there are more categories than columns
- Added pre-filter methods for categories and uncategorised items
- Added categories for (most) items in the default game


Co-authored-by: Oversword <bionc:oversword.co.uk>
2021-04-05 20:07:14 +02:00
829b38c6fc Merge remote-tracking branch 'upstream/master' 2021-04-04 21:05:40 +02:00
Vanessa Dannenberg
860371ecf8 more consistent formspec size decision 2021-03-31 00:52:30 -04:00
70fdb8556b Merge remote-tracking branch 'upstream/master' 2021-03-12 12:01:23 +01:00
Vanessa Dannenberg
c044f5e3b0 use the trash slot icon's alpha instead of [combine
also it's supposed to be 128px, not 256px.  fixed that.
2021-03-10 21:20:31 -05:00
Vanessa Dannenberg
608cdfb887 fix refill slot list[] offset also 2021-03-10 12:32:55 -05:00
Vanessa Dannenberg
afb295ec22 fix trash slot list[] offset
(only noticable when listcolors[] allows slots to be visible,
i.e. on mouseover)
2021-03-10 12:26:28 -05:00
Vanessa Dannenberg
a84ce24067 use the ui.list_img_offset variable for offsetting the std inv list[]
so that it'll match every other list that uses it.
2021-03-09 18:31:16 -05:00
Vanessa Dannenberg
a7556c5044 update minimum MT version number 2021-03-09 15:09:46 -05:00
SmallJoker
3d58befe03 Document the API version 2021-03-09 15:04:11 -05:00
Vanessa Dannenberg
d0deba10c8 pngcrush+optipng the new slot textures
and remove the slot image .xcf project file
2021-03-09 15:04:11 -05:00
Vanessa Dannenberg
97b882ad23 add a version number variable to the main table 2021-03-09 15:04:11 -05:00
Vanessa Dannenberg
44e32df00a translate some strings inside their table 2021-03-09 15:04:11 -05:00
Vanessa Dannenberg
40d862298b replace excessive spaces with tabs 2021-03-09 15:04:11 -05:00
Vanessa Dannenberg
0ebc9402ed minor tweaks to the slot images
to make them better-resemble their pre-9-sliced versions
(going to that mode made them slightly bigger and the corners
slightly less round since they aren't blurry anymore)
2021-03-09 15:04:11 -05:00
Vanessa Dannenberg
2c16805ef9 Get rid of the image button left of the crafting guide
It had the same function as clicking the craft result on the
right (just inverted), making it redundant. Click either one more
than once and UI would alternately show usages or recipes.
2021-03-09 15:04:11 -05:00
Vanessa Dannenberg
dc61d2980a Move craft guide a little to the right to make some room. 2021-03-09 15:04:11 -05:00
Vanessa Dannenberg
21f122336f make craft arrow 128px
(same reason as the trash icon)
2021-03-09 15:04:11 -05:00
Vanessa Dannenberg
8ee0eb9fce swap the craft type icon with its word
(makes it look like it used to)
2021-03-09 15:04:11 -05:00
Vanessa Dannenberg
1210dbfe22 make trash slot icon 128px
MT nearest-neighbor-scales images to about 75px if they're 1x1
slot in size (at least on my screen).  Use the next power of 2
above that, so that MT can scale down instead of up.
2021-03-09 15:04:11 -05:00
Vanessa Dannenberg
b8a568d7eb remove unused var, excess whitespace 2021-03-09 15:04:11 -05:00
Vanessa Dannenberg
9ddea6eced fix missing "XYZ" and "no" icon on waypoints show coordinates button 2021-03-09 15:04:11 -05:00
Vanessa Dannenberg
76c9bb9517 Use 9-slicing to build inventory-type backgrounds
This way the slots are all nice and crisp regardless of GUI scale or
image size, and we only need the single slot and its bright version.

This also makes the standard crafting grid into a style table entry that
can be referenced to insert the crafting grid at its proper
style-specific position in any formspec.

And it also makes the craft grid arrow, its X position, and the crafting
grid's result slot X position into style table entries.

Includes a few public helper functions to do most of the work:

`ui.single_slot(xpos, ypos, bright)`

    Does just what it sounds like: it returns a single slot image.
    `xpos` and `ypos` are normal coordinates in slots, as you'd use in
    `image[]` element.  `bright` is a flag that switches to the brighter
    version of the slot image.

`ui.make_trash_slot(xpos, ypos)`

    Creates a single slot, with a one-item `list[]` and a trash can icon
    overlay.

`ui.make_inv_img_grid(xpos, ypos, width, height, bright)`

    Generates a `width` by `height` grid of slot images, using the
    single_slot function above, starting at (`xpos`,`ypos`) for the
    top-left.  Position is as in any `image[]` element, and dimensions
    are in integer numbers of slots (so 8,4 would be a standard inventory).
    `bright` is as above.

All three return a string that can be directly inserted into a formspec.
2021-03-09 15:04:11 -05:00