Aurore
A Switch-like interface for your app, on every screen
Loading...
Searching...
No Matches
aurore::Inspector Class Reference

#include <aurore/core/inspector.hpp>

Public Types

enum class  Mode { CLOSED , LIVE , BROWSE }
 

Static Public Member Functions

static void setEnabled (bool enabled)
 
static bool isEnabled ()
 
static void setMode (Mode mode)
 
static Mode getMode ()
 
static bool isOpen ()
 
static void processInput (InputManager *input, ControllerState *state)
 
static void beginFrame ()
 
static void draw (FrameContext *ctx)
 
static void forgetView (View *view)
 
static void recordColor (const std::string &name, NVGcolor color)
 
static void recordMetric (const std::string &name, float value)
 

Static Public Attributes

static View * recordTarget = nullptr
 
static bool recording = false
 

Detailed Description

The built-in inspector, turned on with Application::setInspectorEnabled() (docs/inspector.md). Closed, it only watches for its toggle: F12 on a keyboard, or both sticks pressed in together (L3 + R3) on a controller. Each press goes one step further:

  • live: the panel follows the focus, the app keeps every input;
  • browse: the inspector takes the controller (and the keys mapped to it) to walk the tree, the app gets none of it;
  • closed again.

The rest of this class is what the core calls; an app only needs Application::setInspectorEnabled().

Member Enumeration Documentation

◆ Mode

enum class aurore::Inspector::Mode
strong
Enumerator
CLOSED 
LIVE 
BROWSE 

Member Function Documentation

◆ beginFrame()

static void aurore::Inspector::beginFrame ( )
static

◆ draw()

static void aurore::Inspector::draw ( FrameContext *  ctx)
static

◆ forgetView()

static void aurore::Inspector::forgetView ( View *  view)
static

◆ getMode()

static Mode aurore::Inspector::getMode ( )
inlinestatic

◆ isEnabled()

static bool aurore::Inspector::isEnabled ( )
inlinestatic

◆ isOpen()

static bool aurore::Inspector::isOpen ( )
inlinestatic

◆ processInput()

static void aurore::Inspector::processInput ( InputManager *  input,
ControllerState *  state 
)
static

Reads the toggle and, when browsing, the controller, whose buttons it then clears from state so that the app does not see them.

◆ recordColor()

static void aurore::Inspector::recordColor ( const std::string &  name,
NVGcolor  color 
)
static

◆ recordMetric()

static void aurore::Inspector::recordMetric ( const std::string &  name,
float  value 
)
static

◆ setEnabled()

static void aurore::Inspector::setEnabled ( bool  enabled)
static

◆ setMode()

static void aurore::Inspector::setMode ( Mode  mode)
static

Member Data Documentation

◆ recording

bool aurore::Inspector::recording = false
inlinestatic

◆ recordTarget

View* aurore::Inspector::recordTarget = nullptr
inlinestatic

The documentation for this class was generated from the following file: