mirror of
https://github.com/Drezil/dear-imgui.hs.git
synced 2025-07-05 04:28:48 +02:00
Compare commits
5 Commits
b48ef7904b
...
myStuff
Author | SHA1 | Date | |
---|---|---|---|
acc4ff0788 | |||
7828ddb111 | |||
3b37a21470 | |||
391d70dd94 | |||
0f11aeaddb |
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,3 +1,4 @@
|
|||||||
[submodule "imgui"]
|
[submodule "imgui"]
|
||||||
path = imgui
|
path = imgui
|
||||||
url = https://github.com/ocornut/imgui
|
url = https://github.com/Drezil/imgui
|
||||||
|
branch = textAlign
|
||||||
|
@ -13,11 +13,10 @@ description:
|
|||||||
Set package flags according to your needs.
|
Set package flags according to your needs.
|
||||||
|
|
||||||
build-type: Simple
|
build-type: Simple
|
||||||
extra-source-files:
|
|
||||||
README.md,
|
|
||||||
ChangeLog.md
|
|
||||||
|
|
||||||
extra-source-files:
|
extra-source-files:
|
||||||
|
README.md,
|
||||||
|
ChangeLog.md,
|
||||||
imgui/*.h,
|
imgui/*.h,
|
||||||
imgui/backends/*.h,
|
imgui/backends/*.h,
|
||||||
imgui/backends/*.mm,
|
imgui/backends/*.mm,
|
||||||
@ -157,6 +156,7 @@ library
|
|||||||
import: common
|
import: common
|
||||||
hs-source-dirs:
|
hs-source-dirs:
|
||||||
src
|
src
|
||||||
|
generator
|
||||||
exposed-modules:
|
exposed-modules:
|
||||||
DearImGui
|
DearImGui
|
||||||
DearImGui.FontAtlas
|
DearImGui.FontAtlas
|
||||||
@ -172,6 +172,13 @@ library
|
|||||||
other-modules:
|
other-modules:
|
||||||
DearImGui.Enums
|
DearImGui.Enums
|
||||||
DearImGui.Structs
|
DearImGui.Structs
|
||||||
|
DearImGui.Generator
|
||||||
|
DearImGui.Generator.Parser
|
||||||
|
DearImGui.Generator.Tokeniser
|
||||||
|
DearImGui.Generator.Types
|
||||||
|
ghc-options:
|
||||||
|
-static -dynamic-too
|
||||||
|
-- create both libHSdear-imgui... .a and .so
|
||||||
cxx-options: -std=c++11
|
cxx-options: -std=c++11
|
||||||
cxx-sources:
|
cxx-sources:
|
||||||
imgui/imgui.cpp
|
imgui/imgui.cpp
|
||||||
@ -179,6 +186,12 @@ library
|
|||||||
imgui/imgui_draw.cpp
|
imgui/imgui_draw.cpp
|
||||||
imgui/imgui_tables.cpp
|
imgui/imgui_tables.cpp
|
||||||
imgui/imgui_widgets.cpp
|
imgui/imgui_widgets.cpp
|
||||||
|
install-includes:
|
||||||
|
imgui.h
|
||||||
|
imgui_internal.h
|
||||||
|
imstb_rectpack.h
|
||||||
|
imstb_textedit.h
|
||||||
|
imstb_truetype.h
|
||||||
if impl(ghc >= 9.4)
|
if impl(ghc >= 9.4)
|
||||||
build-depends: system-cxx-std-lib
|
build-depends: system-cxx-std-lib
|
||||||
else
|
else
|
||||||
@ -186,15 +199,38 @@ library
|
|||||||
include-dirs:
|
include-dirs:
|
||||||
imgui
|
imgui
|
||||||
build-depends:
|
build-depends:
|
||||||
dear-imgui-generator
|
containers
|
||||||
, containers
|
|
||||||
, managed
|
, managed
|
||||||
, inline-c
|
, inline-c
|
||||||
, inline-c-cpp
|
, inline-c-cpp
|
||||||
, StateVar
|
, StateVar
|
||||||
, unliftio
|
, unliftio
|
||||||
, vector
|
, vector
|
||||||
|
-- for the generator:
|
||||||
|
, template-haskell
|
||||||
|
>= 2.15 && < 2.19
|
||||||
|
, containers
|
||||||
|
^>= 0.6.2.1
|
||||||
|
, directory
|
||||||
|
>= 1.3 && < 1.4
|
||||||
|
, filepath
|
||||||
|
>= 1.4 && < 1.5
|
||||||
|
, inline-c
|
||||||
|
>= 0.9.0.0 && < 0.10
|
||||||
|
, megaparsec
|
||||||
|
>= 9.0 && < 9.3
|
||||||
|
, parser-combinators
|
||||||
|
>= 1.2.0 && < 1.4
|
||||||
|
, scientific
|
||||||
|
>= 0.3.6.2 && < 0.3.8
|
||||||
, text
|
, text
|
||||||
|
>= 1.2.4 && < 2.1
|
||||||
|
, th-lift
|
||||||
|
>= 0.7 && < 0.9
|
||||||
|
, transformers
|
||||||
|
>= 0.5.6 && < 0.6
|
||||||
|
, unordered-containers
|
||||||
|
>= 0.2.11 && < 0.3
|
||||||
|
|
||||||
if os(darwin)
|
if os(darwin)
|
||||||
ghc-options:
|
ghc-options:
|
||||||
@ -298,40 +334,6 @@ library
|
|||||||
exposed-modules:
|
exposed-modules:
|
||||||
DearImGui.GLFW.Vulkan
|
DearImGui.GLFW.Vulkan
|
||||||
|
|
||||||
library dear-imgui-generator
|
|
||||||
import: common
|
|
||||||
hs-source-dirs: generator
|
|
||||||
exposed-modules:
|
|
||||||
DearImGui.Generator
|
|
||||||
, DearImGui.Generator.Parser
|
|
||||||
, DearImGui.Generator.Tokeniser
|
|
||||||
, DearImGui.Generator.Types
|
|
||||||
build-depends:
|
|
||||||
template-haskell
|
|
||||||
>= 2.15 && < 2.21
|
|
||||||
, containers
|
|
||||||
^>= 0.6.2.1
|
|
||||||
, directory
|
|
||||||
>= 1.3 && < 1.4
|
|
||||||
, filepath
|
|
||||||
>= 1.4 && < 1.5
|
|
||||||
, inline-c
|
|
||||||
>= 0.9.0.0 && < 0.10
|
|
||||||
, megaparsec
|
|
||||||
>= 9.0 && < 9.4
|
|
||||||
, parser-combinators
|
|
||||||
>= 1.2.0 && < 1.4
|
|
||||||
, scientific
|
|
||||||
>= 0.3.6.2 && < 0.3.8
|
|
||||||
, text
|
|
||||||
>= 1.2.4 && < 2.1
|
|
||||||
, th-lift
|
|
||||||
>= 0.7 && < 0.9
|
|
||||||
, transformers
|
|
||||||
>= 0.5.6 && < 0.7
|
|
||||||
, unordered-containers
|
|
||||||
>= 0.2.11 && < 0.3
|
|
||||||
|
|
||||||
executable test
|
executable test
|
||||||
import: common, exe-flags
|
import: common, exe-flags
|
||||||
main-is: Main.hs
|
main-is: Main.hs
|
||||||
@ -346,7 +348,7 @@ executable glfw
|
|||||||
main-is: Main.hs
|
main-is: Main.hs
|
||||||
hs-source-dirs: examples/glfw
|
hs-source-dirs: examples/glfw
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
if (!flag(examples) || !flag(glfw) || !flag(opengl2))
|
if (!flag(examples) || !flag(glfw) || !(flag(opengl3) || flag(opengl2)))
|
||||||
buildable: False
|
buildable: False
|
||||||
else
|
else
|
||||||
build-depends: base, GLFW-b, gl, dear-imgui, managed, text
|
build-depends: base, GLFW-b, gl, dear-imgui, managed, text
|
||||||
|
2
imgui
2
imgui
Submodule imgui updated: c6e0284ac5...bbed1c4bbb
@ -412,8 +412,8 @@ addText_ (DrawList drawList) pos col text_begin text_end = liftIO do
|
|||||||
}
|
}
|
||||||
|]
|
|]
|
||||||
|
|
||||||
addText :: MonadIO m => DrawList -> Ptr ImFont -> CFloat -> Ptr ImVec2 -> ImU32 -> CString -> CString -> CFloat -> Ptr ImVec4 -> m ()
|
addText :: MonadIO m => DrawList -> Ptr ImFont -> CFloat -> Ptr ImVec2 -> ImU32 -> CString -> CString -> CFloat -> CFloat -> Ptr ImVec4 -> m ()
|
||||||
addText (DrawList drawList) fontPtr font_size pos col text_begin text_end wrap_width cpu_fine_clip_rect = liftIO do
|
addText (DrawList drawList) fontPtr font_size pos col text_begin text_end wrap_width text_align cpu_fine_clip_rect = liftIO do
|
||||||
[C.block|
|
[C.block|
|
||||||
void {
|
void {
|
||||||
$(ImDrawList* drawList)->AddText(
|
$(ImDrawList* drawList)->AddText(
|
||||||
@ -424,6 +424,7 @@ addText (DrawList drawList) fontPtr font_size pos col text_begin text_end wrap_w
|
|||||||
$(char* text_begin),
|
$(char* text_begin),
|
||||||
$(char* text_end),
|
$(char* text_end),
|
||||||
$(float wrap_width),
|
$(float wrap_width),
|
||||||
|
$(float text_align),
|
||||||
$(ImVec4* cpu_fine_clip_rect)
|
$(ImVec4* cpu_fine_clip_rect)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user