mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
Updated Blendish to latest.
This commit is contained in:
parent
f5c0ba3850
commit
c40cf1f4f5
1 changed files with 6 additions and 16 deletions
|
@ -25,12 +25,6 @@ THE SOFTWARE.
|
||||||
#ifndef BLENDISH_H
|
#ifndef BLENDISH_H
|
||||||
#define BLENDISH_H
|
#define BLENDISH_H
|
||||||
|
|
||||||
#if BX_COMPILER_MSVC
|
|
||||||
# pragma warning(push)
|
|
||||||
# pragma warning(disable: 4305) // warning C4305: 'initializing' : truncation from 'double' to 'float'
|
|
||||||
# pragma warning(disable: 4244) // warning C4244: 'return' : conversion from 'int' to 'float', possible loss of data
|
|
||||||
#endif // BX_COMPILER_MSVC
|
|
||||||
|
|
||||||
#ifndef NANOVG_H
|
#ifndef NANOVG_H
|
||||||
#error "nanovg.h must be included first."
|
#error "nanovg.h must be included first."
|
||||||
#endif
|
#endif
|
||||||
|
@ -1103,22 +1097,22 @@ BND_EXPORT NVGcolor bndNodeWireColor(const BNDnodeTheme *theme, BNDwidgetState s
|
||||||
|
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
|
|
||||||
inline float bnd_fminf ( float a, float b )
|
static float bnd_fminf ( float a, float b )
|
||||||
{
|
{
|
||||||
return _isnan(a) ? b : ( _isnan(b) ? a : ((a < b) ? a : b));
|
return _isnan(a) ? b : ( _isnan(b) ? a : ((a < b) ? a : b));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline float bnd_fmaxf ( float a, float b )
|
static float bnd_fmaxf ( float a, float b )
|
||||||
{
|
{
|
||||||
return _isnan(a) ? b : ( _isnan(b) ? a : ((a > b) ? a : b));
|
return _isnan(a) ? b : ( _isnan(b) ? a : ((a > b) ? a : b));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline double bnd_fmin ( double a, double b )
|
static double bnd_fmin ( double a, double b )
|
||||||
{
|
{
|
||||||
return _isnan(a) ? b : ( _isnan(b) ? a : ((a < b) ? a : b));
|
return _isnan(a) ? b : ( _isnan(b) ? a : ((a < b) ? a : b));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline double bnd_fmax ( double a, double b )
|
static double bnd_fmax ( double a, double b )
|
||||||
{
|
{
|
||||||
return _isnan(a) ? b : ( _isnan(b) ? a : ((a > b) ? a : b));
|
return _isnan(a) ? b : ( _isnan(b) ? a : ((a > b) ? a : b));
|
||||||
}
|
}
|
||||||
|
@ -2138,7 +2132,7 @@ void bndIconLabelValue(NVGcontext *ctx, float x, float y, float w, float h,
|
||||||
|
|
||||||
void bndNodeIconLabel(NVGcontext *ctx, float x, float y, float w, float h,
|
void bndNodeIconLabel(NVGcontext *ctx, float x, float y, float w, float h,
|
||||||
int iconid, NVGcolor color, NVGcolor shadowColor,
|
int iconid, NVGcolor color, NVGcolor shadowColor,
|
||||||
int /*align*/, float fontsize, const char *label) {
|
int align, float fontsize, const char *label) {
|
||||||
if (label && (bnd_font >= 0)) {
|
if (label && (bnd_font >= 0)) {
|
||||||
nvgFontFaceId(ctx, bnd_font);
|
nvgFontFaceId(ctx, bnd_font);
|
||||||
nvgFontSize(ctx, fontsize);
|
nvgFontSize(ctx, fontsize);
|
||||||
|
@ -2158,7 +2152,7 @@ void bndNodeIconLabel(NVGcontext *ctx, float x, float y, float w, float h,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void bndIconLabelCaret(NVGcontext *ctx, float x, float y, float w, float /*h*/,
|
void bndIconLabelCaret(NVGcontext *ctx, float x, float y, float w, float h,
|
||||||
int iconid, NVGcolor color, float fontsize, const char *label,
|
int iconid, NVGcolor color, float fontsize, const char *label,
|
||||||
NVGcolor caretcolor, int cbegin, int cend) {
|
NVGcolor caretcolor, int cbegin, int cend) {
|
||||||
float bounds[4];
|
float bounds[4];
|
||||||
|
@ -2333,8 +2327,4 @@ NVGcolor bndNodeWireColor(const BNDnodeTheme *theme, BNDwidgetState state) {
|
||||||
#undef BND_INLINE
|
#undef BND_INLINE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if BX_COMPILER_MSVC
|
|
||||||
# pragma warning(pop)
|
|
||||||
#endif // BX_COMPILER_MSVC
|
|
||||||
|
|
||||||
#endif // BLENDISH_IMPLEMENTATION
|
#endif // BLENDISH_IMPLEMENTATION
|
||||||
|
|
Loading…
Reference in a new issue