sources/interface.cpp

changeset 143
b9993733952a
parent 140
e49aa4aa98c0
child 145
d0aedc9be448
equal deleted inserted replaced
142:b4f89893c702 143:b9993733952a
974 time(&now); 974 time(&now);
975 char timestamp[32]; 975 char timestamp[32];
976 strftime(timestamp, sizeof timestamp, "[%H:%M:%S] ", localtime(&now)); 976 strftime(timestamp, sizeof timestamp, "[%H:%M:%S] ", localtime(&now));
977 977
978 for (char ch : String(timestamp)) 978 for (char ch : String(timestamp))
979 m_outputLines.last().add_char(ch); 979 m_outputLines.last().addChar(ch);
980 } 980 }
981 981
982 // Remove some lines if there's too many of them. 20,000 should be enough, I hope. 982 // Remove some lines if there's too many of them. 20,000 should be enough, I hope.
983 while (m_outputLines.size() > 20000) 983 while (m_outputLines.size() > 20000)
984 m_outputLines.remove_at(0); 984 m_outputLines.remove_at(0);
985 985
986 m_outputLines.last().add_char(ch); 986 m_outputLines.last().addChar(ch);
987 } 987 }
988 988
989 m_needOutputRender = true; 989 m_needOutputRender = true;
990 } 990 }
991 991
1018 m_playerNames.clear(); 1018 m_playerNames.clear();
1019 1019
1020 for (const String& name : names) 1020 for (const String& name : names)
1021 { 1021 {
1022 ColoredLine coloredname; 1022 ColoredLine coloredname;
1023 coloredname.add_string(name); 1023 coloredname.addString(name);
1024 coloredname.finalize(); 1024 coloredname.finalize();
1025 m_playerNames.append(coloredname); 1025 m_playerNames.append(coloredname);
1026 } 1026 }
1027 1027
1028 m_needNicklistRender = true; 1028 m_needNicklistRender = true;

mercurial