AnimaEngine  1.0.0
Nintendo DS Pokemon Black, White, Black 2, and White 2 sprite extraction and preview toolchain
Macros | Functions
gui_view_browser.c File Reference

Implementations of main GUI browser screen rendering layout. More...

#include "gui_view_browser.h"
#include "gui_widgets.h"
#include <math.h>

Macros

#define GR_WHITE   ((GrColor){255,255,255,255})
 

Functions

static GrColor Gc (unsigned char r, unsigned char g, unsigned char b, unsigned char a)
 Constructs a GrColor value. More...
 
static void DrawPokemonRow (GrRect row, const PokemonCatalogEntry *entry, int selected, int hovered)
 Draws a single species index row inside the list selection panel. More...
 
static void DrawPreviewPanel (GrRect bounds, GuiPreview *preview)
 Renders the visual drawing canvas representing the loaded animation loop or sheet. More...
 
static void DrawGifSpeedControl (GuiState *state, GrRect bounds, int enabled)
 Renders the delay and framerate control options for GIF and timeline animators. More...
 
static int PreviewModeUsesGifSpeed (GuiPreviewMode mode)
 Checks if a preview mode utilizes dynamic playback speed delay adjustments. More...
 
void GuiView_DrawMainScreen (GuiState *state)
 Renders the main interface (species list sidebar and preview canvas). More...
 

Detailed Description

Implementations of main GUI browser screen rendering layout.

Macro Definition Documentation

◆ GR_WHITE

#define GR_WHITE   ((GrColor){255,255,255,255})

Function Documentation

◆ DrawGifSpeedControl()

static void DrawGifSpeedControl ( GuiState state,
GrRect  bounds,
int  enabled 
)
static

Renders the delay and framerate control options for GIF and timeline animators.

Parameters
stateGUI state context.
boundsLayout bounds.
enabledTrue if interactive modifications are permitted.

◆ DrawPokemonRow()

static void DrawPokemonRow ( GrRect  row,
const PokemonCatalogEntry entry,
int  selected,
int  hovered 
)
static

Draws a single species index row inside the list selection panel.

Parameters
rowLayout bounds.
entryTarget species entry information.
selectedTrue if active row is currently selected.
hoveredTrue if active row is currently hovered by cursor.

◆ DrawPreviewPanel()

static void DrawPreviewPanel ( GrRect  bounds,
GuiPreview preview 
)
static

Renders the visual drawing canvas representing the loaded animation loop or sheet.

Parameters
boundsVisual frame box layout.
previewGUI preview loader context state.

◆ Gc()

static GrColor Gc ( unsigned char  r,
unsigned char  g,
unsigned char  b,
unsigned char  a 
)
static

Constructs a GrColor value.

Parameters
rRed channel.
gGreen channel.
bBlue channel.
aAlpha channel.
Returns
Constructed GrColor struct.

◆ GuiView_DrawMainScreen()

void GuiView_DrawMainScreen ( GuiState state)

Renders the main interface (species list sidebar and preview canvas).

Parameters
stateGlobal GUI state pointer.

◆ PreviewModeUsesGifSpeed()

static int PreviewModeUsesGifSpeed ( GuiPreviewMode  mode)
static

Checks if a preview mode utilizes dynamic playback speed delay adjustments.

Parameters
modeActive preview mode.
Returns
1 if rate-adjustable; 0 otherwise.