mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-11 14:43:34 +00:00
improving vsupp
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2022/10/04 17:55:21 by maldavid #+# #+# */
|
/* Created: 2022/10/04 17:55:21 by maldavid #+# #+# */
|
||||||
/* Updated: 2024/01/11 15:03:14 by maldavid ### ########.fr */
|
/* Updated: 2024/01/11 20:09:56 by maldavid ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@@ -30,6 +30,7 @@ int update(void *param)
|
|||||||
t_mlx *mlx;
|
t_mlx *mlx;
|
||||||
|
|
||||||
mlx = (t_mlx *)param;
|
mlx = (t_mlx *)param;
|
||||||
|
mlx_set_font_scale(mlx->mlx, mlx->win, "default", 6.f);
|
||||||
mlx_string_put(mlx->mlx, mlx->win, 160, 120, 0xFFFF2066, "this text should be hidden");
|
mlx_string_put(mlx->mlx, mlx->win, 160, 120, 0xFFFF2066, "this text should be hidden");
|
||||||
mlx_put_image_to_window(mlx->mlx, mlx->win, mlx->logo, 100, 100);
|
mlx_put_image_to_window(mlx->mlx, mlx->win, mlx->logo, 100, 100);
|
||||||
mlx_put_image_to_window(mlx->mlx, mlx->win, mlx->img, 150, 60);
|
mlx_put_image_to_window(mlx->mlx, mlx->win, mlx->img, 150, 60);
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2022/10/05 16:30:19 by maldavid #+# #+# */
|
/* Created: 2022/10/05 16:30:19 by maldavid #+# #+# */
|
||||||
/* Updated: 2024/01/10 18:31:13 by maldavid ### ########.fr */
|
/* Updated: 2024/01/11 19:08:23 by maldavid ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@ namespace mlx
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint32_t id = _event.window.windowID;
|
uint32_t id = _event.window.windowID;
|
||||||
if(!_events_hooks.count(id))
|
if(_events_hooks.find(id) == _events_hooks.end())
|
||||||
continue;
|
continue;
|
||||||
auto& hooks = _events_hooks[id];
|
auto& hooks = _events_hooks[id];
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/12/11 21:17:04 by kbz_8 #+# #+# */
|
/* Created: 2023/12/11 21:17:04 by kbz_8 #+# #+# */
|
||||||
/* Updated: 2023/12/14 17:51:40 by maldavid ### ########.fr */
|
/* Updated: 2024/01/11 20:08:55 by maldavid ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@@ -31,8 +31,8 @@ namespace mlx
|
|||||||
inline float getScale() const noexcept { return _scale; }
|
inline float getScale() const noexcept { return _scale; }
|
||||||
inline const std::array<stbtt_packedchar, 96>& getCharData() const { return _cdata; }
|
inline const std::array<stbtt_packedchar, 96>& getCharData() const { return _cdata; }
|
||||||
inline const TextureAtlas& getAtlas() const noexcept { return _atlas; }
|
inline const TextureAtlas& getAtlas() const noexcept { return _atlas; }
|
||||||
inline bool operator==(const Font& rhs) const { return rhs._name == _name; }
|
inline bool operator==(const Font& rhs) const { return rhs._name == _name && rhs._scale == _scale; }
|
||||||
inline bool operator!=(const Font& rhs) const { return rhs._name != _name; }
|
inline bool operator!=(const Font& rhs) const { return rhs._name != _name && rhs._scale != _scale; }
|
||||||
~Font();
|
~Font();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/04/06 16:24:11 by maldavid #+# #+# */
|
/* Created: 2023/04/06 16:24:11 by maldavid #+# #+# */
|
||||||
/* Updated: 2024/01/11 05:18:42 by maldavid ### ########.fr */
|
/* Updated: 2024/01/11 18:48:01 by maldavid ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ namespace mlx
|
|||||||
|
|
||||||
void init(Renderer& renderer) noexcept;
|
void init(Renderer& renderer) noexcept;
|
||||||
std::pair<DrawableResource*, bool> registerText(int x, int y, uint32_t color, std::string str);
|
std::pair<DrawableResource*, bool> registerText(int x, int y, uint32_t color, std::string str);
|
||||||
inline void clear() { _text_descriptors.clear(); TextLibrary::get().clearLibrary(); }
|
inline void clear() { _text_descriptors.clear(); /*TextLibrary::get().clearLibrary();*/ }
|
||||||
void loadFont(Renderer& renderer, const std::filesystem::path& filepath, float scale);
|
void loadFont(Renderer& renderer, const std::filesystem::path& filepath, float scale);
|
||||||
void destroy() noexcept;
|
void destroy() noexcept;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,31 @@
|
|||||||
{
|
{
|
||||||
name
|
name
|
||||||
Memcheck:Leak
|
Memcheck:Leak
|
||||||
fun:*alloc
|
fun:*
|
||||||
|
...
|
||||||
|
obj:*libmlx*
|
||||||
|
...
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name
|
||||||
|
Memcheck:Cond
|
||||||
|
fun:*
|
||||||
|
...
|
||||||
|
obj:*libmlx*
|
||||||
|
...
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name
|
||||||
|
Memcheck:Value8
|
||||||
|
fun:*
|
||||||
|
...
|
||||||
|
obj:*libmlx*
|
||||||
|
...
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name
|
||||||
|
Memcheck:Addr4
|
||||||
|
fun:*
|
||||||
...
|
...
|
||||||
obj:*libmlx*
|
obj:*libmlx*
|
||||||
...
|
...
|
||||||
@@ -9,7 +33,7 @@
|
|||||||
{
|
{
|
||||||
name
|
name
|
||||||
Memcheck:Leak
|
Memcheck:Leak
|
||||||
fun:*alloc
|
fun:*
|
||||||
...
|
...
|
||||||
obj:*SDL*
|
obj:*SDL*
|
||||||
...
|
...
|
||||||
@@ -17,7 +41,7 @@
|
|||||||
{
|
{
|
||||||
name
|
name
|
||||||
Memcheck:Leak
|
Memcheck:Leak
|
||||||
fun:*alloc
|
fun:*
|
||||||
...
|
...
|
||||||
obj:*X11*
|
obj:*X11*
|
||||||
...
|
...
|
||||||
@@ -25,7 +49,7 @@
|
|||||||
{
|
{
|
||||||
name
|
name
|
||||||
Memcheck:Leak
|
Memcheck:Leak
|
||||||
fun:*alloc
|
fun:*
|
||||||
...
|
...
|
||||||
obj:*nvidia.so*
|
obj:*nvidia.so*
|
||||||
...
|
...
|
||||||
@@ -33,7 +57,7 @@
|
|||||||
{
|
{
|
||||||
name
|
name
|
||||||
Memcheck:Leak
|
Memcheck:Leak
|
||||||
fun:*alloc
|
fun:*
|
||||||
obj:*
|
obj:*
|
||||||
...
|
...
|
||||||
fun:X11*
|
fun:X11*
|
||||||
@@ -51,7 +75,16 @@
|
|||||||
{
|
{
|
||||||
name
|
name
|
||||||
Memcheck:Leak
|
Memcheck:Leak
|
||||||
fun:*alloc
|
fun:*
|
||||||
|
obj:*
|
||||||
|
...
|
||||||
|
fun:_dl_*
|
||||||
|
...
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name
|
||||||
|
Memcheck:Leak
|
||||||
|
fun:*
|
||||||
obj:*
|
obj:*
|
||||||
...
|
...
|
||||||
fun:dl_*
|
fun:dl_*
|
||||||
@@ -94,4 +127,3 @@
|
|||||||
obj:*
|
obj:*
|
||||||
obj:*
|
obj:*
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user