Skip to content

SetOrder

Sets the rendering order (z-order) for the specified PrismaView. This method controls the layering of views, determining which views appear on top of others during rendering.

void SetOrder(PrismaView view, int order);
  • Type: PrismaView
  • Description: The PrismaView for which to set the rendering order
  • Type: int
  • Description: The z-order value for the view. Lower values render first (background), higher values render last (foreground)

This method returns void.

// Set first plugin's view to render on top
PrismaUI->SetOrder(firstPluginView, 100);
// Set second plugin's view to render behind
PrismaUI->SetOrder(secondPluginView, 1);
  • Views are sorted by order value before rendering in DrawViews()
  • Lower order values render first (appear behind)
  • Higher order values render last (appear on top)
  • Multiple views can have the same order value
  • New views automatically get maxOrder + 1 on creation
  • Use Constants: Define layer constants for consistent ordering
  • Logical Grouping: Group related views in similar order ranges
  • Leave Gaps: Use increments of 10 or 50 to allow for future insertions
  • Document Layers: Comment your layer hierarchy for maintainability