BlankMat 0.1.0
Free open-source 3D texture creation application
Loading...
Searching...
No Matches
GUIWindowUtils Class Reference

Static Public Member Functions

static bool Popup (const std::string &label, bool &showPopup)
 
static int Dropdown (const std::string &label, int &index, const std::vector< std::string > &options)
 
static void ColorEdit (const std::string &label, glm::vec3 &color, std::string &selColor, float spacing)
 
static void TextureEdit (Texture *texture)
 
static bool TextureSelect (const std::string &name, Texture *texture, Texture *&selection)
 
static bool MaterialSelect (const std::string &name, Material *material, Material *&selection, float spacing)
 
static void Image (unsigned int textureID, const glm::vec2 &size, const glm::vec3 &borderColor=glm::vec3(0, 0, 0), float borderAlpha=1.0f)
 
static void Image (unsigned int textureID, float size, const glm::vec3 &borderColor=glm::vec3(0, 0, 0), float borderAlpha=1.0f)
 
static bool ImageButton (unsigned int textureID, const glm::vec2 &size, const glm::vec3 &tintColor=glm::vec3(0, 0, 0), float tintAlpha=1.0f)
 
static bool ImageButton (unsigned int textureID, float size, const glm::vec3 &tintColor=glm::vec3(0, 0, 0), float tintAlpha=1.0f)
 
template<typename T >
static bool Selectable (const std::string &label, T &selValue, T thisValue, bool *wasPressed=nullptr, const glm::vec2 &size=glm::vec2(0.0f))
 
template<typename T >
static bool Deselectable (const std::string &label, T *&selValue, T *thisValue, bool *wasPressed=nullptr, const glm::vec2 &size=glm::vec2(0.0f))
 
static bool Deselectable (const std::string &label, std::string &selValue, std::string thisValue)
 
static bool Checkbox (const std::string &label, bool value)
 
template<typename T >
static bool InputName (const std::string &label, const std::string &prevValue, std::string &curValue, IContainer< T > *container, ImGuiInputTextFlags flags=ImGuiInputTextFlags_None)
 
static std::string InputText (const std::string &label, std::string value, bool *enterPressed=nullptr, ImGuiInputTextFlags flags=ImGuiInputTextFlags_None)
 
static int InputInt (const std::string &label, int value, ImGuiInputTextFlags flags=ImGuiInputTextFlags_None)
 
static float InputFloat (const std::string &label, float value, ImGuiInputTextFlags flags=ImGuiInputTextFlags_None)
 
static glm::vec3 InputVec3 (const std::string &label, glm::vec3 value, ImGuiInputTextFlags flags=ImGuiInputTextFlags_None)
 
static glm::mat3 InputMat3 (const std::string &label, const glm::mat3 &value, ImGuiInputTextFlags flags=ImGuiInputTextFlags_None)
 
static glm::mat4 InputMat4 (const std::string &label, const glm::mat4 &value, ImGuiInputTextFlags flags=ImGuiInputTextFlags_None)
 
static void DrawColor (const glm::vec3 &color, ImVec2 pos, float size)
 
static glm::vec3 ColorPicker (const std::string &label, const glm::vec3 &value)
 

Static Public Attributes

static const float TEXTURE_SIZE = 256.0f
 
static const std::vector< std::string > TEXTURE_TYPES = { "Diffuse", "Ambient", "Specular", "Normal", "Height", "Alpha" }
 

Member Function Documentation

◆ Checkbox()

static bool GUIWindowUtils::Checkbox ( const std::string &  label,
bool  value 
)
inlinestatic

◆ ColorEdit()

static void GUIWindowUtils::ColorEdit ( const std::string &  label,
glm::vec3 &  color,
std::string &  selColor,
float  spacing 
)
inlinestatic

◆ ColorPicker()

static glm::vec3 GUIWindowUtils::ColorPicker ( const std::string &  label,
const glm::vec3 &  value 
)
inlinestatic

◆ Deselectable() [1/2]

static bool GUIWindowUtils::Deselectable ( const std::string &  label,
std::string &  selValue,
std::string  thisValue 
)
inlinestatic

◆ Deselectable() [2/2]

template<typename T >
static bool GUIWindowUtils::Deselectable ( const std::string &  label,
T *&  selValue,
T *  thisValue,
bool *  wasPressed = nullptr,
const glm::vec2 &  size = glm::vec2(0.0f) 
)
inlinestatic

