mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-26 20:25:34 +08:00
[feat] add audio capture button in control bar
This commit is contained in:
@@ -11,7 +11,7 @@ int Render::ControlBar() {
|
||||
|
||||
if (control_bar_expand_) {
|
||||
ImGui::SetCursorPosX(is_control_bar_in_left_ ? (control_window_width_ + 5)
|
||||
: 87);
|
||||
: 53);
|
||||
// Mouse control
|
||||
std::string mouse = ICON_FA_COMPUTER_MOUSE;
|
||||
if (ImGui::Button(mouse.c_str(), ImVec2(25, 25))) {
|
||||
@@ -30,6 +30,26 @@ int Render::ControlBar() {
|
||||
mouse_control_button_pressed_ = !mouse_control_button_pressed_;
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
// Audio capture
|
||||
std::string audio = audio_capture_button_pressed_ ? ICON_FA_VOLUME_HIGH
|
||||
: ICON_FA_VOLUME_XMARK;
|
||||
if (ImGui::Button(audio.c_str(), ImVec2(25, 25))) {
|
||||
if (mouse_control_button_label_ ==
|
||||
localization::audio_capture[localization_language_index_] &&
|
||||
connection_established_) {
|
||||
audio_capture_button_pressed_ = true;
|
||||
audio_capture_ = true;
|
||||
audio_capture_button_label_ =
|
||||
localization::mute[localization_language_index_];
|
||||
} else {
|
||||
control_mouse_ = false;
|
||||
audio_capture_button_label_ =
|
||||
localization::audio_capture[localization_language_index_];
|
||||
}
|
||||
audio_capture_button_pressed_ = !audio_capture_button_pressed_;
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
// Fullscreen
|
||||
std::string fullscreen =
|
||||
|
||||
Reference in New Issue
Block a user