Closed GoogleCodeExporter closed 9 years ago
Some interesting information about this...
I have added an algorithm for shortening the file names, but it wouldn't help
on the
Jimmy Neutron example. I suppose I could get rid of the space before the (E)
though.
It would help a lot if the rom was called " (asdfghjugyf.com)135235 Jimmy
Neutron -
Boy Genius: VS Jimmy Negatron (E) (!)."
The list box items are not constrained by the edges of the box in any way, and
part
of the filename is actually drawn under the scrollbar and possibly extending
outside
it. Because of that, the filename lengths are shortened so that doesn't happen
too
much. So if the filename has lots of "i"s in it, you will see the filename was
cut unnecessarily short when more of the name would have fitted. If the
filename has lots
of "W"s in it, maybe it will go past the edge of the box.
The full name is not actually stored in the list anywhere in memory, it trims
it to
display size before adding it to the internal list. So we can't easily show
parts of
the name that aren't visible, because we threw away that information already.
Displaying near the edges of the screen is problematic. Some people's TVs crop
the
edges by quite a lot.
The space on the right is reserved for screenshots, but that feature isn't
implemented yet, so I don't know why we need the space for it to be present in
this
version.
Original comment by Carl.Kenner@gmail.com
on 24 Apr 2009 at 9:59
Would it be to difficult to add a horizontal scroll bar if the emulator notices
there
is a need. I know you said the full name is not stored but is it possible to
rewrite
that portion to store full names into memory. Then of course you would also
have to
set in a max length to avoid never ending titles from causing issues. While
looking
at GBA titles only it seems the max length would need to be 80 chars.
Yu-Gi-Oh! - 7 Trials to Glory - World Championship Tournament 2005 (U)(M6) [t1]
You could use your algorithm to shorten by taking the spaces out before and
after "-"
as well as any time it finds reoccurring ( or [ with a space in between or (
then [
and to replace the space with ":". While its not shortening the number of
characters
it will shorten the display size.
You could also have it remove all instances of "(M#)" as this is just an
identifier
to how many languages are included in the game. It is the only unnecessary
portion of
the good code, but would take ages to manually remove per rom.
Using both above examples you could eliminate 9 characters from the max needed.
Though the 80 max might be incorrect because I am only including (U) roms.
I could be totally off but im thinking something like this.
LRESULT CHScrollListBox::OnAddString(WPARAM wParam, LPARAM lParam)
{
LRESULT lResult = Default();
if (!((lResult == LB_ERR) || (lResult == LB_ERRSPACE)))
SetNewHExtent((LPCTSTR) lParam);
return lResult;
}
then ---
void CHScrollListBox::SetNewHExtent(LPCTSTR lpszNewString)
{
int iExt = GetTextLen(lpszNewString);
if (iExt > GetHorizontalExtent())
SetHorizontalExtent(iExt);
}
and then of course set a max acceptable horizontal length to prevent problems.
Original comment by CapC4...@gmail.com
on 25 Apr 2009 at 7:28
[deleted comment]
Yes, but that would come after they add the horizontal scroll bar :)
Original comment by CapC4...@gmail.com
on 25 Apr 2009 at 7:35
Original comment by dborth@gmail.com
on 1 May 2009 at 1:59
Original issue reported on code.google.com by
CapC4...@gmail.com
on 23 Apr 2009 at 5:11