mirror of
https://github.com/XITRIX/Moonlight-Switch.git
synced 2026-05-30 11:46:51 +00:00
45 lines
1.1 KiB
C++
45 lines
1.1 KiB
C++
//
|
|
// streaming_input_overlay.hpp
|
|
// Moonlight
|
|
//
|
|
// Created by Даниил Виноградов on 25.08.2021.
|
|
//
|
|
|
|
#pragma once
|
|
|
|
#include "keyboard_view.hpp"
|
|
#include "streaming_view.hpp"
|
|
#include <borealis.hpp>
|
|
|
|
class StreamingInputOverlay : public brls::Box {
|
|
public:
|
|
StreamingInputOverlay(StreamingView* streamView);
|
|
|
|
void show();
|
|
|
|
void draw(NVGcontext* vg, float x, float y, float width, float height,
|
|
brls::Style style, brls::FrameContext* ctx) override;
|
|
brls::AppletFrame* getAppletFrame() override;
|
|
void onFocusGained() override;
|
|
bool isTranslucent() override { return true; }
|
|
|
|
private:
|
|
StreamingView* streamView;
|
|
KeyboardView* keyboard = nullptr;
|
|
bool isKeyboardOpen = false;
|
|
bool hideHints = false;
|
|
|
|
void toggleKeyboard();
|
|
void refreshKeyboard();
|
|
void toggleHintsVisibility();
|
|
|
|
void populateHintWithDefaultItems();
|
|
void populateHintWithKeyboardItems();
|
|
|
|
BRLS_BIND(brls::Box, inner, "inner");
|
|
BRLS_BIND(brls::Box, hintBar, "hint_bar");
|
|
BRLS_BIND(brls::AppletFrame, applet, "applet");
|
|
|
|
std::vector<brls::ActionIdentifier> actionsToFree;
|
|
};
|