aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-11-07 22:21:52 +0100
committerdec05eba <dec05eba@protonmail.com>2022-11-11 00:53:46 +0100
commite19a29c7e51860144f02d7e7b08ac5e430e1f78f (patch)
treef57adcf98b77a271b4df74a20e2389b73f495df7 /include
parent5d2a7d977f9b0a1604e106f4e2b0c2c9b89c3235 (diff)
Support images in text, add custom emoji to matrix
Diffstat (limited to 'include')
-rw-r--r--include/Text.hpp7
-rw-r--r--include/types.hpp10
2 files changed, 4 insertions, 13 deletions
diff --git a/include/Text.hpp b/include/Text.hpp
index 02a6b62..245284f 100644
--- a/include/Text.hpp
+++ b/include/Text.hpp
@@ -10,8 +10,6 @@
#include <vector>
#include <string_view>
#include <array>
-#include "types.hpp"
-#include <assert.h>
namespace mgl {
class Font;
@@ -143,7 +141,7 @@ namespace QuickMedia
bool single_line_edit = false;
private:
- enum class CaretMoveDirection : u8
+ enum class CaretMoveDirection : uint8_t
{
NONE,
UP,
@@ -172,7 +170,10 @@ namespace QuickMedia
float font_get_real_height(mgl::Font *font);
float get_text_quad_left_side(const VertexRef &vertex_ref) const;
float get_text_quad_right_side(const VertexRef &vertex_ref) const;
+ float get_text_quad_top_side(const VertexRef &vertex_ref) const;
float get_text_quad_bottom_side(const VertexRef &vertex_ref) const;
+ float get_text_quad_height(const VertexRef &vertex_ref) const;
+ void move_vertex_lines_by_largest_items(int vertices_linear_end);
// If the index is past the end, then the caret offset is the right side of the last character, rather than the left side
float get_caret_offset_by_caret_index(int index) const;
VertexRef& get_vertex_ref_clamp(int index);
diff --git a/include/types.hpp b/include/types.hpp
deleted file mode 100644
index dc2a016..0000000
--- a/include/types.hpp
+++ /dev/null
@@ -1,10 +0,0 @@
-#pragma once
-
-#include <stdint.h>
-
-typedef uint8_t u8;
-typedef uint16_t u16;
-typedef uint32_t u32;
-typedef uint64_t u64;
-typedef intptr_t isize;
-typedef uintptr_t usize; \ No newline at end of file