Half-ish port to isurface
Todo: fix fonts
This commit is contained in:
parent
95032a2c82
commit
ee2f9f6fa0
@ -45,7 +45,7 @@ public:
|
||||
const float width;
|
||||
const float height;
|
||||
|
||||
glez::texture texture;
|
||||
draw::Texture texture;
|
||||
};
|
||||
|
||||
texture_atlas &atlas();
|
||||
|
@ -1075,7 +1075,7 @@ void DrawNode(index_t node, bool draw_back)
|
||||
if (not draw::WorldToScreen(n.xyz(), wts))
|
||||
return;
|
||||
|
||||
glez::draw::outlined_string(wts.x, wts.y, std::to_string(node).c_str(), *fonts::menu, *color, colors::black, nullptr, nullptr);
|
||||
draw::String(wts.x, wts.y, *color, std::to_string(node).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ sprite::sprite(float x, float y, float w, float h, texture_atlas &atlas) : nx(x)
|
||||
}
|
||||
void sprite::draw(float scrx, float scry, float scrw, float scrh, const rgba_t &rgba)
|
||||
{
|
||||
glez::draw::rect_textured(scrx, scry, scrw, scrh, rgba, atlas.texture, nx, ny, nw, nh, 0);
|
||||
draw::RectangleTextured(scrx, scry, scrw, scrh, rgba, atlas.texture, nx, ny, nw, nh, 0);
|
||||
}
|
||||
|
||||
texture_atlas::texture_atlas(std::string filename, float width, float height) : width(width), height(height), texture(filename)
|
||||
|
@ -83,7 +83,7 @@ void DrawSpinner()
|
||||
angle += speed_scale * real_speed;
|
||||
int state = min(3, int(spinning_speed / 250));
|
||||
|
||||
glez::draw::rect_textured(draw::width / 2 - size * 0.5f, draw::height / 2 - size * 0.5f, size, size, colors::white, textures::atlas().texture, 64 * state, (3 + (v9mode ? 0 : 1)) * 64, 64, 64, angle);
|
||||
draw::RectangleTextured(draw::width / 2 - size * 0.5f, draw::height / 2 - size * 0.5f, size, size, colors::white, textures::atlas().texture, 64 * state, (3 + (v9mode ? 0 : 1)) * 64, 64, 64, angle);
|
||||
if (angle > PI * 4)
|
||||
angle -= PI * 4;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include <menu/BaseMenuObject.hpp>
|
||||
#include <menu/object/Text.hpp>
|
||||
#include <menu/Menu.hpp>
|
||||
#include <glez/draw.hpp>
|
||||
#include <drawing.hpp>
|
||||
|
||||
/*
|
||||
Created on 08.07.18.
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
void zerokernel::Text::render()
|
||||
{
|
||||
glez::draw::outlined_string(bb.getContentBox().left() + text_x, bb.getContentBox().top() + text_y, data, *font, *color_text, *color_outline, nullptr, nullptr);
|
||||
draw::String(bb.getContentBox().left() + text_x, bb.getContentBox().top() + text_y, *color_text, data.c_str());
|
||||
|
||||
BaseMenuObject::render();
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <glez/font.hpp>
|
||||
#include <sstream>
|
||||
#include <glez/color.hpp>
|
||||
#include <glez/draw.hpp>
|
||||
#include <drawing.hpp>
|
||||
#include <menu/Menu.hpp>
|
||||
|
||||
namespace utility
|
||||
@ -114,6 +114,6 @@ void drawCenteredString(int x, int y, const std::string &string, glez::font &fon
|
||||
{
|
||||
float width;
|
||||
font.stringSize(string, &width, nullptr);
|
||||
glez::draw::outlined_string(x - width / 2, y, string, font, color, *zerokernel::style::colors::text_shadow, nullptr, nullptr);
|
||||
draw::String(x - width / 2, y, color, string.c_str());
|
||||
}
|
||||
} // namespace utility
|
||||
} // namespace utility
|
||||
|
@ -9,7 +9,7 @@
|
||||
Created on 07.07.18.
|
||||
*/
|
||||
|
||||
static glez::texture cross{ DATA_PATH "/menu/cross.png" };
|
||||
static draw::Texture cross{ DATA_PATH "/menu/cross.png" };
|
||||
static settings::RVariable<glez::rgba> background_hover{ "zk.style.window-close-button.color.background-hover", "ff0000" };
|
||||
static settings::RVariable<glez::rgba> color_border{ "zk.style.window-close-button.color.border", "079797" };
|
||||
|
||||
@ -20,7 +20,7 @@ void zerokernel::WindowCloseButton::render()
|
||||
draw::Rectangle(cb.left(), cb.top(), cb.width, cb.height - 1, *background_hover);
|
||||
// glez::draw::line(cb.left(), cb.top(), 0, cb.height, *color_border, 1);
|
||||
renderBorder(*color_border);
|
||||
glez::draw::rect_textured(cb.x + 1, cb.y, cb.width, cb.height, glez::color::white, cross, 0, 0, cb.width, cb.height, 0);
|
||||
draw::RectangleTextured(cb.x + 1, cb.y, cb.width, cb.height, glez::color::white, cross, 0, 0, 14, 14, 0);
|
||||
}
|
||||
|
||||
zerokernel::WindowCloseButton::WindowCloseButton() : BaseMenuObject{}
|
||||
|
Reference in New Issue
Block a user