Commit Graph

36 Commits

Author SHA1 Message Date
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
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
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
21f122336f make craft arrow 128px
(same reason as the trash icon)
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
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
Vanessa Dannenberg
60d7a6d213 Draw the trash slot by overlaying the bare trash can icon
over the single slot image instead of baking it in.
2021-03-09 15:04:11 -05:00
Vanessa Dannenberg
de575a6513 9-slice the background image 2021-03-09 15:04:11 -05:00
Vanessa Dannenberg
167dddaa84 Convert over to formspec version 4
I recreated the original layout as best as practical, but by necessity
there are a few minor positioning changes, since the underlying
hard-wired inventory slots are square now and image positioning is now
scaled by exactly 1.250 in both dimensions (as opposed to roughly 1.25
by 1.16).

Backstage, I also needed to fix the aspect ratios of the various
inventory slot elements.  That meant redesigning the single-slot image
from scratch.  It was already blurry/grainy and a little ugly, and
trying to alter it would have only made it worse.

The slot image is now exactly 56x56 pixels square, set on a 64x64
canvas, so there's a 4 pixel empty space around the edges. The full
256px .xcf workfile is included in the UI folder.

I've re-tiled all slot/inv images from the new single slot.

I also re-rendered the trash can icon from it since it was blurry and
oddly-sized. I couldn't find the original upstream image, so since
they're free, I used one of my Linux system's icons which happens to
resemble it.

I also removed a couple more improper uses of `background[]` where
`image[]` is more appropriate.

There are tons of minor tweaks throughout the code to re-align
everything, and I had to rewrite a few sections to avoid code
duplication and to allow for a little more flexibility (mainly to make
"lite" mode look right).
2021-03-09 15:04:11 -05:00
Vanessa Dannenberg
ebd1d1f245 Improve consistency of inventory (and alike) imagery
In a number of places, background[] is misused to place the
inventory backdrop images.  Where appropriate, image[] is used
instead, so that "ui_form_bg.png" actually serves as the one
and only true background image.

In so doing, I was able to remake the bag inventory images,
making them only big as is actually needed to hold 1, 2, or 3
rows of inventory slots.

This, in turn, allows a standardized main inventory image to
occupy the lower part of the window, which allows for
consistent inventory image positioning and sizing from one
page to another.

I also removed ui_misc_form.png.  Nothing in UI uses it, and
any external mods that used it can just use the standard
inventory and its background.

Lastly, I reduced the background image to 512x384 px.  It was
unnecessarily large before, considering it has no real detail.

