icons: add repeat icon
This commit is contained in:
parent
c3c5c56edb
commit
5e52562a1c
BIN
font/icons.data
BIN
font/icons.data
Binary file not shown.
BIN
font/icons.pgm
BIN
font/icons.pgm
Binary file not shown.
@ -4,18 +4,19 @@
|
||||
|
||||
namespace icons {
|
||||
|
||||
constexpr float texture_width = 1.0 / 63.0;
|
||||
constexpr float texture_height = 1.0 / 31.0;
|
||||
constexpr float texture_width = 1.0 / 64.0;
|
||||
constexpr float texture_height = 1.0 / 32.0;
|
||||
|
||||
const icon icons[] = {
|
||||
[ff] = icon(18, 19, 9, 8),
|
||||
[fff] = icon(14, 19, 13, 8),
|
||||
[next] = icon(41, 12, 20, 11),
|
||||
[prev] = icon(41, 0, 20, 11),
|
||||
[rr] = icon(0, 19, 9, 8),
|
||||
[rrr] = icon(0, 19, 13, 8),
|
||||
[play] = icon(0, 0, 18, 18),
|
||||
[pause] = icon(18, 0, 18, 18),
|
||||
[ff] = icon(18, 19, 9, 7),
|
||||
[fff] = icon(14, 19, 13, 7),
|
||||
[next] = icon(45, 12, 19, 11),
|
||||
[prev] = icon(45, 0, 19, 11),
|
||||
[rr] = icon(0, 19, 9, 7),
|
||||
[rrr] = icon(0, 19, 13, 7),
|
||||
[play] = icon(0, 0, 17, 17),
|
||||
[pause] = icon(18, 0, 17, 17),
|
||||
[repeat] = icon(28, 18, 16, 11),
|
||||
};
|
||||
|
||||
constexpr inline vec3 transform_position(const vec2& p, icon_type type,
|
||||
@ -31,8 +32,8 @@ namespace icons {
|
||||
constexpr inline vec2 transform_texture(const vec2& t, icon_type type)
|
||||
{
|
||||
return {
|
||||
(icons[type].x + t.x * icons[type].width) * texture_width,
|
||||
(icons[type].y + t.y * icons[type].height) * texture_height,
|
||||
(float)(icons[type].x + t.x * icons[type].width) * texture_width,
|
||||
(float)(icons[type].y + t.y * (icons[type].height + 1)) * texture_height,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -13,6 +13,7 @@ namespace icons {
|
||||
rrr,
|
||||
play,
|
||||
pause,
|
||||
repeat,
|
||||
};
|
||||
|
||||
struct icon {
|
||||
|
Loading…
x
Reference in New Issue
Block a user