mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Make user plot color depend on its name.
This commit is contained in:
parent
a98bbc2340
commit
27a98a3cc2
@ -311,6 +311,7 @@ private:
|
||||
|
||||
std::vector<MemoryPage> GetMemoryPages() const;
|
||||
const char* GetPlotName( const PlotData* plot ) const;
|
||||
uint32_t GetPlotColor( const PlotData* plot ) const;
|
||||
|
||||
void SmallCallstackButton( const char* name, uint32_t callstack, int& idx, bool tooltip = true );
|
||||
void DrawCallstackCalls( uint32_t callstack, uint16_t limit ) const;
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "TracyColor.hpp"
|
||||
#include "TracyImGui.hpp"
|
||||
#include "TracyMouse.hpp"
|
||||
#include "TracyPrint.hpp"
|
||||
@ -33,12 +34,12 @@ const char* View::GetPlotName( const PlotData* plot ) const
|
||||
}
|
||||
}
|
||||
|
||||
static uint32_t GetPlotColor( const PlotData* plot )
|
||||
uint32_t View::GetPlotColor( const PlotData* plot ) const
|
||||
{
|
||||
switch( plot->type )
|
||||
{
|
||||
case PlotType::User:
|
||||
return 0xFF44DDDD;
|
||||
return GetHsvColor( charutil::hash( m_worker.GetString( plot->name ) ), -10 );
|
||||
case PlotType::Memory:
|
||||
return 0xFF2266CC;
|
||||
case PlotType::SysTime:
|
||||
|
Loading…
Reference in New Issue
Block a user