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

Function makeCommonWidgets

src/OpenLoco/src/Ui/Windows/Cheats.cpp:57–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55 }
56
57 static constexpr auto makeCommonWidgets(int32_t frameWidth, int32_t frameHeight, StringId windowCaptionId)
58 {
59 return makeWidgets(
60 Widgets::Frame({ 0, 0 }, { frameWidth, frameHeight }, WindowColour::primary),
61 Widgets::Caption({ 1, 1 }, { frameWidth - 2, 13 }, Widgets::Caption::Style::whiteText, WindowColour::primary, windowCaptionId),
62 Widgets::ImageButton({ frameWidth - 15, 2 }, { 13, 13 }, WindowColour::primary, ImageIds::close_button, StringIds::tooltip_close_window),
63 Widgets::Panel({ 0, 41 }, { frameWidth, frameHeight - 41 }, WindowColour::secondary),
64 Widgets::Tab({ 3, 15 }, { 31, 27 }, WindowColour::secondary, ImageIds::tab),
65 Widgets::Tab({ 34, 15 }, { 31, 27 }, WindowColour::secondary, ImageIds::tab),
66 Widgets::Tab({ 65, 15 }, { 31, 27 }, WindowColour::secondary, ImageIds::tab),
67 Widgets::Tab({ 96, 15 }, { 31, 27 }, WindowColour::secondary, ImageIds::tab));
68 }
69
70 static void drawTabs(Ui::Window& self, Gfx::DrawingContext& drawingCtx)
71 {

Callers 5

Cheats.cppFile · 0.70
SignalTab.cppFile · 0.50
OverheadTab.cppFile · 0.50
StationTab.cppFile · 0.50

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