◆ DrawColor()

static void GUIWindowUtils::DrawColor ( const glm::vec3 &  color,
ImVec2  pos,
float  size 
)
inlinestatic

◆ Dropdown()

static int GUIWindowUtils::Dropdown ( const std::string &  label,
int &  index,
const std::vector< std::string > &  options 
)
inlinestatic

◆ Image() [1/2]

static void GUIWindowUtils::Image ( unsigned int  textureID,
const glm::vec2 &  size,
const glm::vec3 &  borderColor = glm::vec3(0, 0, 0),
float  borderAlpha = 1.0f 
)
inlinestatic

◆ Image() [2/2]

static void GUIWindowUtils::Image ( unsigned int  textureID,
float  size,
const glm::vec3 &  borderColor = glm::vec3(0, 0, 0),
float  borderAlpha = 1.0f 
)
inlinestatic

◆ ImageButton() [1/2]

static bool GUIWindowUtils::ImageButton ( unsigned int  textureID,
const glm::vec2 &  size,
const glm::vec3 &  tintColor = glm::vec3(0, 0, 0),
float  tintAlpha = 1.0f 
)
inlinestatic

◆ ImageButton() [2/2]

static bool GUIWindowUtils::ImageButton ( unsigned int  textureID,
float  size,
const glm::vec3 &  tintColor = glm::vec3(0, 0, 0),
float  tintAlpha = 1.0f 
)
inlinestatic

◆ InputFloat()

static float GUIWindowUtils::InputFloat ( const std::string &  label,
float  value,
ImGuiInputTextFlags  flags = ImGuiInputTextFlags_None 
)
inlinestatic

◆ InputInt()

static int GUIWindowUtils::InputInt ( const std::string &  label,
int  value,
ImGuiInputTextFlags  flags = ImGuiInputTextFlags_None 
)
inlinestatic

◆ InputMat3()

static glm::mat3 GUIWindowUtils::InputMat3 ( const std::string &  label,
const glm::mat3 &  value,
ImGuiInputTextFlags  flags = ImGuiInputTextFlags_None 
)
inlinestatic

◆ InputMat4()

static glm::mat4 GUIWindowUtils::InputMat4 ( const std::string &  label,
const glm::mat4 &  value,
ImGuiInputTextFlags  flags = ImGuiInputTextFlags_None 
)
inlinestatic

◆ InputName()

template<typename T >
static bool GUIWindowUtils::InputName ( const std::string &  label,
const std::string &  prevValue,
std::string &  curValue,
IContainer< T > *  container,
ImGuiInputTextFlags  flags = ImGuiInputTextFlags_None 
)
inlinestatic

◆ InputText()

static std::string GUIWindowUtils::InputText ( const std::string &  label,
std::string  value,
bool *  enterPressed = nullptr,
ImGuiInputTextFlags  flags = ImGuiInputTextFlags_None 
)
inlinestatic

◆ InputVec3()

static glm::vec3 GUIWindowUtils::InputVec3 ( const std::string &  label,
glm::vec3  value,
ImGuiInputTextFlags  flags = ImGuiInputTextFlags_None 
)
inlinestatic

◆ MaterialSelect()

static bool GUIWindowUtils::MaterialSelect ( const std::string &  name,
Material material,
Material *&  selection,
float  spacing 
)
inlinestatic

◆ Popup()

static bool GUIWindowUtils::Popup ( const std::string &  label,
bool &  showPopup 
)
inlinestatic

◆ Selectable()

template<typename T >
static bool GUIWindowUtils::Selectable ( const std::string &  label,
T &  selValue,
thisValue,
bool *  wasPressed = nullptr,
const glm::vec2 &  size = glm::vec2(0.0f) 
)
inlinestatic

◆ TextureEdit()

static void GUIWindowUtils::TextureEdit ( Texture texture)
inlinestatic

◆ TextureSelect()

static bool GUIWindowUtils::TextureSelect ( const std::string &  name,
Texture texture,
Texture *&  selection 
)
inlinestatic

Member Data Documentation

◆ TEXTURE_SIZE

const float GUIWindowUtils::TEXTURE_SIZE = 256.0f
inlinestatic

◆ TEXTURE_TYPES

const std::vector<std::string> GUIWindowUtils::TEXTURE_TYPES = { "Diffuse", "Ambient", "Specular", "Normal", "Height", "Alpha" }
inlinestatic