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

Method UpdateCursorRect

src/window_shop.cpp:82–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82void Window_Shop::UpdateCursorRect() {
83 int x = 4;
84 int width = contents->GetWidth() - 8;
85 if (!Main_Data::game_system->GetMessageFaceName().empty()) {
86 if (!Main_Data::game_system->IsMessageFaceRightPosition()) {
87 x += LeftMargin + FaceSize + RightFaceMargin;
88 }
89 width -= LeftMargin + FaceSize + RightFaceMargin;
90 }
91
92 Rect rect;
93 switch (mode) {
94 case Scene_Shop::BuySellLeave:
95 case Scene_Shop::BuySellLeave2:
96 rect = Rect(x, index * 16, width, 16);
97 break;
98 default:
99 rect = Rect();
100 break;
101 }
102
103 SetCursorRect(rect);
104}
105
106void Window_Shop::Refresh() {
107 contents->Clear();

Callers 1

StartMethod · 0.45

Calls 5

GetMessageFaceNameMethod · 0.80
RectClass · 0.70
GetWidthMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected