Compare commits

..

1 Commits

Author SHA1 Message Date
9d12e53259
tmp patch to enlargen the ngc lossy custom pkg size 2023-10-18 14:31:57 +02:00
5 changed files with 1 additions and 74 deletions

View File

@ -52,9 +52,6 @@ add_executable(tomato
./send_image_popup.hpp ./send_image_popup.hpp
./send_image_popup.cpp ./send_image_popup.cpp
./settings_window.hpp
./settings_window.cpp
./chat_gui4.hpp ./chat_gui4.hpp
./chat_gui4.cpp ./chat_gui4.cpp
) )

View File

@ -18,8 +18,7 @@ MainScreen::MainScreen(SDL_Renderer* renderer_, std::string save_path, std::stri
mmil(rmm), mmil(rmm),
tam(rmm, cr, conf), tam(rmm, cr, conf),
sdlrtu(renderer_), sdlrtu(renderer_),
cg(conf, rmm, cr, sdlrtu), cg(conf, rmm, cr, sdlrtu)
sw(conf)
{ {
tel.subscribeAll(tc); tel.subscribeAll(tc);
@ -88,29 +87,11 @@ Screen* MainScreen::poll(bool& quit) {
tam.iterate(); tam.iterate();
// HACK: render the tomato main window first, with proper flags set.
// flags need to be set the first time begin() is called.
// and plugins are run before the main cg is run.
{
// TODO: maybe render cg earlier? or move the main window out of cg?
constexpr auto bg_window_flags =
ImGuiWindowFlags_NoDecoration |
ImGuiWindowFlags_NoMove |
ImGuiWindowFlags_NoResize |
ImGuiWindowFlags_NoSavedSettings |
ImGuiWindowFlags_MenuBar |
ImGuiWindowFlags_NoBringToFrontOnFocus;
ImGui::Begin("tomato", nullptr, bg_window_flags);
ImGui::End();
}
pm.tick(time_delta); pm.tick(time_delta);
mts.iterate(); mts.iterate();
cg.render(); cg.render();
sw.render();
if constexpr (false) { if constexpr (false) {
ImGui::ShowDemoWindow(); ImGui::ShowDemoWindow();

View File

@ -21,7 +21,6 @@
#include "./sdlrenderer_texture_uploader.hpp" #include "./sdlrenderer_texture_uploader.hpp"
#include "./chat_gui4.hpp" #include "./chat_gui4.hpp"
#include "./settings_window.hpp"
#include <string> #include <string>
#include <iostream> #include <iostream>
@ -58,7 +57,6 @@ struct MainScreen final : public Screen {
//OpenGLTextureUploader ogltu; //OpenGLTextureUploader ogltu;
ChatGui4 cg; ChatGui4 cg;
SettingsWindow sw;
MainScreen(SDL_Renderer* renderer_, std::string save_path, std::string save_password, std::vector<std::string> plugins); MainScreen(SDL_Renderer* renderer_, std::string save_path, std::string save_password, std::vector<std::string> plugins);
~MainScreen(void); ~MainScreen(void);

View File

@ -1,35 +0,0 @@
#include "./settings_window.hpp"
#include <imgui/imgui.h>
#include <imgui/misc/cpp/imgui_stdlib.h>
SettingsWindow::SettingsWindow(ConfigModelI& conf) : _conf(conf) {
}
void SettingsWindow::render(void) {
{ // main window menubar injection
// assumes the window "tomato" was rendered already by cg
if (ImGui::Begin("tomato")) {
if (ImGui::BeginMenuBar()) {
ImGui::Separator();
if (ImGui::BeginMenu("Settings")) {
if (ImGui::MenuItem("show settings window")) {
_show_window = true;
}
ImGui::EndMenu();
}
ImGui::EndMenuBar();
}
}
ImGui::End();
}
if (_show_window) {
if (ImGui::Begin("Settings", &_show_window)) {
ImGui::Text("Settings here sldjflsadfs");
}
ImGui::End();
}
}

View File

@ -1,14 +0,0 @@
#pragma once
struct ConfigModelI;
class SettingsWindow {
bool _show_window {false};
ConfigModelI& _conf;
public:
SettingsWindow(ConfigModelI& conf);
void render(void);
};