mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-22 07:03:38 +00:00
UI: Avoid enum/float comparisons.
This commit is contained in:
parent
294d028dbf
commit
c20bcc1f08
@ -19,9 +19,9 @@
|
||||
|
||||
namespace UI {
|
||||
|
||||
const float ITEM_HEIGHT = 64.f;
|
||||
const float MIN_TEXT_SCALE = 0.8f;
|
||||
const float MAX_ITEM_SIZE = 65535.0f;
|
||||
static constexpr Size ITEM_HEIGHT = 64.f;
|
||||
static constexpr float MIN_TEXT_SCALE = 0.8f;
|
||||
static constexpr float MAX_ITEM_SIZE = 65535.0f;
|
||||
|
||||
void MeasureBySpec(Size sz, float contentWidth, MeasureSpec spec, float *measured) {
|
||||
*measured = sz;
|
||||
|
@ -128,10 +128,10 @@ enum FocusDirection {
|
||||
FOCUS_NEXT_PAGE,
|
||||
};
|
||||
|
||||
enum {
|
||||
WRAP_CONTENT = -1,
|
||||
FILL_PARENT = -2,
|
||||
};
|
||||
typedef float Size; // can also be WRAP_CONTENT or FILL_PARENT.
|
||||
|
||||
static constexpr Size WRAP_CONTENT = -1.0f;
|
||||
static constexpr Size FILL_PARENT = -2.0f;
|
||||
|
||||
// Gravity
|
||||
enum Gravity {
|
||||
@ -174,8 +174,6 @@ enum class BorderStyle {
|
||||
ITEM_DOWN_BG,
|
||||
};
|
||||
|
||||
typedef float Size; // can also be WRAP_CONTENT or FILL_PARENT.
|
||||
|
||||
enum Orientation {
|
||||
ORIENT_HORIZONTAL,
|
||||
ORIENT_VERTICAL,
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
namespace UI {
|
||||
|
||||
const float ITEM_HEIGHT = 64.f;
|
||||
static constexpr Size ITEM_HEIGHT = 64.f;
|
||||
|
||||
void ApplyGravity(const Bounds outer, const Margins &margins, float w, float h, int gravity, Bounds &inner) {
|
||||
inner.w = w;
|
||||
|
Loading…
x
Reference in New Issue
Block a user