← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/bug-1741779-map-description-edit-cutoff into lp:widelands

 

I am not quite sure what to make out of this branch. If I guess right, that means that text in editboxes should be able to become as long as I want. However, when typing long texts I get (both here and in trunk):

Texture (2051, 18) too big! Maximum size is 2048.
terminate called after throwing an instance of 'RT::TextureTooBig'
  what():  Texture (2051, 18) too big! Maximum size is 2048.

Tested with the host-ip box in the LAN lobby, the edit field when saving a game and the map description when using the editor by entering one long string (i.e., keeping key pressed for 10 seconds). When entering multiple "words" in the editor it does not crash in either branch but starts lagging after some time.

Some remarks about the code:

- In Editbox the maximum length can also be set by set_max_length(). I guess the condition there has to be adapted, too?

  m_->maxLength = std::min(g_gr->max_texture_size() / UI_FONT_SIZE_SMALL, static_cast<int>(n));

(Also a small documentation bug: the function is called set_max_length() but the in the documentation of set_text() it is called setMaxLength().)

- It seems like MultilineEditbox::Data::maxbytes can be removed completely since it is only used as read-only upper bound and is now fixed at "infinite". I think the conditions where it is used will never trigger now.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1741779-map-description-edit-cutoff/+merge/345495
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1741779-map-description-edit-cutoff into lp:widelands.


References