The larger inventory images are all 512px wide, and multiples
of 64px in height.  Before, they were oddly sized.
2021-03-01 18:57:50 +01:00
MoNTE48
a70ffb1509 Compress textures (-61 KB!) 2019-05-31 17:30:24 +02:00
ForbiddenJ
7ab8825460 Make trash configurable but preserve default functionality 2017-03-01 16:28:40 -06:00
Diego Martínez
75a0e6a318 Bags: Code cleanup and per-bag trash slot.
* Turn page creation into a loop.
* Add per-bag trash slot.
* Changed i18n to allow replacements.
2016-11-17 19:19:51 -03:00
Wuzzy
2a516ac22b Add seperate button for resetting search 2016-08-14 23:35:12 +02:00
Wuzzy
08d8d99ab3 Add crafting type: digging by chance 2016-08-07 03:49:16 +02:00
HybridDog
5aab3640ec adv- and optipng textures
M  screenshot.png
M  textures/bags_large.png
M  textures/bags_medium.png
M  textures/bags_small.png
M  textures/ui_1_icon.png
M  textures/ui_2_icon.png
M  textures/ui_3_icon.png
M  textures/ui_4_icon.png
M  textures/ui_5_icon.png
M  textures/ui_bags_icon.png
M  textures/ui_bags_lg_form.png
M  textures/ui_bags_main_form.png
M  textures/ui_bags_med_form.png
M  textures/ui_bags_sm_form.png
M  textures/ui_blank_image.png
M  textures/ui_blue_icon_background.png
M  textures/ui_circular_arrows_icon.png
M  textures/ui_craft_icon.png
M  textures/ui_craftgrid_icon.png
M  textures/ui_craftguide_form.png
M  textures/ui_craftguide_icon.png
M  textures/ui_crafting_form.png
M  textures/ui_doubleleft_icon.png
M  textures/ui_doubleright_icon.png
M  textures/ui_form_bg.png
M  textures/ui_gohome_icon.png
M  textures/ui_green_icon_background.png
M  textures/ui_group.png
M  textures/ui_home_icon.png
M  textures/ui_left_icon.png
M  textures/ui_main_inventory.png
M  textures/ui_misc_form.png
M  textures/ui_moon_icon.png
M  textures/ui_no.png
M  textures/ui_off_icon.png
M  textures/ui_ok_icon.png
M  textures/ui_on_icon.png
M  textures/ui_pencil_icon.png
M  textures/ui_red_icon_background.png
M  textures/ui_right_icon.png
M  textures/ui_search_icon.png
M  textures/ui_sethome_icon.png
M  textures/ui_skip_backward_icon.png
M  textures/ui_skip_forward_icon.png
M  textures/ui_sun_icon.png
M  textures/ui_trash_icon.png
M  textures/ui_waypoint_set_icon.png
M  textures/ui_waypoints_icon.png
M  textures/ui_xyz_icon.png
M  textures/ui_xyz_off_icon.png
M  textures/ui_xyz_on_icon.png
2016-07-15 09:53:27 +02:00
Vanessa Ezekowitz
2d6a0ed606 split ui_crafting_form
into craft grid/trash image and a single slot image.  The latter is now
used for a refill slot if user has creative priv or server is in
creative mode.
2015-08-05 08:37:25 -04:00
Rogier
2fd9e59242 Display conversion method symbolically and textually next to arrow 2015-03-11 16:00:37 +01:00
Zefram
87f502a259 Show item usages in craft guide
When the craft guide is showing a craft, the output slot is now a button,
which causes the craft guide to show ways in which that output can be
used.  This mirrors the way input slots are buttons that show recipes
for the selected ingredient.  Usages of an item can be iterated through
in the same way as recipes for the item.  This incidentally offers some
ability to retrace one's steps through a crafting chain, without storing
actual history.
2014-06-13 11:30:09 -03:00
Zefram
c33efe8631 Cleaner display of lack of recipes (redux)
When the current craft guide item has no recipes, show a "no" symbol
instead of an ingredient grid, alongside the "No recipes" message.
When no item is selected in the craft guide, leave the recipe space empty.
2014-06-13 09:28:40 -03:00
Vanessa Ezekowitz
44d967bbe5 did the same for sun/moon icons 2014-05-19 02:02:34 -04:00
Vanessa Ezekowitz
82d204cb7a Added a small empty border around most icons
(and shrunk them accordingly)
2014-05-19 01:58:20 -04:00
Vanessa Ezekowitz
6780ae4abd better "xyz off" image 2014-05-13 20:56:59 -04:00
Vanessa Ezekowitz
3f8a7fb816 All new imagery, redone from scratch at 128px. 2014-05-13 20:48:10 -04:00
RealBadAngel
ba956d6838 Add missing textures for waypoints 2014-05-05 09:59:59 +02:00
RealBadAngel
b9b2892f28 Add waypoints support (requires current minetest from git) 2014-05-05 09:39:03 +02:00
RealBadAngel
34a52a4c0f Remove text from on/off switch icons 2014-01-22 08:06:02 +01:00
RealBadAngel
7cdae9bafc Icons for on/off switch and waypoints button. 2014-01-22 07:30:04 +01:00
ShadowNinja
982c58e8b4 Remove technic textures 2013-12-17 19:19:27 -05:00
RealBadAngel
aec3cb2fc1 Fix textures aligment problems.
Some other tweaks.
2013-10-05 22:48:45 +02:00
ShadowNinja
ec328d8270 Change craft guide input slots to buttons 2013-10-02 22:23:35 -04:00
ShadowNinja
f974fd8c2c Update 2013-09-28 18:15:37 -04:00
RealBadAngel
e3d391d63f Update mod 2013-09-21 21:40:20 +02:00
RealBadAngel
43e308a815 New version:
another structure, its a modpack now
searches are not case sensitive
2012-12-11 00:48:23 +01:00
RealBadAngel
216078a0f8 1st release 2012-12-02 10:08:32 +01:00