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

Method InsertNewLine

src/window_message.cpp:329–356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

327}
328
329void Window_Message::InsertNewLine() {
330 DebugLog("{}: MSG NEW LINE");
331 if (IsFaceEnabled() && !Main_Data::game_system->IsMessageFaceRightPosition()) {
332 contents_x = LeftMargin + FaceSize + RightFaceMargin;
333 } else {
334 contents_x = 0;
335 }
336
337 contents_y += 16;
338 ++line_count;
339
340 if (pending_message.HasChoices() && line_count >= pending_message.GetChoiceStartLine()) {
341 unsigned choice_index = line_count - pending_message.GetChoiceStartLine();
342 if (pending_message.GetChoiceResetColor()) {
343 // Check for disabled choices
344 if (!pending_message.IsChoiceEnabled(choice_index)) {
345 text_color = Font::ColorDisabled;
346 } else {
347 text_color = Font::ColorDefault;
348 }
349 }
350
351 contents_x += 12;
352 }
353 line_char_counter = 0;
354 prev_char_printable = false;
355 prev_char_waited = true;
356}
357
358void Window_Message::FinishMessageProcessing() {
359 DebugLog("{}: FINISH MSG");

Callers

nothing calls this directly

Calls 6

HasChoicesMethod · 0.80
GetChoiceStartLineMethod · 0.80
GetChoiceResetColorMethod · 0.80
IsChoiceEnabledMethod · 0.80
DebugLogFunction · 0.70

Tested by

no test coverage detected