MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / ListNextItem

Method ListNextItem

editor/TextureDialog.cpp:533–551  ·  view source on GitHub ↗

Specify the next/prev item to be drawn in the box by DrawItem. Returns the item # following or preceding the passed the item #

Source from the content-addressed store, hash-verified

531// Specify the next/prev item to be drawn in the box by DrawItem.
532// Returns the item # following or preceding the passed the item #
533int CGrTextureListBox::ListNextItem(int curtex) {
534 int next_texture = -1;
535
536 if (curtex >= 0)
537 next_texture = GetNextTexture(curtex);
538 if (next_texture <= curtex)
539 return curtex;
540
541 while ((Show_used && !CurrentlyUsedTextures[next_texture]) ||
542 !(GameTextures[next_texture].flags & D3EditState.texture_display_flags)) {
543 next_texture = GetNextTexture(next_texture);
544 // mprintf(0, "next_tex = %d\n", next_texture);
545 if (next_texture == curtex) {
546 break;
547 }
548 }
549
550 return next_texture;
551}
552
553int CGrTextureListBox::ListPrevItem(int curtex) {
554 int prev_texture = -1;

Callers 1

ListBoxProcMethod · 0.80

Calls 1

GetNextTextureFunction · 0.85

Tested by

no test coverage detected