Compare commits
2 Commits
dev_contac
...
master
Author | SHA1 | Date | |
---|---|---|---|
a9d8c070bc | |||
f93602e524 |
2
.github/workflows/cd.yml
vendored
2
.github/workflows/cd.yml
vendored
@ -64,6 +64,8 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
platform:
|
platform:
|
||||||
|
- vcpkg_toolkit: arm-neon-android
|
||||||
|
ndk_abi: armeabi-v7a
|
||||||
- vcpkg_toolkit: arm64-android
|
- vcpkg_toolkit: arm64-android
|
||||||
ndk_abi: arm64-v8a
|
ndk_abi: arm64-v8a
|
||||||
- vcpkg_toolkit: x64-android
|
- vcpkg_toolkit: x64-android
|
||||||
|
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -38,6 +38,8 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
platform:
|
platform:
|
||||||
|
- vcpkg_toolkit: arm-neon-android
|
||||||
|
ndk_abi: armeabi-v7a
|
||||||
- vcpkg_toolkit: arm64-android
|
- vcpkg_toolkit: arm64-android
|
||||||
ndk_abi: arm64-v8a
|
ndk_abi: arm64-v8a
|
||||||
- vcpkg_toolkit: x64-android
|
- vcpkg_toolkit: x64-android
|
||||||
|
3
external/sdl/CMakeLists.txt
vendored
3
external/sdl/CMakeLists.txt
vendored
@ -25,7 +25,8 @@ if (NOT TARGET SDL3::SDL3)
|
|||||||
#GIT_TAG 6e885d96193a4b0096fe7fed6d4e6c3e5f247283 # tip 09-09-2024
|
#GIT_TAG 6e885d96193a4b0096fe7fed6d4e6c3e5f247283 # tip 09-09-2024
|
||||||
#GIT_TAG 9dd8859240703d886941733ad32c1dc6f50d64f0 # tip 19-09-2024
|
#GIT_TAG 9dd8859240703d886941733ad32c1dc6f50d64f0 # tip 19-09-2024
|
||||||
#GIT_TAG afdf325fb4090e93a124519d1a3bc1fbe0ba9025 # bad
|
#GIT_TAG afdf325fb4090e93a124519d1a3bc1fbe0ba9025 # bad
|
||||||
GIT_TAG e292d1f5ace469f718d7b6b4dec8c28e37dcaa0e # tip 05-10-2024 (3.1.3)
|
#GIT_TAG e292d1f5ace469f718d7b6b4dec8c28e37dcaa0e # tip 05-10-2024 (3.1.3)
|
||||||
|
GIT_TAG 2654d5d48b8f764148a7c246fea85b32b1133578 # tip 18-10-2024
|
||||||
|
|
||||||
FIND_PACKAGE_ARGS # for the future
|
FIND_PACKAGE_ARGS # for the future
|
||||||
)
|
)
|
||||||
|
2
external/solanaceae_util
vendored
2
external/solanaceae_util
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 17d2baf7365c3499172dc5afd71171cb3a138d99
|
Subproject commit 9a4df12d68373cd19adddde2364843eeac51c28d
|
@ -63,17 +63,17 @@
|
|||||||
"sdl3": {
|
"sdl3": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1728073678,
|
"lastModified": 1729218869,
|
||||||
"narHash": "sha256-S7yRcLHMPgq6+gec8l+ESxp2dJ+6Po/UNsBUXptQzMQ=",
|
"narHash": "sha256-0KrwC3Yrs1LHwT9SPvknDwPymNmksq6dixM4/KiFqFA=",
|
||||||
"owner": "libsdl-org",
|
"owner": "libsdl-org",
|
||||||
"repo": "SDL",
|
"repo": "SDL",
|
||||||
"rev": "e292d1f5ace469f718d7b6b4dec8c28e37dcaa0e",
|
"rev": "2654d5d48b8f764148a7c246fea85b32b1133578",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "libsdl-org",
|
"owner": "libsdl-org",
|
||||||
"repo": "SDL",
|
"repo": "SDL",
|
||||||
"rev": "e292d1f5ace469f718d7b6b4dec8c28e37dcaa0e",
|
"rev": "2654d5d48b8f764148a7c246fea85b32b1133578",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
sdl3 = {
|
sdl3 = {
|
||||||
url = "github:libsdl-org/SDL/e292d1f5ace469f718d7b6b4dec8c28e37dcaa0e"; # keep in sync this cmake
|
url = "github:libsdl-org/SDL/2654d5d48b8f764148a7c246fea85b32b1133578"; # keep in sync this cmake
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
sdl3_image = {
|
sdl3_image = {
|
||||||
|
@ -80,8 +80,6 @@ target_sources(tomato PUBLIC
|
|||||||
./chat_gui/icons/group.cpp
|
./chat_gui/icons/group.cpp
|
||||||
./chat_gui/contact_list.hpp
|
./chat_gui/contact_list.hpp
|
||||||
./chat_gui/contact_list.cpp
|
./chat_gui/contact_list.cpp
|
||||||
./chat_gui/contact_tree.hpp
|
|
||||||
./chat_gui/contact_tree.cpp
|
|
||||||
./chat_gui/file_selector.hpp
|
./chat_gui/file_selector.hpp
|
||||||
./chat_gui/file_selector.cpp
|
./chat_gui/file_selector.cpp
|
||||||
./chat_gui/send_image_popup.hpp
|
./chat_gui/send_image_popup.hpp
|
||||||
|
@ -1,97 +0,0 @@
|
|||||||
#include "./contact_tree.hpp"
|
|
||||||
|
|
||||||
#include <solanaceae/contact/components.hpp>
|
|
||||||
|
|
||||||
#include "./contact_list.hpp"
|
|
||||||
#include "entt/entity/entity.hpp"
|
|
||||||
|
|
||||||
#include <imgui/imgui.h>
|
|
||||||
|
|
||||||
namespace Components {
|
|
||||||
struct TagTreeViewOpen {};
|
|
||||||
};
|
|
||||||
|
|
||||||
ContactTreeWindow::ContactTreeWindow(Contact3Registry& cr, Theme& theme, ContactTextureCache& ctc) : _cr(cr), _theme(theme), _ctc(ctc) {
|
|
||||||
}
|
|
||||||
|
|
||||||
void ContactTreeWindow::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("settings window", nullptr, _show_window)) {
|
|
||||||
// _show_window = !_show_window;
|
|
||||||
// }
|
|
||||||
// ImGui::EndMenu();
|
|
||||||
// }
|
|
||||||
// ImGui::EndMenuBar();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// ImGui::End();
|
|
||||||
//}
|
|
||||||
|
|
||||||
if (_show_window) {
|
|
||||||
if (ImGui::Begin("ContactTreeWindow", &_show_window)) {
|
|
||||||
|
|
||||||
if (ImGui::BeginTable("##table", 1, ImGuiTableFlags_None)) {
|
|
||||||
// first we need all root nodes
|
|
||||||
for (const auto [cv_root] : _cr.view<Contact::Components::TagRoot>().each()) {
|
|
||||||
ImGui::TableNextRow();
|
|
||||||
ImGui::PushID(entt::to_integral(cv_root));
|
|
||||||
|
|
||||||
ImGui::TableNextColumn();
|
|
||||||
|
|
||||||
Contact3Handle c_root {_cr, cv_root};
|
|
||||||
bool open = c_root.all_of<Components::TagTreeViewOpen>();
|
|
||||||
|
|
||||||
bool has_children = c_root.all_of<Contact::Components::ParentOf>();
|
|
||||||
|
|
||||||
// roots are usually no normal contacts
|
|
||||||
// they should display as a protocol or profile or account
|
|
||||||
// TODO: set some table background instead of full span selected?
|
|
||||||
if (renderContactBig(_theme, _ctc, c_root, 2, false, true)) {
|
|
||||||
// clicked, toggle open
|
|
||||||
if (open) {
|
|
||||||
c_root.remove<Components::TagTreeViewOpen>();
|
|
||||||
open = false;
|
|
||||||
} else {
|
|
||||||
c_root.emplace_or_replace<Components::TagTreeViewOpen>();
|
|
||||||
open = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (open) {
|
|
||||||
// render children
|
|
||||||
|
|
||||||
ImGui::Indent();
|
|
||||||
|
|
||||||
if (c_root.all_of<Contact::Components::ParentOf>()) {
|
|
||||||
for (const auto cv_child : c_root.get<Contact::Components::ParentOf>().subs) {
|
|
||||||
ImGui::PushID(entt::to_integral(cv_child));
|
|
||||||
|
|
||||||
Contact3Handle c_child {_cr, cv_child};
|
|
||||||
renderContactBig(_theme, _ctc, c_child, 2);
|
|
||||||
|
|
||||||
ImGui::PopID();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// TODO: remove
|
|
||||||
ImGui::TableNextRow();
|
|
||||||
ImGui::TableNextColumn();
|
|
||||||
ImGui::TextDisabled("no parent of");
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Unindent();
|
|
||||||
|
|
||||||
}
|
|
||||||
ImGui::PopID();
|
|
||||||
}
|
|
||||||
ImGui::EndTable();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ImGui::End();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <solanaceae/contact/contact_model3.hpp>
|
|
||||||
|
|
||||||
#include "./texture_cache_defs.hpp"
|
|
||||||
|
|
||||||
// fwd
|
|
||||||
struct Theme;
|
|
||||||
|
|
||||||
class ContactTreeWindow {
|
|
||||||
bool _show_window {true};
|
|
||||||
|
|
||||||
Contact3Registry& _cr;
|
|
||||||
|
|
||||||
Theme& _theme;
|
|
||||||
ContactTextureCache& _ctc;
|
|
||||||
|
|
||||||
public:
|
|
||||||
ContactTreeWindow(Contact3Registry& cr, Theme& theme, ContactTextureCache& ctc);
|
|
||||||
|
|
||||||
void render(void);
|
|
||||||
};
|
|
||||||
|
|
@ -43,7 +43,6 @@ MainScreen::MainScreen(SimpleConfigModel&& conf_, SDL_Renderer* renderer_, Theme
|
|||||||
mil(),
|
mil(),
|
||||||
msg_tc(mil, sdlrtu),
|
msg_tc(mil, sdlrtu),
|
||||||
cg(conf, os, rmm, cr, sdlrtu, contact_tc, msg_tc, theme),
|
cg(conf, os, rmm, cr, sdlrtu, contact_tc, msg_tc, theme),
|
||||||
ctw(cr, theme, contact_tc),
|
|
||||||
sw(conf),
|
sw(conf),
|
||||||
osui(os),
|
osui(os),
|
||||||
tuiu(tc, conf),
|
tuiu(tc, conf),
|
||||||
@ -358,7 +357,6 @@ Screen* MainScreen::render(float time_delta, bool&) {
|
|||||||
const float msgtc_interval = msg_tc.update();
|
const float msgtc_interval = msg_tc.update();
|
||||||
|
|
||||||
const float cg_interval = cg.render(time_delta); // render
|
const float cg_interval = cg.render(time_delta); // render
|
||||||
ctw.render();
|
|
||||||
sw.render(); // render
|
sw.render(); // render
|
||||||
osui.render();
|
osui.render();
|
||||||
tuiu.render(); // render
|
tuiu.render(); // render
|
||||||
|
@ -30,7 +30,6 @@
|
|||||||
#include "./message_image_loader.hpp"
|
#include "./message_image_loader.hpp"
|
||||||
|
|
||||||
#include "./chat_gui4.hpp"
|
#include "./chat_gui4.hpp"
|
||||||
#include "./chat_gui/contact_tree.hpp"
|
|
||||||
#include "./chat_gui/settings_window.hpp"
|
#include "./chat_gui/settings_window.hpp"
|
||||||
#include "./object_store_ui.hpp"
|
#include "./object_store_ui.hpp"
|
||||||
#include "./tox_ui_utils.hpp"
|
#include "./tox_ui_utils.hpp"
|
||||||
@ -93,7 +92,6 @@ struct MainScreen final : public Screen {
|
|||||||
TextureCache<void*, Message3Handle, MessageImageLoader> msg_tc;
|
TextureCache<void*, Message3Handle, MessageImageLoader> msg_tc;
|
||||||
|
|
||||||
ChatGui4 cg;
|
ChatGui4 cg;
|
||||||
ContactTreeWindow ctw;
|
|
||||||
SettingsWindow sw;
|
SettingsWindow sw;
|
||||||
ObjectStoreUI osui;
|
ObjectStoreUI osui;
|
||||||
ToxUIUtils tuiu;
|
ToxUIUtils tuiu;
|
||||||
|
Loading…
Reference in New Issue
Block a user