Selaa lähdekoodia

imgui: use latest master branch.

legacy
Sam Hocevar 6 vuotta sitten
vanhempi
commit
63bbcaad43
6 muutettua tiedostoa jossa 19 lisäystä ja 12 poistoa
  1. +1
    -1
      src/3rdparty/imgui
  2. +1
    -0
      src/3rdparty/lol-imgui.am
  3. +1
    -0
      src/Makefile.am
  4. +1
    -0
      src/lol-core.vcxproj
  5. +10
    -6
      src/lolimgui.cpp
  6. +5
    -5
      src/lolimgui.h

+ 1
- 1
src/3rdparty/imgui

@@ -1 +1 @@
Subproject commit 6742ac4587de26f9bec2a12cb0b2f33a4d84df94
Subproject commit 76e31bd51a4d045505a3f40d01cad734d7b2b4e0

+ 1
- 0
src/3rdparty/lol-imgui.am Näytä tiedosto

@@ -2,6 +2,7 @@
imgui_sources = \
imgui/imconfig.h \
imgui/imgui.cpp \
imgui/imgui_widgets.cpp \
imgui/imgui.h \
imgui/imgui_internal.h \
imgui/stb_rect_pack.h \


+ 1
- 0
src/Makefile.am Näytä tiedosto

@@ -155,6 +155,7 @@ imgui_sources = \
lolimgui.cpp lolimgui.h \
3rdparty/imgui/imgui_demo.cpp \
3rdparty/imgui/imgui_draw.cpp \
3rdparty/imgui/imgui_widgets.cpp \
$(NULL)

if LOL_USE_NACL


+ 1
- 0
src/lol-core.vcxproj Näytä tiedosto

@@ -78,6 +78,7 @@
<ItemGroup>
<ClCompile Include="3rdparty\imgui\imgui_demo.cpp" />
<ClCompile Include="3rdparty\imgui\imgui_draw.cpp" />
<ClCompile Include="3rdparty\imgui\imgui_widgets.cpp" />
<ClCompile Include="application\application.cpp" />
<ClCompile Include="audio\audio.cpp" />
<ClCompile Include="audio\sample.cpp" />


+ 10
- 6
src/lolimgui.cpp Näytä tiedosto

@@ -27,11 +27,11 @@ using namespace lol;
//Imgui extension ---------------------------------------------------------------------------------
namespace ImGui
{
IMGUI_API void SetNextWindowDockingAndSize(const ImVec2& size, ImGuiSetDock dock, const ImVec2& padding, ImGuiSetCond cond)
IMGUI_API void SetNextWindowDockingAndSize(const ImVec2& size, ImGuiSetDock dock, const ImVec2& padding, ImGuiCond cond)
{
SetNextWindowDockingAndSize(size, dock, ImVec4(vec2(padding).xyxy), cond);
}
IMGUI_API void SetNextWindowDockingAndSize(const ImVec2& size, ImGuiSetDock dock, const ImVec4& padding, ImGuiSetCond cond)
IMGUI_API void SetNextWindowDockingAndSize(const ImVec2& size, ImGuiSetDock dock, const ImVec4& padding, ImGuiCond cond)
{
vec4 pdg = padding;
vec2 vsz = vec2(Video::GetSize());
@@ -55,11 +55,11 @@ namespace ImGui
ImGui::SetNextWindowSize(size, cond);
}

IMGUI_API void SetNextWindowDocking(ImGuiSetDock dock, const ImVec2& padding, ImGuiSetCond cond)
IMGUI_API void SetNextWindowDocking(ImGuiSetDock dock, const ImVec2& padding, ImGuiCond cond)
{
SetNextWindowDocking(dock, ImVec4(vec2(padding).xyxy), cond);
}
IMGUI_API void SetNextWindowDocking(ImGuiSetDock dock, const ImVec4& padding, ImGuiSetCond cond)
IMGUI_API void SetNextWindowDocking(ImGuiSetDock dock, const ImVec4& padding, ImGuiCond cond)
{
vec2 vsz = vec2(Video::GetSize());
vec2 size = vec2();
@@ -95,6 +95,8 @@ namespace ImGui
//-----------------------------------------------------------------------------
LolImGui::LolImGui()
{
ImGui::CreateContext();

m_gamegroup = GAMEGROUP_IMGUI;
m_drawgroup = DRAWGROUP_IMGUI;

@@ -168,6 +170,8 @@ LolImGui::~LolImGui()

Shader::Destroy(m_shader);
delete m_vdecl;

ImGui::DestroyContext();
}

//-----------------------------------------------------------------------------
@@ -222,8 +226,6 @@ void LolImGui::Shutdown()
Ticker::Unref(g_lolimgui);
g_lolimgui = nullptr;
}

ImGui::Shutdown();
}

//-----------------------------------------------------------------------------
@@ -350,6 +352,7 @@ void LolImGui::TickDraw(float seconds, Scene &scene)

scene.AddPrimitiveRenderer(this, new PrimitiveLolImGui());
}

void PrimitiveLolImGui::Render(Scene& scene, PrimitiveSource* primitive)
{
UNUSED(scene, primitive);
@@ -357,6 +360,7 @@ void PrimitiveLolImGui::Render(Scene& scene, PrimitiveSource* primitive)
ImGuiIO& io = ImGui::GetIO();
if (io.Fonts->TexID)
ImGui::Render();
ImGui::EndFrame();
}

//// Data


+ 5
- 5
src/lolimgui.h Näytä tiedosto

@@ -36,7 +36,7 @@
#undef IM_VEC4_CLASS_EXTRA

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

enum ImGuiSetDock_
{
@@ -53,10 +53,10 @@ enum ImGuiSetDock_

namespace ImGui
{
IMGUI_API void SetNextWindowDockingAndSize(const ImVec2& size, ImGuiSetDock dock, const ImVec2& padding, ImGuiSetCond cond = 0);
IMGUI_API void SetNextWindowDockingAndSize(const ImVec2& size, ImGuiSetDock dock, const ImVec4& padding = ImVec4(0, 0, 0, 0), ImGuiSetCond cond = 0);
IMGUI_API void SetNextWindowDocking(ImGuiSetDock dock, const ImVec2& padding, ImGuiSetCond cond = 0);
IMGUI_API void SetNextWindowDocking(ImGuiSetDock dock, const ImVec4& padding = ImVec4(0, 0, 0, 0), ImGuiSetCond cond = 0);
IMGUI_API void SetNextWindowDockingAndSize(const ImVec2& size, ImGuiSetDock dock, const ImVec2& padding, ImGuiCond cond = 0);
IMGUI_API void SetNextWindowDockingAndSize(const ImVec2& size, ImGuiSetDock dock, const ImVec4& padding = ImVec4(0, 0, 0, 0), ImGuiCond cond = 0);
IMGUI_API void SetNextWindowDocking(ImGuiSetDock dock, const ImVec2& padding, ImGuiCond cond = 0);
IMGUI_API void SetNextWindowDocking(ImGuiSetDock dock, const ImVec4& padding = ImVec4(0, 0, 0, 0), ImGuiCond cond = 0);
IMGUI_API float GetMainMenuBarHeight();
}



Ladataan…
Peruuta
Tallenna