MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / makeCommonWidgets

Function makeCommonWidgets

src/OpenLoco/src/Ui/Windows/IndustryWindow.cpp:53–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51 };
52
53 static constexpr auto makeCommonWidgets(int32_t frameWidth, int32_t frameHeight, StringId windowCaptionId)
54 {
55 return makeWidgets(
56 Widgets::Frame({ 0, 0 }, { frameWidth, frameHeight }, WindowColour::primary),
57 Widgets::Caption({ 1, 1 }, { frameWidth - 2, 13 }, Widgets::Caption::Style::whiteText, WindowColour::primary, windowCaptionId),
58 Widgets::ImageButton({ frameWidth - 15, 2 }, { 13, 13 }, WindowColour::primary, ImageIds::close_button, StringIds::tooltip_close_window),
59 Widgets::Panel({ 0, 41 }, { frameWidth, 95 }, WindowColour::secondary),
60 Widgets::Tab({ 3, 15 }, { 31, 27 }, WindowColour::secondary, ImageIds::tab, StringIds::tooltip_industry),
61 Widgets::Tab({ 34, 15 }, { 31, 27 }, WindowColour::secondary, ImageIds::tab, StringIds::tooltip_production_graph),
62 Widgets::Tab({ 65, 15 }, { 31, 27 }, WindowColour::secondary, ImageIds::tab, StringIds::tooltip_production_graph),
63 Widgets::Tab({ 96, 15 }, { 31, 27 }, WindowColour::secondary, ImageIds::tab, StringIds::tooltip_statistics));
64 }
65
66 // Defined at the bottom of this file.
67 static void prepareDraw(Window& self);

Callers 1

IndustryWindow.cppFile · 0.70

Calls 6

makeWidgetsFunction · 0.85
FrameClass · 0.85
CaptionClass · 0.85
ImageButtonClass · 0.85
PanelClass · 0.85
TabClass · 0.85

Tested by

no test coverage detected