Compare commits
2 Commits
2f6f240ad9
...
d5fb73d4a3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d5fb73d4a3 | ||
|
|
1f004cbd6d |
6
external/imgui/CMakeLists.txt
vendored
6
external/imgui/CMakeLists.txt
vendored
@@ -8,11 +8,13 @@ endif()
|
|||||||
|
|
||||||
if (NOT TARGET imgui)
|
if (NOT TARGET imgui)
|
||||||
FetchContent_Declare(imgui
|
FetchContent_Declare(imgui
|
||||||
GIT_REPOSITORY https://github.com/ocornut/imgui.git
|
#GIT_REPOSITORY https://github.com/ocornut/imgui.git
|
||||||
|
GIT_REPOSITORY https://github.com/Green-Sky/imgui.git
|
||||||
#GIT_TAG f5befd2d29e66809cd1110a152e375a7f1981f06 # v1.91.9b
|
#GIT_TAG f5befd2d29e66809cd1110a152e375a7f1981f06 # v1.91.9b
|
||||||
#GIT_TAG 85b2fe8486190fa9326565a2fb5fccb6caea4396 # v1.92.0
|
#GIT_TAG 85b2fe8486190fa9326565a2fb5fccb6caea4396 # v1.92.0
|
||||||
#GIT_TAG 5d4126876bc10396d4c6511853ff10964414c776 # v1.92.1
|
#GIT_TAG 5d4126876bc10396d4c6511853ff10964414c776 # v1.92.1
|
||||||
GIT_TAG bf75bfec48fc00f532af8926130b70c0e26eb099 # v1.92.3
|
#GIT_TAG bf75bfec48fc00f532af8926130b70c0e26eb099 # v1.92.3
|
||||||
|
GIT_TAG 349dbf9c57a15e2148fbfa7cb88df30280e0a362 # v1.92.3 + bitmap scaling patches
|
||||||
EXCLUDE_FROM_ALL
|
EXCLUDE_FROM_ALL
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
12
flake.lock
generated
12
flake.lock
generated
@@ -21,17 +21,17 @@
|
|||||||
"imgui": {
|
"imgui": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1758128722,
|
"lastModified": 1762288520,
|
||||||
"narHash": "sha256-J+h7jJ+4wqr6RivtzyTDMXKxFoGs7dQbzqdu51XgEbc=",
|
"narHash": "sha256-pgVBnGtt3pygqWVAYA1q2SM6kNH7n0mnD4kih0UFclo=",
|
||||||
"owner": "ocornut",
|
"owner": "Green-Sky",
|
||||||
"repo": "imgui",
|
"repo": "imgui",
|
||||||
"rev": "bf75bfec48fc00f532af8926130b70c0e26eb099",
|
"rev": "349dbf9c57a15e2148fbfa7cb88df30280e0a362",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "ocornut",
|
"owner": "Green-Sky",
|
||||||
"repo": "imgui",
|
"repo": "imgui",
|
||||||
"rev": "bf75bfec48fc00f532af8926130b70c0e26eb099",
|
"rev": "349dbf9c57a15e2148fbfa7cb88df30280e0a362",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -21,7 +21,8 @@
|
|||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
imgui = {
|
imgui = {
|
||||||
url = "github:ocornut/imgui/bf75bfec48fc00f532af8926130b70c0e26eb099";
|
#url = "github:ocornut/imgui/bf75bfec48fc00f532af8926130b70c0e26eb099";
|
||||||
|
url = "github:Green-Sky/imgui/349dbf9c57a15e2148fbfa7cb88df30280e0a362";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
plutosvg = {
|
plutosvg = {
|
||||||
|
|||||||
@@ -82,36 +82,17 @@ StartScreen::StartScreen(const std::vector<std::string_view>& args, SDL_Renderer
|
|||||||
display_scale = 1.f;
|
display_scale = 1.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGui::GetIO().FontGlobalScale = display_scale;
|
||||||
|
ImGui::GetStyle().FontSizeBase = _conf.get_int("ImGuiFonts", "size").value_or(13);
|
||||||
{
|
{
|
||||||
auto* font_atlas = ImGui::GetIO().Fonts;
|
auto* font_atlas = ImGui::GetIO().Fonts;
|
||||||
font_atlas->ClearFonts();
|
font_atlas->ClearFonts();
|
||||||
// for now we also always merge
|
// for now we also always merge
|
||||||
//bool has_font {false};
|
|
||||||
|
|
||||||
ImFontGlyphRangesBuilder glyphbld;
|
|
||||||
ImVector<ImWchar> glyph_ranges;
|
|
||||||
{ // build ranges
|
|
||||||
glyphbld.AddRanges(font_atlas->GetGlyphRangesDefault());
|
|
||||||
glyphbld.AddRanges(font_atlas->GetGlyphRangesGreek());
|
|
||||||
glyphbld.AddRanges(font_atlas->GetGlyphRangesCyrillic());
|
|
||||||
glyphbld.AddRanges(font_atlas->GetGlyphRangesChineseSimplifiedCommon()); // contains CJK
|
|
||||||
glyphbld.AddText("™"); // somehow missing
|
|
||||||
// popular emojies
|
|
||||||
glyphbld.AddText(u8"😂❤️🤣👍😭🙏😘🥰😍😊🎉😁💕🥺😅🔥☺️🤦♥️🤷🙄😆🤗😉🎂🤔👏🙂😳🥳😎👌💜😔💪✨💖👀😋😏😢👉💗😩💯🌹💞🎈💙😃😡💐😜🙈🤞😄🤤🙌🤪❣️😀💋💀👇💔😌💓🤩🙃😬😱😴🤭😐🌞😒😇🌸😈🎶✌️🎊🥵😞💚☀️🖤💰😚👑🎁💥🙋☹️😑🥴👈💩✅👋🤮😤🤢🌟❗😥🌈💛😝😫😲🖕‼️🔴🌻🤯💃👊🤬🏃😕👁️⚡☕🍀💦⭐🦋🤨🌺😹🤘🌷💝💤🤝🐰😓💘🍻😟😣🧐😠🤠😻🌙😛🤙🙊");
|
|
||||||
|
|
||||||
if (const auto sv_opt = _conf.get_string("ImGuiFonts", "atlas_extra_text"); sv_opt.has_value) {
|
|
||||||
glyphbld.AddText(sv_opt.s.start, sv_opt.s.start+sv_opt.s.extend);
|
|
||||||
}
|
|
||||||
glyphbld.BuildRanges(&glyph_ranges);
|
|
||||||
}
|
|
||||||
|
|
||||||
ImFontConfig fontcfg;
|
ImFontConfig fontcfg;
|
||||||
//fontcfg.SizePixels = 16.f*display_scale;
|
// defaults
|
||||||
fontcfg.SizePixels = _conf.get_int("ImGuiFonts", "size").value_or(13) * display_scale;
|
fontcfg.OversampleH = fontcfg.OversampleV = 1;
|
||||||
fontcfg.RasterizerDensity = 1.f;
|
fontcfg.PixelSnapH = true;
|
||||||
fontcfg.OversampleH = 0;
|
|
||||||
fontcfg.OversampleV = 0;
|
|
||||||
fontcfg.MergeMode = false;
|
|
||||||
#if defined(IMGUI_ENABLE_FREETYPE) && defined(IMGUI_ENABLE_FREETYPE_PLUTOSVG)
|
#if defined(IMGUI_ENABLE_FREETYPE) && defined(IMGUI_ENABLE_FREETYPE_PLUTOSVG)
|
||||||
std::cout << "Font: enabling freetype color loading\n";
|
std::cout << "Font: enabling freetype color loading\n";
|
||||||
fontcfg.FontLoaderFlags |= ImGuiFreeTypeBuilderFlags_LoadColor;
|
fontcfg.FontLoaderFlags |= ImGuiFreeTypeBuilderFlags_LoadColor;
|
||||||
@@ -125,16 +106,14 @@ StartScreen::StartScreen(const std::vector<std::string_view>& args, SDL_Renderer
|
|||||||
std::cout << "Font: loading '" << font_path << "'\n";
|
std::cout << "Font: loading '" << font_path << "'\n";
|
||||||
const auto* resulting_font = font_atlas->AddFontFromFileTTF(
|
const auto* resulting_font = font_atlas->AddFontFromFileTTF(
|
||||||
font_path.c_str(),
|
font_path.c_str(),
|
||||||
_conf.get_int("ImGuiFonts", "size", font_path).value_or(0) * display_scale,
|
0.f,
|
||||||
&fontcfg,
|
&fontcfg
|
||||||
&(glyph_ranges[0])
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if (resulting_font != nullptr) {
|
if (resulting_font != nullptr) {
|
||||||
//has_font = true;
|
|
||||||
fontcfg.MergeMode = true;
|
fontcfg.MergeMode = true;
|
||||||
} else {
|
} else {
|
||||||
std::cerr << "Font: failed to load '" << "path" << "' !\n";
|
std::cerr << "Font: failed to load '" << font_path << "' !\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -297,6 +297,11 @@ void ToxAvatarManager::checkObj(ObjectHandle o) {
|
|||||||
// like set "accepted" tag comp or something
|
// like set "accepted" tag comp or something
|
||||||
|
|
||||||
std::cout << "TAM: accepted avatar ft\n";
|
std::cout << "TAM: accepted avatar ft\n";
|
||||||
|
} else {
|
||||||
|
// in progress, or canceled/aborted
|
||||||
|
|
||||||
|
// TODO: canceled tag with reason??
|
||||||
|
//if (o.all_of<ObjComp::Ephemeral::ToxTransferFriend
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user