mirror of
https://repo.dec05eba.com/gpu-screen-recorder-ui
synced 2026-03-31 09:17:04 +09:00
Align list items, dont process selected item twice if changed in event loop, mouse button events should only occur when pressing left mouse button
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
namespace gsr {
|
||||
struct SupportedVideoCodecs {
|
||||
bool h264 = false;
|
||||
bool h264_software = false;
|
||||
bool hevc = false;
|
||||
bool av1 = false;
|
||||
bool vp8 = false;
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace gsr {
|
||||
void draw(mgl::Window &window, mgl::vec2f offset) override;
|
||||
|
||||
void add_item(const std::string &text, const std::string &id);
|
||||
void set_selected_item(const std::string &id);
|
||||
|
||||
mgl::vec2f get_size() override;
|
||||
private:
|
||||
|
||||
@@ -12,7 +12,13 @@ namespace gsr {
|
||||
HORIZONTAL
|
||||
};
|
||||
|
||||
List(Orientation orientation);
|
||||
enum class Alignment {
|
||||
START,
|
||||
CENTER,
|
||||
END
|
||||
};
|
||||
|
||||
List(Orientation orientation, Alignment content_alignment = Alignment::START);
|
||||
List(const List&) = delete;
|
||||
List& operator=(const List&) = delete;
|
||||
|
||||
@@ -24,5 +30,6 @@ namespace gsr {
|
||||
protected:
|
||||
std::vector<std::unique_ptr<Widget>> widgets;
|
||||
Orientation orientation;
|
||||
Alignment content_alignment;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user