This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct PanelTabParams | |
{ | |
Game *game; | |
World *world; | |
b2World *physics; | |
HandleManager *handles; | |
PackFileGui *packGui; | |
ResourceEditGui *editGui; | |
Graphics *graphics; | |
const GameTime *time; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void **editResources = gui->editResources; | |
float itemHeight = ImGui::GetTextLineHeightWithSpacing(); | |
int displayStart = 0, displayEnd = gui->numEditResources; | |
int listItemHovered = -1; | |
ImGui::CalcListClipping(gui->numEditResources, itemHeight, &displayStart, &displayEnd); | |
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + (displayStart * itemHeight)); | |
ImVec4 dirtyColor(1.0f, 0.5f, 0.5f, 1.0f), normalColor(1.0f, 1.0f, 1.0f, 1.0f); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void GetColumnOffsetsFromImGui(PackFileGui *gui) | |
{ | |
for (int i = 1; i < ARRAY_ELEMENTS(gui->displayColumnOffsets); ++i) | |
{ | |
gui->displayColumnOffsets[i] = ImGui::GetColumnOffset(i); | |
} | |
} | |
static void SendColumnOffsetsToImGui(PackFileGui *gui) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int indexCompare(const void *leftIndex, const void *rightIndex) | |
{ | |
return *(int *)leftIndex - *(int *)rightIndex; | |
} | |
int pathCompare(const void *leftIndex, const void *rightIndex) | |
{ | |
AssetManifest *manifest = pack.manifest; | |
return strcmp(manifest->paths[*(int *)leftIndex], manifest->paths[*(int *)rightIndex]); | |
} |