| 203 | } |
| 204 | |
| 205 | void CEntryText::Remove(bool left, CGump *gump) |
| 206 | { |
| 207 | if (left) |
| 208 | { |
| 209 | if (m_Position < 1) |
| 210 | { |
| 211 | return; |
| 212 | } |
| 213 | m_Position--; |
| 214 | } |
| 215 | else |
| 216 | { |
| 217 | if (m_Position >= (int)WText.length()) |
| 218 | { |
| 219 | return; |
| 220 | } |
| 221 | } |
| 222 | |
| 223 | if (m_Position < (int)WText.length()) |
| 224 | { |
| 225 | WText.erase(WText.begin() + m_Position); |
| 226 | } |
| 227 | else |
| 228 | { |
| 229 | WText.erase(WText.length() - 1); |
| 230 | } |
| 231 | |
| 232 | Changed = true; |
| 233 | if (gump != nullptr) |
| 234 | { |
| 235 | gump->FrameCreated = false; |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | void CEntryText::Clear() |
| 240 | { |
no test coverage detected