-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: uh, some menu background stuff
- Loading branch information
1 parent
056bc99
commit c25e48c
Showing
58 changed files
with
3,560 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,49 @@ | ||
/* | ||
* This file is part of the CitizenFX project - http://citizen.re/ | ||
* | ||
* See LICENSE and MENTIONS in the root of the source tree for information | ||
* regarding licensing. | ||
*/ | ||
|
||
#pragma once | ||
|
||
struct CRGBA | ||
{ | ||
uint8_t red; | ||
uint8_t green; | ||
uint8_t blue; | ||
uint8_t alpha; | ||
|
||
inline CRGBA(uint8_t r, uint8_t g, uint8_t b, uint8_t a) | ||
: red(r), green(g), blue(b), alpha(a) | ||
{ | ||
|
||
} | ||
|
||
inline CRGBA() | ||
: CRGBA(0, 0, 0, 255) | ||
{ | ||
|
||
} | ||
|
||
inline CRGBA(uint8_t r, uint8_t g, uint8_t b) | ||
: CRGBA(r, g, b, 255) | ||
{ | ||
|
||
} | ||
|
||
inline static CRGBA FromFloat(float r, float g, float b, float a) | ||
{ | ||
return CRGBA((uint8_t)(r * 255.0f), (uint8_t)(g * 255.0f), (uint8_t)(b * 255.0f), (uint8_t)(a * 255.0f)); | ||
} | ||
|
||
inline static CRGBA FromARGB(uint32_t argb) | ||
{ | ||
return CRGBA((argb & 0xFF0000) >> 16, ((argb & 0xFF00) >> 8), argb & 0xFF, (argb & 0xFF000000) >> 24); | ||
} | ||
|
||
inline uint32_t AsARGB() const | ||
{ | ||
return (alpha << 24) | (red << 16) | (green << 8) | blue; | ||
} | ||
/* | ||
* This file is part of the CitizenFX project - http://citizen.re/ | ||
* | ||
* See LICENSE and MENTIONS in the root of the source tree for information | ||
* regarding licensing. | ||
*/ | ||
|
||
#pragma once | ||
|
||
struct CRGBA | ||
{ | ||
uint8_t red; | ||
uint8_t green; | ||
uint8_t blue; | ||
uint8_t alpha; | ||
|
||
inline CRGBA(uint8_t r, uint8_t g, uint8_t b, uint8_t a) | ||
: red(r), green(g), blue(b), alpha(a) | ||
{ | ||
|
||
} | ||
|
||
inline CRGBA() | ||
: CRGBA(0, 0, 0, 255) | ||
{ | ||
|
||
} | ||
|
||
inline CRGBA(uint8_t r, uint8_t g, uint8_t b) | ||
: CRGBA(r, g, b, 255) | ||
{ | ||
|
||
} | ||
|
||
inline static CRGBA FromFloat(float r, float g, float b, float a) | ||
{ | ||
return CRGBA((uint8_t)(r * 255.0f), (uint8_t)(g * 255.0f), (uint8_t)(b * 255.0f), (uint8_t)(a * 255.0f)); | ||
} | ||
|
||
inline static CRGBA FromARGB(uint32_t argb) | ||
{ | ||
return CRGBA((argb & 0xFF0000) >> 16, ((argb & 0xFF00) >> 8), argb & 0xFF, (argb & 0xFF000000) >> 24); | ||
} | ||
|
||
inline uint32_t AsARGB() const | ||
{ | ||
return (alpha << 24) | (red << 16) | (green << 8) | blue; | ||
} | ||
}; |
170 changes: 85 additions & 85 deletions
170
code/client/shared/Rect.h → code/client/shared/CfxRect.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,86 @@ | ||
/* | ||
* This file is part of the CitizenFX project - http://citizen.re/ | ||
* | ||
* See LICENSE and MENTIONS in the root of the source tree for information | ||
* regarding licensing. | ||
*/ | ||
|
||
#pragma once | ||
|
||
/// | ||
/// A class to represent a floating-point rectangle. | ||
/// | ||
class CRect | ||
{ | ||
public: | ||
/// The values for the rectangle. | ||
float fX1; | ||
float fY1; | ||
float fX2; | ||
float fY2; | ||
|
||
public: | ||
/// | ||
/// Constructor, initializing the rectangle with the passed values. | ||
/// | ||
inline CRect(float x1, float y1, float x2, float y2) | ||
: fX1(x1), fY1(y1), fX2(x2), fY2(y2) | ||
{ | ||
|
||
} | ||
|
||
/// | ||
/// Constructor, initializing the rectangle to be empty. | ||
/// | ||
inline CRect() | ||
: CRect(0, 0, 0, 0) | ||
{ | ||
|
||
} | ||
|
||
/// | ||
/// Returns the left edge of the rectangle. | ||
/// | ||
inline float Left() const { return fwMin(fX1, fX2); } | ||
|
||
/// | ||
/// Returns the right edge of the rectangle. | ||
/// | ||
inline float Right() const { return fwMax(fX1, fX2); } | ||
|
||
/// | ||
/// Returns the top edge of the rectangle. | ||
/// | ||
inline float Top() const { return fwMin(fY1, fY2); } | ||
|
||
/// | ||
/// Returns the bottom edge of the rectangle. | ||
/// | ||
inline float Bottom() const { return fwMax(fY1, fY2); } | ||
|
||
/// | ||
/// Returns the width of the rectangle. | ||
/// | ||
inline float Width() const { return Right() - Left(); } | ||
|
||
/// | ||
/// Returns the height of the rectangle. | ||
/// | ||
inline float Height() const { return Bottom() - Top(); } | ||
|
||
/// | ||
/// Overwrites the rectangle with the passed values. | ||
/// | ||
inline void SetRect(float x1, float y1, float x2, float y2) | ||
{ | ||
fX1 = x1; | ||
fY1 = y1; | ||
fX2 = x2; | ||
fY2 = y2; | ||
} | ||
|
||
/// | ||
/// Returns a string representation of the rectangle. | ||
/// | ||
inline const char* Render() const { return va("CRect(%v, %v, %v, %v)", fX1, fX2, fY1, fY2); } | ||
/* | ||
* This file is part of the CitizenFX project - http://citizen.re/ | ||
* | ||
* See LICENSE and MENTIONS in the root of the source tree for information | ||
* regarding licensing. | ||
*/ | ||
|
||
#pragma once | ||
|
||
/// | ||
/// A class to represent a floating-point rectangle. | ||
/// | ||
class CRect | ||
{ | ||
public: | ||
/// The values for the rectangle. | ||
float fX1; | ||
float fY1; | ||
float fX2; | ||
float fY2; | ||
|
||
public: | ||
/// | ||
/// Constructor, initializing the rectangle with the passed values. | ||
/// | ||
inline CRect(float x1, float y1, float x2, float y2) | ||
: fX1(x1), fY1(y1), fX2(x2), fY2(y2) | ||
{ | ||
|
||
} | ||
|
||
/// | ||
/// Constructor, initializing the rectangle to be empty. | ||
/// | ||
inline CRect() | ||
: CRect(0, 0, 0, 0) | ||
{ | ||
|
||
} | ||
|
||
/// | ||
/// Returns the left edge of the rectangle. | ||
/// | ||
inline float Left() const { return fwMin(fX1, fX2); } | ||
|
||
/// | ||
/// Returns the right edge of the rectangle. | ||
/// | ||
inline float Right() const { return fwMax(fX1, fX2); } | ||
|
||
/// | ||
/// Returns the top edge of the rectangle. | ||
/// | ||
inline float Top() const { return fwMin(fY1, fY2); } | ||
|
||
/// | ||
/// Returns the bottom edge of the rectangle. | ||
/// | ||
inline float Bottom() const { return fwMax(fY1, fY2); } | ||
|
||
/// | ||
/// Returns the width of the rectangle. | ||
/// | ||
inline float Width() const { return Right() - Left(); } | ||
|
||
/// | ||
/// Returns the height of the rectangle. | ||
/// | ||
inline float Height() const { return Bottom() - Top(); } | ||
|
||
/// | ||
/// Overwrites the rectangle with the passed values. | ||
/// | ||
inline void SetRect(float x1, float y1, float x2, float y2) | ||
{ | ||
fX1 = x1; | ||
fY1 = y1; | ||
fX2 = x2; | ||
fY2 = y2; | ||
} | ||
|
||
/// | ||
/// Returns a string representation of the rectangle. | ||
/// | ||
inline const char* Render() const { return va("CRect(%v, %v, %v, %v)", fX1, fX2, fY1, fY2); } | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
#include <StdInc.h> | ||
|
||
#define WANT_CEF_INTERNALS | ||
#include <CefOverlay.h> | ||
|
||
#include <bgfx/bgfx.h> | ||
|
Oops, something went wrong.
c25e48c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe you fix b1868 instead of doing that shit?
c25e48c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you help with a pr yourself instead of being an asshole
c25e48c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can help? I just want the developer of this project not to deal with bullshit, but to solve problems. After all, this project has many problems.
c25e48c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And we all wish that kids stop complaining if you know how to fix problems..help.. complaining won't magically fix problems..
c25e48c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then report them in the appropriate channels like the forums, not by complaining in a GitHub commit comment thread without any specific details as to 'problems' you're experiencing.