瀏覽代碼

Merge remote-tracking branch 'refs/remotes/origin/lolperso_changes'

legacy
touky 8 年之前
父節點
當前提交
06b88ab2bf
共有 3 個文件被更改,包括 19 次插入0 次删除
  1. +13
    -0
      src/lolimgui.h
  2. +5
    -0
      src/textureimage.cpp
  3. +1
    -0
      src/textureimage.h

+ 13
- 0
src/lolimgui.h 查看文件

@@ -12,8 +12,21 @@

#pragma once

#define IM_VEC2_CLASS_EXTRA ImVec2(const lol::vec2 &v) { x = v.x; y = v.y; } \
ImVec2(const lol::ivec2 &v) : ImVec2(lol::vec2(v)) { } \
operator lol::vec2() const { return lol::vec2(x, y); } \
operator lol::ivec2() const { return lol::ivec2(lol::vec2(x, y)); }

#define IM_VEC4_CLASS_EXTRA ImVec4(const lol::vec4 &v) { x = v.x; y = v.y; z = v.z; w = v.w; } \
ImVec4(const lol::ivec4 &v) : ImVec4(lol::vec4(v)) { } \
operator lol::vec4() { return lol::vec4(x, y, z, w); } \
operator lol::ivec4() const { return lol::ivec4(lol::vec4(x, y, z, w)); }

#include "imgui.h"

#undef IM_VEC2_CLASS_EXTRA
#undef IM_VEC4_CLASS_EXTRA

//Imgui extension ---------------------------------------------------------------------------------
typedef int ImGuiSetDock; // condition flags for Set*() // enum ImGuiSetCond_



+ 5
- 0
src/textureimage.cpp 查看文件

@@ -162,6 +162,11 @@ Image const * TextureImage::GetImage() const
return m_data->m_image;
}

ivec2 TextureImage::GetImageSize() const
{
return m_data->m_image_size;
}

ivec2 TextureImage::GetTextureSize() const
{
return m_data->m_texture_size;


+ 1
- 0
src/textureimage.h 查看文件

@@ -57,6 +57,7 @@ public:
Texture const * GetTexture() const;
Image * GetImage();
Image const * GetImage() const;
ivec2 GetImageSize() const;
ivec2 GetTextureSize() const;
void Bind();
void Unbind();


Loading…
取消
儲存