Plutonium framework API 0.3.0
UI framework libraries for libnx
|
Classes | |
class | Renderer |
struct | RendererInitOptions |
struct | TextureRenderOptions |
Functions | |
sdl2::Renderer | GetMainRenderer () |
sdl2::Window | GetMainWindow () |
sdl2::Surface | GetMainSurface () |
std::pair< u32, u32 > | GetDimensions () |
bool | AddFont (const std::string &font_name, std::shared_ptr< ttf::Font > &font) |
bool | LoadSingleSharedFontInFont (std::shared_ptr< ttf::Font > &font, const PlSharedFontType type) |
bool | LoadAllSharedFontsInFont (std::shared_ptr< ttf::Font > &font) |
void | AddDefaultFont (std::shared_ptr< ttf::Font > &font) |
bool | GetTextDimensions (const std::string &font_name, const std::string &text, i32 &out_width, i32 &out_height) |
i32 | GetTextWidth (const std::string &font_name, const std::string &text) |
i32 | GetTextHeight (const std::string &font_name, const std::string &text) |
sdl2::Texture | RenderText (const std::string &font_name, const std::string &text, const Color clr, const u32 max_width=0, const u32 max_height=0) |
sdl2::Texture | ConvertToTexture (sdl2::Surface surface) |
sdl2::Texture | LoadImage (const std::string &path) |
i32 | GetTextureWidth (sdl2::Texture texture) |
i32 | GetTextureHeight (sdl2::Texture texture) |
void | SetAlphaValue (sdl2::Texture texture, const u8 alpha) |
void | DeleteTexture (sdl2::Texture &texture) |
Variables | |
constexpr u32 | BaseScreenWidth = 1280 |
constexpr u32 | BaseScreenHeight = 720 |
constexpr u32 | ScreenWidth = 1920 |
constexpr u32 | ScreenHeight = 1080 |
constexpr double | ScreenFactor = (double)ScreenWidth / (double)BaseScreenWidth |
constexpr u32 | MixerAllFlags = MIX_INIT_FLAC | MIX_INIT_MOD | MIX_INIT_MP3 | MIX_INIT_OGG |
constexpr u32 | IMGAllFlags = IMG_INIT_PNG | IMG_INIT_JPG | IMG_INIT_TIF | IMG_INIT_WEBP |
constexpr u32 | RendererSoftwareFlags = SDL_RENDERER_SOFTWARE |
constexpr u32 | RendererHardwareFlags = SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED |
|
inline |
bool pu::ui::render::AddFont | ( | const std::string & | font_name, |
std::shared_ptr< ttf::Font > & | font ) |
sdl2::Texture pu::ui::render::ConvertToTexture | ( | sdl2::Surface | surface | ) |
void pu::ui::render::DeleteTexture | ( | sdl2::Texture & | texture | ) |
std::pair< u32, u32 > pu::ui::render::GetDimensions | ( | ) |
sdl2::Renderer pu::ui::render::GetMainRenderer | ( | ) |
sdl2::Surface pu::ui::render::GetMainSurface | ( | ) |
sdl2::Window pu::ui::render::GetMainWindow | ( | ) |
bool pu::ui::render::GetTextDimensions | ( | const std::string & | font_name, |
const std::string & | text, | ||
i32 & | out_width, | ||
i32 & | out_height ) |
i32 pu::ui::render::GetTextHeight | ( | const std::string & | font_name, |
const std::string & | text ) |
i32 pu::ui::render::GetTextureHeight | ( | sdl2::Texture | texture | ) |
i32 pu::ui::render::GetTextureWidth | ( | sdl2::Texture | texture | ) |
i32 pu::ui::render::GetTextWidth | ( | const std::string & | font_name, |
const std::string & | text ) |
bool pu::ui::render::LoadAllSharedFontsInFont | ( | std::shared_ptr< ttf::Font > & | font | ) |
sdl2::Texture pu::ui::render::LoadImage | ( | const std::string & | path | ) |
bool pu::ui::render::LoadSingleSharedFontInFont | ( | std::shared_ptr< ttf::Font > & | font, |
const PlSharedFontType | type ) |
sdl2::Texture pu::ui::render::RenderText | ( | const std::string & | font_name, |
const std::string & | text, | ||
const Color | clr, | ||
const u32 | max_width = 0, | ||
const u32 | max_height = 0 ) |
void pu::ui::render::SetAlphaValue | ( | sdl2::Texture | texture, |
const u8 | alpha ) |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |