MCPcopy Create free account
hub / github.com/EasyRPG/Player / DrawOption

Method DrawOption

src/window_settings.cpp:54–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54void Window_Settings::DrawOption(int index) {
55 Rect rect = GetItemRect(index);
56 contents->ClearRect(rect);
57
58 auto& option = GetFrame().options[index];
59
60 bool enabled = bool(option.action);
61 Font::SystemColor color = enabled ? option.color : Font::ColorDisabled;
62
63 contents->TextDraw(rect, color, option.text);
64 contents->TextDraw(rect, color, option.value_text, Text::AlignRight);
65}
66
67Window_Settings::StackFrame& Window_Settings::GetFrame(int n) {
68 auto i = stack_index - n;

Callers 1

UpdateFontMethod · 0.80

Calls 2

ClearRectMethod · 0.80
TextDrawMethod · 0.80

Tested by

no test coverage detected