mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-12 15:13:34 +00:00
yes
This commit is contained in:
@@ -26,7 +26,7 @@ namespace mlx
|
||||
|
||||
inline void SetFPSCap(std::uint32_t fps) noexcept;
|
||||
|
||||
inline Handle NewGraphicsSuport(std::size_t w, std::size_t h, const char* title);
|
||||
inline Handle NewGraphicsSuport(std::size_t w, std::size_t h, const char* title, bool is_resizable);
|
||||
inline void ClearGraphicsSupport(Handle win);
|
||||
inline void DestroyGraphicsSupport(Handle win);
|
||||
inline void SetGraphicsSupportPosition(Handle win, int x, int y);
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace mlx
|
||||
m_fps.SetMaxFPS(fps);
|
||||
}
|
||||
|
||||
void* Application::NewGraphicsSuport(std::size_t w, std::size_t h, const char* title)
|
||||
void* Application::NewGraphicsSuport(std::size_t w, std::size_t h, const char* title, bool is_resizable)
|
||||
{
|
||||
MLX_PROFILE_FUNCTION();
|
||||
if(m_image_registry.IsTextureKnown(reinterpret_cast<Texture*>(const_cast<char*>(title))))
|
||||
@@ -88,13 +88,13 @@ namespace mlx
|
||||
{
|
||||
for(std::size_t i = 0; i < 8; i++)
|
||||
{
|
||||
m_graphics.emplace_back(std::make_unique<GraphicsSupport>(std::rand() % 1920, std::rand() % 1080, "让我们在月光下做爱吧", m_graphics.size()));
|
||||
m_graphics.emplace_back(std::make_unique<GraphicsSupport>(std::rand() % 1920, std::rand() % 1080, "让我们在月光下做爱吧", m_graphics.size(), is_resizable));
|
||||
m_graphics.back()->GetWindow()->SetPosition(std::rand() % 1920, std::rand() % 1080);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_graphics.emplace_back(std::make_unique<GraphicsSupport>(w, h, title, m_graphics.size()));
|
||||
m_graphics.emplace_back(std::make_unique<GraphicsSupport>(w, h, title, m_graphics.size(), is_resizable));
|
||||
m_in.RegisterWindow(m_graphics.back()->GetWindow());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace mlx
|
||||
{
|
||||
public:
|
||||
GraphicsSupport(std::size_t w, std::size_t h, NonOwningPtr<Texture> render_target, int id);
|
||||
GraphicsSupport(std::size_t w, std::size_t h, std::string title, int id);
|
||||
GraphicsSupport(std::size_t w, std::size_t h, std::string title, int id, bool is_resizable);
|
||||
|
||||
[[nodiscard]] MLX_FORCEINLINE int& GetID() noexcept { return m_id; }
|
||||
[[nodiscard]] inline std::shared_ptr<Window> GetWindow() { return p_window; }
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace mlx
|
||||
public:
|
||||
SDLManager();
|
||||
|
||||
Handle CreateWindow(const std::string& title, std::size_t w, std::size_t h, bool hidden, std::int32_t& id);
|
||||
Handle CreateWindow(const std::string& title, std::size_t w, std::size_t h, bool hidden, std::int32_t& id, bool is_resizable);
|
||||
void DestroyWindow(Handle window) noexcept;
|
||||
|
||||
void InputsFetcher(func::function<void(mlx_event_type, int, int)> functor);
|
||||
|
||||
Reference in New Issue
Block a user