diff options
| author | Charles Giessen <charles@lunarg.com> | 2020-11-17 11:30:08 -0700 |
|---|---|---|
| committer | Charles Giessen <46324611+charles-lunarg@users.noreply.github.com> | 2020-11-18 10:00:02 -0700 |
| commit | edc7a980d238f4d855cee99b91c698396f474553 (patch) | |
| tree | 4db7614e3e8ab5ee8cf8617b8787a00f27b1b38c | |
| parent | 67d0fc6389ffc3cc5802975f8b161f853c11a7ec (diff) | |
| download | usermoji-edc7a980d238f4d855cee99b91c698396f474553.tar.xz | |
vulkaninfo: add option to always open details for HTML
Doesn't alter current behavior.
Change-Id: I76cb0c4395741848667b2687d722b9b2245fb296
| -rw-r--r-- | vulkaninfo/outputprinter.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/vulkaninfo/outputprinter.h b/vulkaninfo/outputprinter.h index 862e965d..730b1b69 100644 --- a/vulkaninfo/outputprinter.h +++ b/vulkaninfo/outputprinter.h @@ -257,6 +257,11 @@ class Printer { return *this; } + Printer &SetAlwaysOpenDetails(bool value = true) { + should_always_open = value; + return *this; + } + Printer &SetTitleAsType() { set_object_name_as_type = true; return *this; @@ -298,7 +303,7 @@ class Printer { } case (OutputType::html): out << std::string(static_cast<size_t>(indents), '\t'); - if (set_details_open) { + if (set_details_open || should_always_open) { out << "<details open>"; set_details_open = false; } else { @@ -398,7 +403,7 @@ class Printer { } case (OutputType::html): out << std::string(static_cast<size_t>(indents), '\t'); - if (set_details_open) { + if (set_details_open || should_always_open) { out << "<details open>"; set_details_open = false; } else { @@ -663,6 +668,9 @@ class Printer { // open <details> bool set_details_open = false; + // always open <details> + bool should_always_open = false; + // make object titles the color of types bool set_object_name_as_type = false; |
