mirror of
https://repo.dec05eba.com/gpu-screen-recorder-ui
synced 2026-03-31 17:27:05 +09:00
Add controller button icons in hotkeys, separate keyboard hotkeys and controller hotkeys
This commit is contained in:
@@ -59,7 +59,8 @@ namespace gsr {
|
||||
std::unique_ptr<List> create_stream_hotkey_options();
|
||||
std::unique_ptr<List> create_screenshot_hotkey_options();
|
||||
std::unique_ptr<List> create_hotkey_control_buttons();
|
||||
std::unique_ptr<Subsection> create_hotkey_subsection(ScrollablePage *parent_page);
|
||||
std::unique_ptr<Subsection> create_keyboard_hotkey_subsection(ScrollablePage *parent_page);
|
||||
std::unique_ptr<Subsection> create_controller_hotkey_subsection(ScrollablePage *parent_page);
|
||||
std::unique_ptr<Button> create_exit_program_button();
|
||||
std::unique_ptr<Button> create_go_back_to_old_ui_button();
|
||||
std::unique_ptr<Subsection> create_application_options_subsection(ScrollablePage *parent_page);
|
||||
|
||||
29
include/gui/Image.hpp
Normal file
29
include/gui/Image.hpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include "Widget.hpp"
|
||||
|
||||
#include <mglpp/graphics/Sprite.hpp>
|
||||
|
||||
namespace gsr {
|
||||
class Image : public Widget {
|
||||
public:
|
||||
enum class ScaleBehavior {
|
||||
SCALE,
|
||||
CLAMP
|
||||
};
|
||||
|
||||
// Set size to {0.0f, 0.0f} for no limit. The image is scaled to the size while keeping its aspect ratio
|
||||
Image(mgl::Texture *texture, mgl::vec2f size, ScaleBehavior scale_behavior);
|
||||
Image(const Image&) = delete;
|
||||
Image& operator=(const Image&) = delete;
|
||||
|
||||
bool on_event(mgl::Event &event, mgl::Window &window, mgl::vec2f offset) override;
|
||||
void draw(mgl::Window &window, mgl::vec2f offset) override;
|
||||
|
||||
mgl::vec2f get_size() override;
|
||||
private:
|
||||
mgl::Sprite sprite;
|
||||
mgl::vec2f size;
|
||||
ScaleBehavior scale_behavior;
|
||||
};
|
||||
}
|
||||
@@ -3,9 +3,6 @@
|
||||
#include <mglpp/system/vec.hpp>
|
||||
#include <mglpp/graphics/Color.hpp>
|
||||
|
||||
#include <functional>
|
||||
#include <string_view>
|
||||
|
||||
namespace mgl {
|
||||
class Window;
|
||||
}
|
||||
@@ -16,4 +13,5 @@ namespace gsr {
|
||||
double get_frame_delta_seconds();
|
||||
void set_frame_delta_seconds(double frame_delta);
|
||||
mgl::vec2f scale_keep_aspect_ratio(mgl::vec2f from, mgl::vec2f to);
|
||||
mgl::vec2f clamp_keep_aspect_ratio(mgl::vec2f from, mgl::vec2f to);
|
||||
}
|
||||
Reference in New Issue
Block a user