Add Robot Font

main
Peter Repukat 3 years ago
parent 7e895d7f4f
commit 76a868a97f

@ -193,6 +193,7 @@
<ClInclude Include="Overlay.h" />
<ClInclude Include="OverlayLogSink.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="Roboto.h" />
<ClInclude Include="Settings.h" />
<ClInclude Include="SteamOverlayDetector.h" />
<ClInclude Include="SteamTarget.h" />
@ -215,6 +216,11 @@
<ItemGroup>
<ResourceCompile Include="Resource.rc" />
</ItemGroup>
<ItemGroup>
<Font Include="Roboto-Regular.ttf">
<DeploymentContent>true</DeploymentContent>
</Font>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>

@ -122,6 +122,9 @@
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Roboto.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\deps\SFML\out\build\x64-Debug\lib\sfml-system-d-2.dll" />
@ -137,4 +140,7 @@
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<Font Include="Roboto-Regular.ttf" />
</ItemGroup>
</Project>

@ -273,7 +273,7 @@ void HidHide::enableOverlayElement()
overlay_elem_clock_.restart();
}
ImGui::Begin("Hidden Devices");
ImGui::BeginChild("Inner", {0.f, ImGui::GetItemRectSize().y - 48}, true);
ImGui::BeginChild("Inner", {0.f, ImGui::GetItemRectSize().y - 64}, true);
std::ranges::for_each(avail_devices_, [this](const auto& device) {
std::string label = (std::string(device.name.begin(), std::ranges::find(device.name, L'\0')) + "##" + std::string(device.device_instance_path.begin(), device.device_instance_path.end()));
const auto findDeviceFn = [&device](const auto& blackdev) {

@ -18,6 +18,8 @@ limitations under the License.
#include <filesystem>
#include <utility>
#include "Roboto.h"
Overlay::Overlay(
sf::RenderWindow& window,
std::function<void()> on_close,
@ -28,10 +30,17 @@ Overlay::Overlay(
{
ImGui::SFML::Init(window_);
ImGuiIO& io = ImGui::GetIO();
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;
io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad;
io.Fonts->Clear(); // clear fonts if you loaded some before (even if only default one was loaded)
auto fontconf = ImFontConfig{};
fontconf.FontDataOwnedByAtlas = false;
io.Fonts->AddFontFromMemoryTTF(Roboto_Regular_ttf, Roboto_Regular_ttf_len, 24, &fontconf);
ImGui::SFML::UpdateFontTexture(); // important call: updates font texture
#ifdef _WIN32
auto config_path = std::filesystem::temp_directory_path()
.parent_path()
@ -226,9 +235,9 @@ bool Overlay::closeButton() const
ImGui::PushStyleColor(ImGuiCol_WindowBg, ImVec4(0.6f, 0.f, 0.f, 0.9f));
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(1.f, 0.16f, 0.16f, 1.00f));
ImGui::Begin("##CloseButton", nullptr, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize);
ImGui::SetWindowSize({56 + 24, 32 + 24});
ImGui::SetWindowPos({window_.getSize().x - ImGui::GetWindowWidth() + 24, -24});
if (ImGui::Button("X##Close", {56, 48})) {
ImGui::SetWindowSize({56 + 32, 32 + 32});
ImGui::SetWindowPos({window_.getSize().x - ImGui::GetWindowWidth() + 32, -32});
if (ImGui::Button("X##Close", {56, 32})) {
on_close_();
return true;
}

@ -51,8 +51,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,0,0,2080504
PRODUCTVERSION 0,0,0,2080504
FILEVERSION 0,0,0,7089507
PRODUCTVERSION 0,0,0,7089507
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -69,12 +69,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Peter Repukat - FlatspotSoftware"
VALUE "FileDescription", "GlosSI - SteamTarget"
VALUE "FileVersion", "0.0.0.2a805b4"
VALUE "FileVersion", "0.0.0.7e895d7"
VALUE "InternalName", "GlosSITarget"
VALUE "LegalCopyright", "Copyright (C) 2021 Peter Repukat - FlatspotSoftware"
VALUE "OriginalFilename", "GlosSITarget.exe"
VALUE "ProductName", "GlosSI"
VALUE "ProductVersion", "0.0.0.2a805b4"
VALUE "ProductVersion", "0.0.0.7e895d7"
END
END
BLOCK "VarFileInfo"
@ -232,6 +232,58 @@ END

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save