changed node font to Inter
This commit is contained in:
Binary file not shown.
Binary file not shown.
+2
-1
@@ -69,7 +69,8 @@ inline bool ViSegButton(Vec2Df mp, float x, float y, float start_angle, float en
|
|||||||
|
|
||||||
inline void DrawCenteredText(std::string text, Vec2Df position, float text_size, Color color){
|
inline void DrawCenteredText(std::string text, Vec2Df position, float text_size, Color color){
|
||||||
float offset = MeasureText(text.c_str(), text_size);
|
float offset = MeasureText(text.c_str(), text_size);
|
||||||
DrawText(text.c_str(), position.x-offset/2.0f, position.y-text_size/2.0f, text_size, color);
|
//DrawText(text.c_str(), position.x-offset/2.0f, position.y-text_size/2.0f, text_size, color);
|
||||||
|
DrawTextEx(VISEQ::APP::inter, text.c_str(), Vec2Df(position.x-offset/2.0f, position.y-(float)text_size/2.0f+1), text_size, 2.0f, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void DrawText(std::string text, Vec2Df position, float text_size, Color color){
|
inline void DrawText(std::string text, Vec2Df position, float text_size, Color color){
|
||||||
|
|||||||
@@ -30,6 +30,10 @@ using json = nlohmann::json;
|
|||||||
|
|
||||||
#define RANGE_FILTER(L) std::ranges::views::filter(L)
|
#define RANGE_FILTER(L) std::ranges::views::filter(L)
|
||||||
|
|
||||||
|
namespace VISEQ::APP{
|
||||||
|
inline Font inter;
|
||||||
|
}
|
||||||
|
|
||||||
namespace VISEQ::TEXTURES {
|
namespace VISEQ::TEXTURES {
|
||||||
inline Texture2D tex_connector;
|
inline Texture2D tex_connector;
|
||||||
inline Texture2D tex_connector_hover;
|
inline Texture2D tex_connector_hover;
|
||||||
|
|||||||
+1
-1
@@ -274,7 +274,7 @@ namespace VISEQ::GRAPH::NODES {
|
|||||||
VMATH::Vec2D<float> desc_position = position + VMATH::Vec2D<float>(radius + 7.0f, radius + 7.0f);
|
VMATH::Vec2D<float> desc_position = position + VMATH::Vec2D<float>(radius + 7.0f, radius + 7.0f);
|
||||||
switch(mode){
|
switch(mode){
|
||||||
case NOTE:{
|
case NOTE:{
|
||||||
if(!KEYS_DOWN.shift && !KEYS_DOWN.alt) DrawCenteredText(MIDI::Notes[getNotes().note], position, 12, VS_COLOR_BLACK);
|
if(!KEYS_DOWN.shift && !KEYS_DOWN.alt) DrawCenteredText(MIDI::Notes[getNotes().note], position, 14, VS_COLOR_BLACK);
|
||||||
if(!KEYS_DOWN.ctrl && KEYS_DOWN.shift && !KEYS_DOWN.alt) DrawCenteredText(std::format("{}", getNotes().velocity), position, 12, VS_COLOR_BLACK);
|
if(!KEYS_DOWN.ctrl && KEYS_DOWN.shift && !KEYS_DOWN.alt) DrawCenteredText(std::format("{}", getNotes().velocity), position, 12, VS_COLOR_BLACK);
|
||||||
|
|
||||||
if(!KEYS_DOWN.ctrl && !KEYS_DOWN.shift && KEYS_DOWN.alt) DrawCenteredText(std::format("{:.1f}s", (float)getNotes().gate / 1000.f), position, 12, VS_COLOR_BLACK);
|
if(!KEYS_DOWN.ctrl && !KEYS_DOWN.shift && KEYS_DOWN.alt) DrawCenteredText(std::format("{:.1f}s", (float)getNotes().gate / 1000.f), position, 12, VS_COLOR_BLACK);
|
||||||
|
|||||||
+4
-1
@@ -6,6 +6,7 @@
|
|||||||
#include "raygui/raygui.h"
|
#include "raygui/raygui.h"
|
||||||
|
|
||||||
#include "datatypes.h"
|
#include "datatypes.h"
|
||||||
|
#include "vmath.h"
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <ranges>
|
#include <ranges>
|
||||||
@@ -14,6 +15,7 @@
|
|||||||
namespace VISEQ::APP::UI{
|
namespace VISEQ::APP::UI{
|
||||||
void AppUI::init(){
|
void AppUI::init(){
|
||||||
GuiLoadStyleDark();
|
GuiLoadStyleDark();
|
||||||
|
inter = LoadFontEx("resources/fonts/Inter_28pt-Bold.ttf", 96, 0, 250);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppUI::drawSideBar(){
|
void AppUI::drawSideBar(){
|
||||||
@@ -105,7 +107,8 @@ namespace VISEQ::APP::UI{
|
|||||||
|
|
||||||
void AppUI::DrawCenteredText(std::string text, Vec2Df position, int size, Color color){
|
void AppUI::DrawCenteredText(std::string text, Vec2Df position, int size, Color color){
|
||||||
float offset = MeasureText(text.c_str(), size);
|
float offset = MeasureText(text.c_str(), size);
|
||||||
DrawText(text.c_str(), position.x-offset/2.0f, position.y-(float)size/2.0f+1, size, color );
|
//DrawText(text.c_str(), position.x-offset/2.0f, position.y-(float)size/2.0f+1, size, color );
|
||||||
|
DrawTextEx(inter, text.c_str(), Vec2Df(position.x-offset/2.0f, position.y-(float)size/2.0f+1), size, 2.0f, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppUI::drawContextMenu(Camera2D camera){
|
void AppUI::drawContextMenu(Camera2D camera){
|
||||||
|
|||||||
Reference in New Issue
Block a user