mirror of
https://repo.dec05eba.com/gpu-screen-recorder-ui
synced 2026-03-31 09:17:04 +09:00
Clearer delete, update mglpp
This commit is contained in:
Submodule depends/mglpp updated: 7d6e67668b...0c90a62d08
BIN
images/delete.png
Normal file
BIN
images/delete.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 511 B |
BIN
images/trash.png
BIN
images/trash.png
Binary file not shown.
|
Before Width: | Height: | Size: 691 B |
@@ -42,7 +42,7 @@ namespace gsr {
|
|||||||
mgl::Texture pause_texture;
|
mgl::Texture pause_texture;
|
||||||
mgl::Texture save_texture;
|
mgl::Texture save_texture;
|
||||||
mgl::Texture screenshot_texture;
|
mgl::Texture screenshot_texture;
|
||||||
mgl::Texture trash_texture;
|
mgl::Texture delete_texture;
|
||||||
|
|
||||||
mgl::Texture ps4_home_texture;
|
mgl::Texture ps4_home_texture;
|
||||||
mgl::Texture ps4_options_texture;
|
mgl::Texture ps4_options_texture;
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ namespace gsr {
|
|||||||
if(!theme->folder_texture.load_from_file((resources_path + "images/folder.png").c_str()))
|
if(!theme->folder_texture.load_from_file((resources_path + "images/folder.png").c_str()))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if(!theme->up_arrow_texture.load_from_file((resources_path + "images/up_arrow.png").c_str(), mgl::Texture::LoadOptions{false, false, true}))
|
if(!theme->up_arrow_texture.load_from_file((resources_path + "images/up_arrow.png").c_str(), mgl::Texture::LoadOptions{false, false, MGL_TEXTURE_SCALE_LINEAR_MIPMAP}))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if(!theme->replay_button_texture.load_from_file((resources_path + "images/replay.png").c_str()))
|
if(!theme->replay_button_texture.load_from_file((resources_path + "images/replay.png").c_str()))
|
||||||
@@ -93,10 +93,10 @@ namespace gsr {
|
|||||||
if(!theme->logo_texture.load_from_file((resources_path + "images/gpu_screen_recorder_logo.png").c_str()))
|
if(!theme->logo_texture.load_from_file((resources_path + "images/gpu_screen_recorder_logo.png").c_str()))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if(!theme->checkbox_circle_texture.load_from_file((resources_path + "images/checkbox_circle.png").c_str(), mgl::Texture::LoadOptions{false, false, true}))
|
if(!theme->checkbox_circle_texture.load_from_file((resources_path + "images/checkbox_circle.png").c_str(), mgl::Texture::LoadOptions{false, false, MGL_TEXTURE_SCALE_LINEAR_MIPMAP}))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if(!theme->checkbox_background_texture.load_from_file((resources_path + "images/checkbox_background.png").c_str(), mgl::Texture::LoadOptions{false, false, true}))
|
if(!theme->checkbox_background_texture.load_from_file((resources_path + "images/checkbox_background.png").c_str(), mgl::Texture::LoadOptions{false, false, MGL_TEXTURE_SCALE_LINEAR_MIPMAP}))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if(!theme->play_texture.load_from_file((resources_path + "images/play.png").c_str()))
|
if(!theme->play_texture.load_from_file((resources_path + "images/play.png").c_str()))
|
||||||
@@ -114,25 +114,25 @@ namespace gsr {
|
|||||||
if(!theme->screenshot_texture.load_from_file((resources_path + "images/screenshot.png").c_str()))
|
if(!theme->screenshot_texture.load_from_file((resources_path + "images/screenshot.png").c_str()))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if(!theme->trash_texture.load_from_file((resources_path + "images/trash.png").c_str(), mgl::Texture::LoadOptions{false, false, true}))
|
if(!theme->delete_texture.load_from_file((resources_path + "images/delete.png").c_str(), mgl::Texture::LoadOptions{false, false, MGL_TEXTURE_SCALE_LINEAR_MIPMAP}))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if(!theme->ps4_home_texture.load_from_file((resources_path + "images/ps4_home.png").c_str(), mgl::Texture::LoadOptions{false, false, true}))
|
if(!theme->ps4_home_texture.load_from_file((resources_path + "images/ps4_home.png").c_str(), mgl::Texture::LoadOptions{false, false, MGL_TEXTURE_SCALE_LINEAR_MIPMAP}))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if(!theme->ps4_options_texture.load_from_file((resources_path + "images/ps4_options.png").c_str(), mgl::Texture::LoadOptions{false, false, true}))
|
if(!theme->ps4_options_texture.load_from_file((resources_path + "images/ps4_options.png").c_str(), mgl::Texture::LoadOptions{false, false, MGL_TEXTURE_SCALE_LINEAR_MIPMAP}))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if(!theme->ps4_dpad_up_texture.load_from_file((resources_path + "images/ps4_dpad_up.png").c_str(), mgl::Texture::LoadOptions{false, false, true}))
|
if(!theme->ps4_dpad_up_texture.load_from_file((resources_path + "images/ps4_dpad_up.png").c_str(), mgl::Texture::LoadOptions{false, false, MGL_TEXTURE_SCALE_LINEAR_MIPMAP}))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if(!theme->ps4_dpad_down_texture.load_from_file((resources_path + "images/ps4_dpad_down.png").c_str(), mgl::Texture::LoadOptions{false, false, true}))
|
if(!theme->ps4_dpad_down_texture.load_from_file((resources_path + "images/ps4_dpad_down.png").c_str(), mgl::Texture::LoadOptions{false, false, MGL_TEXTURE_SCALE_LINEAR_MIPMAP}))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if(!theme->ps4_dpad_left_texture.load_from_file((resources_path + "images/ps4_dpad_left.png").c_str(), mgl::Texture::LoadOptions{false, false, true}))
|
if(!theme->ps4_dpad_left_texture.load_from_file((resources_path + "images/ps4_dpad_left.png").c_str(), mgl::Texture::LoadOptions{false, false, MGL_TEXTURE_SCALE_LINEAR_MIPMAP}))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if(!theme->ps4_dpad_right_texture.load_from_file((resources_path + "images/ps4_dpad_right.png").c_str(), mgl::Texture::LoadOptions{false, false, true}))
|
if(!theme->ps4_dpad_right_texture.load_from_file((resources_path + "images/ps4_dpad_right.png").c_str(), mgl::Texture::LoadOptions{false, false, MGL_TEXTURE_SCALE_LINEAR_MIPMAP}))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ namespace gsr {
|
|||||||
window.draw(sprite);
|
window.draw(sprite);
|
||||||
|
|
||||||
const int padding_icon_right = padding_right_icon_scale * get_button_height();
|
const int padding_icon_right = padding_right_icon_scale * get_button_height();
|
||||||
text.set_position((sprite.get_position() + mgl::vec2f(sprite.get_size().x + padding_icon_right, sprite.get_size().y * 0.5f - text.get_bounds().size.y * 0.5f)).floor());
|
text.set_position((sprite.get_position() + mgl::vec2f(sprite.get_size().x + padding_icon_right, sprite.get_size().y * 0.5f - text.get_bounds().size.y * 0.52f)).floor());
|
||||||
window.draw(text);
|
window.draw(text);
|
||||||
} else {
|
} else {
|
||||||
text.set_position((draw_pos + item_size * 0.5f - text.get_bounds().size * 0.5f).floor());
|
text.set_position((draw_pos + item_size * 0.5f - text.get_bounds().size * 0.5f).floor());
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ namespace gsr {
|
|||||||
|
|
||||||
void ComboBox::add_item(const std::string &text, const std::string &id) {
|
void ComboBox::add_item(const std::string &text, const std::string &id) {
|
||||||
items.push_back({mgl::Text(text, *font), id, {0.0f, 0.0f}});
|
items.push_back({mgl::Text(text, *font), id, {0.0f, 0.0f}});
|
||||||
items.back().text.set_max_width(font->get_character_size() * 25); // TODO: Make a proper solution
|
items.back().text.set_max_width(font->get_character_size() * 22); // TODO: Make a proper solution
|
||||||
//items.back().text.set_max_rows(1);
|
//items.back().text.set_max_rows(1);
|
||||||
dirty = true;
|
dirty = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -227,8 +227,9 @@ namespace gsr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<Button> SettingsPage::create_remove_audio_device_button(List *audio_input_list_ptr, List *audio_device_list_ptr) {
|
std::unique_ptr<Button> SettingsPage::create_remove_audio_device_button(List *audio_input_list_ptr, List *audio_device_list_ptr) {
|
||||||
auto remove_audio_track_button = std::make_unique<Button>(&get_theme().body_font, "", mgl::vec2f(0.0f, 0.0f), mgl::Color(35, 40, 44));
|
auto remove_audio_track_button = std::make_unique<Button>(&get_theme().body_font, "Delete", mgl::vec2f(0.0f, 0.0f), mgl::Color(0, 0, 0, 120));
|
||||||
remove_audio_track_button->set_icon(&get_theme().trash_texture);
|
remove_audio_track_button->set_icon(&get_theme().delete_texture);
|
||||||
|
remove_audio_track_button->set_icon_padding_scale(1.0f);
|
||||||
remove_audio_track_button->on_click = [audio_input_list_ptr, audio_device_list_ptr]() {
|
remove_audio_track_button->on_click = [audio_input_list_ptr, audio_device_list_ptr]() {
|
||||||
audio_input_list_ptr->remove_widget(audio_device_list_ptr);
|
audio_input_list_ptr->remove_widget(audio_device_list_ptr);
|
||||||
};
|
};
|
||||||
@@ -349,8 +350,9 @@ namespace gsr {
|
|||||||
auto list = std::make_unique<List>(List::Orientation::HORIZONTAL, List::Alignment::CENTER);
|
auto list = std::make_unique<List>(List::Orientation::HORIZONTAL, List::Alignment::CENTER);
|
||||||
list->add_widget(std::make_unique<Label>(&get_theme().title_font, title, get_color_theme().text_color));
|
list->add_widget(std::make_unique<Label>(&get_theme().title_font, title, get_color_theme().text_color));
|
||||||
|
|
||||||
auto remove_track_button = std::make_unique<Button>(&get_theme().body_font, "", mgl::vec2f(0.0f, 0.0f), mgl::Color(35, 40, 44));
|
auto remove_track_button = std::make_unique<Button>(&get_theme().body_font, "Delete", mgl::vec2f(0.0f, 0.0f), mgl::Color(0, 0, 0, 120));
|
||||||
remove_track_button->set_icon(&get_theme().trash_texture);
|
remove_track_button->set_icon(&get_theme().delete_texture);
|
||||||
|
remove_track_button->set_icon_padding_scale(1.0f);
|
||||||
remove_track_button->on_click = [this, audio_track_subsection]() {
|
remove_track_button->on_click = [this, audio_track_subsection]() {
|
||||||
audio_track_section_list_ptr->remove_widget(audio_track_subsection);
|
audio_track_section_list_ptr->remove_widget(audio_track_subsection);
|
||||||
update_audio_track_titles(audio_track_section_list_ptr);
|
update_audio_track_titles(audio_track_section_list_ptr);
|
||||||
|
|||||||
Reference in New Issue
Block a user