Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
7fe6df5889 | |||
2647c85323 |
2
external/solanaceae_message3
vendored
2
external/solanaceae_message3
vendored
Submodule external/solanaceae_message3 updated: 002aa00279...ab282235b5
2
external/solanaceae_plugin
vendored
2
external/solanaceae_plugin
vendored
Submodule external/solanaceae_plugin updated: 87b3d15a2b...17ffaee013
2
external/solanaceae_util
vendored
2
external/solanaceae_util
vendored
Submodule external/solanaceae_util updated: db57a7c5e9...390b123fb7
@ -191,6 +191,12 @@ Screen* MainScreen::render(float time_delta, bool&) {
|
|||||||
|
|
||||||
ImGui::EndMenu();
|
ImGui::EndMenu();
|
||||||
}
|
}
|
||||||
|
if (ImGui::BeginMenu("Settings")) {
|
||||||
|
if (ImGui::MenuItem("ImGui Style Editor")) {
|
||||||
|
_show_tool_style_editor = true;
|
||||||
|
}
|
||||||
|
ImGui::EndMenu();
|
||||||
|
}
|
||||||
ImGui::EndMenuBar();
|
ImGui::EndMenuBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -198,6 +204,12 @@ Screen* MainScreen::render(float time_delta, bool&) {
|
|||||||
ImGui::End();
|
ImGui::End();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_show_tool_style_editor) {
|
||||||
|
if (ImGui::Begin("Dear ImGui Style Editor", &_show_tool_style_editor)) {
|
||||||
|
ImGui::ShowStyleEditor();
|
||||||
|
}
|
||||||
|
ImGui::End();
|
||||||
|
}
|
||||||
|
|
||||||
if constexpr (false) {
|
if constexpr (false) {
|
||||||
ImGui::ShowDemoWindow();
|
ImGui::ShowDemoWindow();
|
||||||
|
@ -64,6 +64,8 @@ struct MainScreen final : public Screen {
|
|||||||
ToxUIUtils tuiu;
|
ToxUIUtils tuiu;
|
||||||
ToxDHTCapHisto tdch;
|
ToxDHTCapHisto tdch;
|
||||||
|
|
||||||
|
bool _show_tool_style_editor {false};
|
||||||
|
|
||||||
bool _window_hidden {false};
|
bool _window_hidden {false};
|
||||||
bool _window_hidden_ts {0};
|
bool _window_hidden_ts {0};
|
||||||
float _time_since_event {0.f};
|
float _time_since_event {0.f};
|
||||||
|
@ -17,16 +17,15 @@ uint64_t SDLRendererTextureUploader::uploadRGBA(const uint8_t* data, uint32_t wi
|
|||||||
);
|
);
|
||||||
assert(surf); // TODO: add error reporting
|
assert(surf); // TODO: add error reporting
|
||||||
|
|
||||||
// TODO: this touches global state, reset?
|
|
||||||
if (filter == NEAREST) {
|
|
||||||
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "nearest");
|
|
||||||
} else if (filter == LINEAR) {
|
|
||||||
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear");
|
|
||||||
}
|
|
||||||
|
|
||||||
SDL_Texture* tex = SDL_CreateTextureFromSurface(renderer, surf);
|
SDL_Texture* tex = SDL_CreateTextureFromSurface(renderer, surf);
|
||||||
assert(tex); // TODO: add error reporting
|
assert(tex); // TODO: add error reporting
|
||||||
|
|
||||||
|
if (filter == NEAREST) {
|
||||||
|
SDL_SetTextureScaleMode(tex, SDL_SCALEMODE_NEAREST);
|
||||||
|
} else if (filter == LINEAR) {
|
||||||
|
SDL_SetTextureScaleMode(tex, SDL_SCALEMODE_LINEAR);
|
||||||
|
}
|
||||||
|
|
||||||
SDL_DestroySurface(surf);
|
SDL_DestroySurface(surf);
|
||||||
|
|
||||||
return reinterpret_cast<uint64_t>(tex);
|
return reinterpret_cast<uint64_t>(tex);
|
||||||
|
@ -116,7 +116,6 @@ void SettingsWindow::render(void) {
|
|||||||
}
|
}
|
||||||
ImGui::EndMenuBar();
|
ImGui::EndMenuBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user