Misc UI updates and fixes:

- Vertically center the server name for manually added servers
- Add padding for feature icons
- Use a popup for adding a new server
- Display pointers for both controllers
- Avoid jumps in scrolling when the focused controller changes
- Grab the GUI by the pointed position instead of the center
- Add battery level in lobby
- Use the correct width in the server list if there is a scrollbar
- Make sure the tooltip does not overflow on other layers
- Save the virtual keyboard layout in the config file
- Don't display the IP address for USB connections
- Allow receiving intents when WiVRn is already running
- Add recentering tip
This commit is contained in:
Guillaume Meunier
2024-11-01 14:13:58 +01:00
parent dca3254df9
commit e1ce484c27
20 changed files with 1191 additions and 692 deletions
+5 -1
View File
@@ -177,6 +177,9 @@ configuration::configuration(xr::system & system)
if (auto val = root["passthrough_enabled"]; val.is_bool())
passthrough_enabled = val.get_bool();
if (auto val = root["virtual_keyboard_layout"]; val.is_string())
virtual_keyboard_layout = val.get_string().value();
for (const auto & [i, name]: magic_enum::enum_entries<feature>())
{
if (auto val = root[name]; val.is_bool())
@@ -212,7 +215,7 @@ void configuration::save()
for (auto & [cookie, server_data]: servers)
{
if (server_data.autoconnect || server_data.manual)
if (server_data.autoconnect or server_data.manual)
{
ss << "{";
ss << "\"autoconnect\":" << std::boolalpha << server_data.autoconnect << ",";
@@ -240,5 +243,6 @@ void configuration::save()
json << ",\"passthrough_enabled\":" << std::boolalpha << passthrough_enabled;
for (auto & [key, value]: features)
json << "," << key << ":" << std::boolalpha << value;
json << ",\"virtual_keyboard_layout\":" << json_string(virtual_keyboard_layout);
json << "}";
}