diff --git a/tools/designer.cpp b/tools/designer.cpp index a389308..ef3973d 100644 --- a/tools/designer.cpp +++ b/tools/designer.cpp @@ -186,12 +186,12 @@ class GUI { $bg_color.v_slider = Slider("BG V:", &$bg_color.v, 0, 255, 1); $status_ui.set_renderer(Renderer([&]{ - wchar_t fill_char = $font_grid.as_wchar($fill_char); + wchar_t selected_char = $font_grid.as_wchar($fill_char); return hbox({ hflow( vbox( - text(format("\\u{:x} {} IDX: {}, MIN: {}, MAX: {}", int(fill_char), int(fill_char), $fill_char, WCHAR_MIN, WCHAR_MAX)) | border, + text(format("\\u{:x} {} IDX: {}, MIN: {}, MAX: {}", int(selected_char), int(selected_char), $fill_char, WCHAR_MIN, WCHAR_MAX)) | border, separator(), text(format("FG H: {}, S: {}, V: {}", $fg_color.h, $fg_color.s, $fg_color.v)) | border, @@ -254,6 +254,11 @@ class GUI { render_grid($start_char, false); event_happened = true; $renderer.clear_cache(); + } else if(event.key.code == KB::C && event.key.control) { + wchar_t selected_char = $font_grid.as_wchar($fill_char); + string out = format("\\u{:x}", int(selected_char)); + println("COPIED {}", out); + sf::Clipboard::setString(out); } else if(KB::isKeyPressed(KB::Down)) { $start_char = std::min($font_grid.max_chars() - page_size, $start_char + page_size); render_grid($start_char, false);