|
@@ -29,7 +29,8 @@
|
|
|
**********************************************************************************************/
|
|
|
#include "rlImGui.h"
|
|
|
|
|
|
-#include "imgui.h"
|
|
|
+#include "imgui_impl_raylib.h"
|
|
|
+
|
|
|
#include "raylib.h"
|
|
|
#include "rlgl.h"
|
|
|
|
|
@@ -44,8 +45,6 @@
|
|
|
#include "extras/FA6FreeSolidFontData.h"
|
|
|
#endif
|
|
|
|
|
|
-static Texture2D FontTexture;
|
|
|
-
|
|
|
static ImGuiMouseCursor CurrentMouseCursor = ImGuiMouseCursor_COUNT;
|
|
|
static MouseCursor MouseCursorMap[ImGuiMouseCursor_COUNT];
|
|
|
|
|
@@ -65,17 +64,41 @@ bool rlImGuiIsShiftDown() { return IsKeyDown(KEY_RIGHT_SHIFT) || IsKeyDown(KEY_L
|
|
|
bool rlImGuiIsAltDown() { return IsKeyDown(KEY_RIGHT_ALT) || IsKeyDown(KEY_LEFT_ALT); }
|
|
|
bool rlImGuiIsSuperDown() { return IsKeyDown(KEY_RIGHT_SUPER) || IsKeyDown(KEY_LEFT_SUPER); }
|
|
|
|
|
|
-static const char* rlImGuiGetClipText(void*)
|
|
|
+void ReloadFonts()
|
|
|
+{
|
|
|
+ ImGuiIO& io = ImGui::GetIO();
|
|
|
+ unsigned char* pixels = nullptr;
|
|
|
+
|
|
|
+ int width;
|
|
|
+ int height;
|
|
|
+ io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height, nullptr);
|
|
|
+ Image image = GenImageColor(width, height, BLANK);
|
|
|
+ memcpy(image.data, pixels, width * height * 4);
|
|
|
+
|
|
|
+ Texture2D* fontTexture = (Texture2D*)io.Fonts->TexID;
|
|
|
+ if (fontTexture && fontTexture->id != 0)
|
|
|
+ {
|
|
|
+ UnloadTexture(*fontTexture);
|
|
|
+ MemFree(fontTexture);
|
|
|
+ }
|
|
|
+
|
|
|
+ fontTexture = (Texture2D*)MemAlloc(sizeof(Texture2D));
|
|
|
+ *fontTexture = LoadTextureFromImage(image);
|
|
|
+ UnloadImage(image);
|
|
|
+ io.Fonts->TexID = fontTexture;
|
|
|
+}
|
|
|
+
|
|
|
+static const char* GetClipTextCallback(void*)
|
|
|
{
|
|
|
return GetClipboardText();
|
|
|
}
|
|
|
|
|
|
-static void rlImGuiSetClipText(void*, const char* text)
|
|
|
+static void SetClipTextCallback(void*, const char* text)
|
|
|
{
|
|
|
SetClipboardText(text);
|
|
|
}
|
|
|
|
|
|
-static void rlImGuiNewFrame(float deltaTime)
|
|
|
+static void ImGuiNewFrame(float deltaTime)
|
|
|
{
|
|
|
ImGuiIO& io = ImGui::GetIO();
|
|
|
|
|
@@ -149,63 +172,7 @@ static void rlImGuiNewFrame(float deltaTime)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-static void rlImGuiEvents()
|
|
|
-{
|
|
|
- ImGuiIO& io = ImGui::GetIO();
|
|
|
-
|
|
|
- bool focused = IsWindowFocused();
|
|
|
- if (focused != LastFrameFocused)
|
|
|
- io.AddFocusEvent(focused);
|
|
|
- LastFrameFocused = focused;
|
|
|
-
|
|
|
- // handle the modifyer key events so that shortcuts work
|
|
|
- bool ctrlDown = rlImGuiIsControlDown();
|
|
|
- if (ctrlDown != LastControlPressed)
|
|
|
- io.AddKeyEvent(ImGuiMod_Ctrl, ctrlDown);
|
|
|
- LastControlPressed = ctrlDown;
|
|
|
-
|
|
|
- bool shiftDown = rlImGuiIsShiftDown();
|
|
|
- if (shiftDown != LastShiftPressed)
|
|
|
- io.AddKeyEvent(ImGuiMod_Shift, shiftDown);
|
|
|
- LastShiftPressed = shiftDown;
|
|
|
-
|
|
|
- bool altDown = rlImGuiIsAltDown();
|
|
|
- if (altDown != LastAltPressed)
|
|
|
- io.AddKeyEvent(ImGuiMod_Alt, altDown);
|
|
|
- LastAltPressed = altDown;
|
|
|
-
|
|
|
- bool superDown = rlImGuiIsSuperDown();
|
|
|
- if (superDown != LastSuperPressed)
|
|
|
- io.AddKeyEvent(ImGuiMod_Super, superDown);
|
|
|
- LastSuperPressed = superDown;
|
|
|
-
|
|
|
- // get the pressed keys, they are in event order
|
|
|
- int keyId = GetKeyPressed();
|
|
|
- while (keyId != 0)
|
|
|
- {
|
|
|
- auto keyItr = RaylibKeyMap.find(KeyboardKey(keyId));
|
|
|
- if (keyItr != RaylibKeyMap.end())
|
|
|
- io.AddKeyEvent(keyItr->second, true);
|
|
|
- keyId = GetKeyPressed();
|
|
|
- }
|
|
|
-
|
|
|
- // look for any keys that were down last frame and see if they were down and are released
|
|
|
- for (const auto keyItr : RaylibKeyMap)
|
|
|
- {
|
|
|
- if (IsKeyReleased(keyItr.first))
|
|
|
- io.AddKeyEvent(keyItr.second, false);
|
|
|
- }
|
|
|
-
|
|
|
- // add the text input in order
|
|
|
- unsigned int pressed = GetCharPressed();
|
|
|
- while (pressed != 0)
|
|
|
- {
|
|
|
- io.AddInputCharacter(pressed);
|
|
|
- pressed = GetCharPressed();
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-static void rlImGuiTriangleVert(ImDrawVert& idx_vert)
|
|
|
+static void ImGuiTriangleVert(ImDrawVert& idx_vert)
|
|
|
{
|
|
|
Color* c;
|
|
|
c = (Color*)&idx_vert.col;
|
|
@@ -214,7 +181,7 @@ static void rlImGuiTriangleVert(ImDrawVert& idx_vert)
|
|
|
rlVertex2f(idx_vert.pos.x, idx_vert.pos.y);
|
|
|
}
|
|
|
|
|
|
-static void rlImGuiRenderTriangles(unsigned int count, int indexStart, const ImVector<ImDrawIdx>& indexBuffer, const ImVector<ImDrawVert>& vertBuffer, void* texturePtr)
|
|
|
+static void ImGuiRenderTriangles(unsigned int count, int indexStart, const ImVector<ImDrawIdx>& indexBuffer, const ImVector<ImDrawVert>& vertBuffer, void* texturePtr)
|
|
|
{
|
|
|
if (count < 3)
|
|
|
return;
|
|
@@ -242,9 +209,9 @@ static void rlImGuiRenderTriangles(unsigned int count, int indexStart, const ImV
|
|
|
ImDrawVert vertexB = vertBuffer[indexB];
|
|
|
ImDrawVert vertexC = vertBuffer[indexC];
|
|
|
|
|
|
- rlImGuiTriangleVert(vertexA);
|
|
|
- rlImGuiTriangleVert(vertexB);
|
|
|
- rlImGuiTriangleVert(vertexC);
|
|
|
+ ImGuiTriangleVert(vertexA);
|
|
|
+ ImGuiTriangleVert(vertexB);
|
|
|
+ ImGuiTriangleVert(vertexC);
|
|
|
}
|
|
|
rlEnd();
|
|
|
}
|
|
@@ -259,36 +226,7 @@ static void EnableScissor(float x, float y, float width, float height)
|
|
|
(int)(height * io.DisplayFramebufferScale.y));
|
|
|
}
|
|
|
|
|
|
-static void rlRenderData(ImDrawData* data)
|
|
|
-{
|
|
|
- rlDrawRenderBatchActive();
|
|
|
- rlDisableBackfaceCulling();
|
|
|
-
|
|
|
- for (int l = 0; l < data->CmdListsCount; ++l)
|
|
|
- {
|
|
|
- const ImDrawList* commandList = data->CmdLists[l];
|
|
|
-
|
|
|
- for (const auto& cmd : commandList->CmdBuffer)
|
|
|
- {
|
|
|
- EnableScissor(cmd.ClipRect.x - data->DisplayPos.x, cmd.ClipRect.y - data->DisplayPos.y, cmd.ClipRect.z - (cmd.ClipRect.x - data->DisplayPos.x), cmd.ClipRect.w - (cmd.ClipRect.y - data->DisplayPos.y));
|
|
|
- if (cmd.UserCallback != nullptr)
|
|
|
- {
|
|
|
- cmd.UserCallback(commandList, &cmd);
|
|
|
-
|
|
|
- continue;
|
|
|
- }
|
|
|
-
|
|
|
- rlImGuiRenderTriangles(cmd.ElemCount, cmd.IdxOffset, commandList->IdxBuffer, commandList->VtxBuffer, cmd.TextureId);
|
|
|
- rlDrawRenderBatchActive();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- rlSetTexture(0);
|
|
|
- rlDisableScissorTest();
|
|
|
- rlEnableBackfaceCulling();
|
|
|
-}
|
|
|
-
|
|
|
-void SetupMouseCursors()
|
|
|
+static void SetupMouseCursors()
|
|
|
{
|
|
|
MouseCursorMap[ImGuiMouseCursor_Arrow] = MOUSE_CURSOR_ARROW;
|
|
|
MouseCursorMap[ImGuiMouseCursor_TextInput] = MOUSE_CURSOR_IBEAM;
|
|
@@ -301,28 +239,53 @@ void SetupMouseCursors()
|
|
|
MouseCursorMap[ImGuiMouseCursor_NotAllowed] = MOUSE_CURSOR_NOT_ALLOWED;
|
|
|
}
|
|
|
|
|
|
-void rlImGuiEndInitImGui()
|
|
|
+void SetupFontAwesome()
|
|
|
{
|
|
|
- ImGui::SetCurrentContext(GlobalContext);
|
|
|
+#ifndef NO_FONT_AWESOME
|
|
|
+ static const ImWchar icons_ranges[] = { ICON_MIN_FA, ICON_MAX_FA, 0 };
|
|
|
+ ImFontConfig icons_config;
|
|
|
+ icons_config.MergeMode = true;
|
|
|
+ icons_config.PixelSnapH = true;
|
|
|
+ icons_config.FontDataOwnedByAtlas = false;
|
|
|
|
|
|
- SetupMouseCursors();
|
|
|
+ icons_config.GlyphRanges = icons_ranges;
|
|
|
|
|
|
ImGuiIO& io = ImGui::GetIO();
|
|
|
- io.BackendPlatformName = "imgui_impl_raylib";
|
|
|
|
|
|
- io.BackendFlags |= ImGuiBackendFlags_HasMouseCursors;
|
|
|
+ io.Fonts->AddFontFromMemoryCompressedTTF((void*)fa_solid_900_compressed_data, fa_solid_900_compressed_size, FONT_AWESOME_ICON_SIZE, &icons_config, icons_ranges);
|
|
|
+#endif
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+void SetupBackend()
|
|
|
+{
|
|
|
+ ImGuiIO& io = ImGui::GetIO();
|
|
|
+ io.BackendPlatformName = "imgui_impl_raylib";
|
|
|
|
|
|
- io.MousePos = ImVec2(0, 0);
|
|
|
+ io.BackendFlags |= ImGuiBackendFlags_HasMouseCursors;
|
|
|
|
|
|
- io.SetClipboardTextFn = rlImGuiSetClipText;
|
|
|
- io.GetClipboardTextFn = rlImGuiGetClipText;
|
|
|
+ io.MousePos = ImVec2(0, 0);
|
|
|
|
|
|
- io.ClipboardUserData = nullptr;
|
|
|
+ io.SetClipboardTextFn = SetClipTextCallback;
|
|
|
+ io.GetClipboardTextFn = GetClipTextCallback;
|
|
|
|
|
|
- rlImGuiReloadFonts();
|
|
|
+ io.ClipboardUserData = nullptr;
|
|
|
}
|
|
|
|
|
|
-void rlSetupKeymap()
|
|
|
+void rlImGuiEndInitImGui()
|
|
|
+{
|
|
|
+ ImGui::SetCurrentContext(GlobalContext);
|
|
|
+
|
|
|
+ SetupFontAwesome();
|
|
|
+
|
|
|
+ SetupMouseCursors();
|
|
|
+
|
|
|
+ SetupBackend();
|
|
|
+
|
|
|
+ ReloadFonts();
|
|
|
+}
|
|
|
+
|
|
|
+static void SetupKeymap()
|
|
|
{
|
|
|
if (!RaylibKeyMap.empty())
|
|
|
return;
|
|
@@ -435,20 +398,28 @@ void rlSetupKeymap()
|
|
|
RaylibKeyMap[KEY_KP_EQUAL] = ImGuiKey_KeypadEqual;
|
|
|
}
|
|
|
|
|
|
+static void SetupGlobals()
|
|
|
+{
|
|
|
+ LastFrameFocused = IsWindowFocused();
|
|
|
+ LastControlPressed = false;
|
|
|
+ LastShiftPressed = false;
|
|
|
+ LastAltPressed = false;
|
|
|
+ LastSuperPressed = false;
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
void rlImGuiBeginInitImGui()
|
|
|
{
|
|
|
+ SetupGlobals();
|
|
|
GlobalContext = ImGui::CreateContext(nullptr);
|
|
|
- rlSetupKeymap();
|
|
|
+ SetupKeymap();
|
|
|
+
|
|
|
+ ImGuiIO& io = ImGui::GetIO();
|
|
|
+ io.Fonts->AddFontDefault();
|
|
|
}
|
|
|
|
|
|
void rlImGuiSetup(bool dark)
|
|
|
{
|
|
|
- LastFrameFocused = IsWindowFocused();
|
|
|
- LastControlPressed = false;
|
|
|
- LastShiftPressed = false;
|
|
|
- LastAltPressed = false;
|
|
|
- LastSuperPressed = false;
|
|
|
-
|
|
|
rlImGuiBeginInitImGui();
|
|
|
|
|
|
if (dark)
|
|
@@ -456,20 +427,6 @@ void rlImGuiSetup(bool dark)
|
|
|
else
|
|
|
ImGui::StyleColorsLight();
|
|
|
|
|
|
- ImGuiIO& io = ImGui::GetIO();
|
|
|
- io.Fonts->AddFontDefault();
|
|
|
-
|
|
|
-#ifndef NO_FONT_AWESOME
|
|
|
- static const ImWchar icons_ranges[] = { ICON_MIN_FA, ICON_MAX_FA, 0 };
|
|
|
- ImFontConfig icons_config;
|
|
|
- icons_config.MergeMode = true;
|
|
|
- icons_config.PixelSnapH = true;
|
|
|
- icons_config.FontDataOwnedByAtlas = false;
|
|
|
-
|
|
|
- icons_config.GlyphRanges = icons_ranges;
|
|
|
- io.Fonts->AddFontFromMemoryCompressedTTF((void*)fa_solid_900_compressed_data, fa_solid_900_compressed_size, FONT_AWESOME_ICON_SIZE, &icons_config, icons_ranges);
|
|
|
-#endif
|
|
|
-
|
|
|
rlImGuiEndInitImGui();
|
|
|
}
|
|
|
|
|
@@ -477,33 +434,20 @@ void rlImGuiReloadFonts()
|
|
|
{
|
|
|
ImGui::SetCurrentContext(GlobalContext);
|
|
|
|
|
|
- ImGuiIO& io = ImGui::GetIO();
|
|
|
- unsigned char* pixels = nullptr;
|
|
|
-
|
|
|
- int width;
|
|
|
- int height;
|
|
|
- io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height, nullptr);
|
|
|
- Image image = GenImageColor(width, height, BLANK);
|
|
|
- memcpy(image.data, pixels, width * height * 4);
|
|
|
-
|
|
|
- if (FontTexture.id != 0)
|
|
|
- UnloadTexture(FontTexture);
|
|
|
-
|
|
|
- FontTexture = LoadTextureFromImage(image);
|
|
|
- UnloadImage(image);
|
|
|
- io.Fonts->TexID = &FontTexture;
|
|
|
+ ReloadFonts();
|
|
|
}
|
|
|
|
|
|
void rlImGuiBegin()
|
|
|
{
|
|
|
+ ImGui::SetCurrentContext(GlobalContext);
|
|
|
rlImGuiBeginDelta(GetFrameTime());
|
|
|
}
|
|
|
|
|
|
void rlImGuiBeginDelta(float deltaTime)
|
|
|
{
|
|
|
ImGui::SetCurrentContext(GlobalContext);
|
|
|
- rlImGuiNewFrame(deltaTime);
|
|
|
- rlImGuiEvents();
|
|
|
+ ImGuiNewFrame(deltaTime);
|
|
|
+ ImGui_ImplRaylib_ProcessEvents();
|
|
|
ImGui::NewFrame();
|
|
|
}
|
|
|
|
|
@@ -511,14 +455,14 @@ void rlImGuiEnd()
|
|
|
{
|
|
|
ImGui::SetCurrentContext(GlobalContext);
|
|
|
ImGui::Render();
|
|
|
- rlRenderData(ImGui::GetDrawData());
|
|
|
+ ImGui_ImplRaylib_RenderDrawData(ImGui::GetDrawData());
|
|
|
}
|
|
|
|
|
|
void rlImGuiShutdown()
|
|
|
{
|
|
|
- UnloadTexture(FontTexture);
|
|
|
+ ImGui::SetCurrentContext(GlobalContext);
|
|
|
+ ImGui_ImplRaylib_Shutdown();
|
|
|
|
|
|
- ImGui::SetCurrentContext(GlobalContext);
|
|
|
ImGui::DestroyContext();
|
|
|
}
|
|
|
|
|
@@ -630,3 +574,127 @@ void rlImGuiImageRenderTextureFit(const RenderTexture* image, bool center)
|
|
|
|
|
|
rlImGuiImageRect(&image->texture, sizeX, sizeY, Rectangle{ 0,0, float(image->texture.width), -float(image->texture.height) });
|
|
|
}
|
|
|
+
|
|
|
+// raw ImGui backend API
|
|
|
+bool ImGui_ImplRaylib_Init()
|
|
|
+{
|
|
|
+ SetupGlobals();
|
|
|
+
|
|
|
+ SetupKeymap();
|
|
|
+
|
|
|
+ ImGuiIO& io = ImGui::GetIO();
|
|
|
+ io.Fonts->AddFontDefault();
|
|
|
+
|
|
|
+ SetupFontAwesome();
|
|
|
+
|
|
|
+ SetupMouseCursors();
|
|
|
+
|
|
|
+ SetupBackend();
|
|
|
+
|
|
|
+ ReloadFonts();
|
|
|
+
|
|
|
+ return true;
|
|
|
+}
|
|
|
+
|
|
|
+void ImGui_ImplRaylib_Shutdown()
|
|
|
+{
|
|
|
+ ImGuiIO& io =ImGui::GetIO();
|
|
|
+ Texture2D* fontTexture = (Texture2D*)io.Fonts->TexID;
|
|
|
+
|
|
|
+ if (fontTexture && fontTexture->id != 0)
|
|
|
+ UnloadTexture(*fontTexture);
|
|
|
+
|
|
|
+ io.Fonts->TexID = 0;
|
|
|
+}
|
|
|
+
|
|
|
+void ImGui_ImplRaylib_NewFrame()
|
|
|
+{
|
|
|
+ ImGuiNewFrame(GetFrameTime());
|
|
|
+}
|
|
|
+
|
|
|
+void ImGui_ImplRaylib_RenderDrawData(ImDrawData* draw_data)
|
|
|
+{
|
|
|
+ rlDrawRenderBatchActive();
|
|
|
+ rlDisableBackfaceCulling();
|
|
|
+
|
|
|
+ for (int l = 0; l < draw_data->CmdListsCount; ++l)
|
|
|
+ {
|
|
|
+ const ImDrawList* commandList = draw_data->CmdLists[l];
|
|
|
+
|
|
|
+ for (const auto& cmd : commandList->CmdBuffer)
|
|
|
+ {
|
|
|
+ EnableScissor(cmd.ClipRect.x - draw_data->DisplayPos.x, cmd.ClipRect.y - draw_data->DisplayPos.y, cmd.ClipRect.z - (cmd.ClipRect.x - draw_data->DisplayPos.x), cmd.ClipRect.w - (cmd.ClipRect.y - draw_data->DisplayPos.y));
|
|
|
+ if (cmd.UserCallback != nullptr)
|
|
|
+ {
|
|
|
+ cmd.UserCallback(commandList, &cmd);
|
|
|
+
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ ImGuiRenderTriangles(cmd.ElemCount, cmd.IdxOffset, commandList->IdxBuffer, commandList->VtxBuffer, cmd.TextureId);
|
|
|
+ rlDrawRenderBatchActive();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ rlSetTexture(0);
|
|
|
+ rlDisableScissorTest();
|
|
|
+ rlEnableBackfaceCulling();
|
|
|
+}
|
|
|
+
|
|
|
+bool ImGui_ImplRaylib_ProcessEvents()
|
|
|
+{
|
|
|
+ ImGuiIO& io = ImGui::GetIO();
|
|
|
+
|
|
|
+ bool focused = IsWindowFocused();
|
|
|
+ if (focused != LastFrameFocused)
|
|
|
+ io.AddFocusEvent(focused);
|
|
|
+ LastFrameFocused = focused;
|
|
|
+
|
|
|
+ // handle the modifyer key events so that shortcuts work
|
|
|
+ bool ctrlDown = rlImGuiIsControlDown();
|
|
|
+ if (ctrlDown != LastControlPressed)
|
|
|
+ io.AddKeyEvent(ImGuiMod_Ctrl, ctrlDown);
|
|
|
+ LastControlPressed = ctrlDown;
|
|
|
+
|
|
|
+ bool shiftDown = rlImGuiIsShiftDown();
|
|
|
+ if (shiftDown != LastShiftPressed)
|
|
|
+ io.AddKeyEvent(ImGuiMod_Shift, shiftDown);
|
|
|
+ LastShiftPressed = shiftDown;
|
|
|
+
|
|
|
+ bool altDown = rlImGuiIsAltDown();
|
|
|
+ if (altDown != LastAltPressed)
|
|
|
+ io.AddKeyEvent(ImGuiMod_Alt, altDown);
|
|
|
+ LastAltPressed = altDown;
|
|
|
+
|
|
|
+ bool superDown = rlImGuiIsSuperDown();
|
|
|
+ if (superDown != LastSuperPressed)
|
|
|
+ io.AddKeyEvent(ImGuiMod_Super, superDown);
|
|
|
+ LastSuperPressed = superDown;
|
|
|
+
|
|
|
+ // get the pressed keys, they are in event order
|
|
|
+ int keyId = GetKeyPressed();
|
|
|
+ while (keyId != 0)
|
|
|
+ {
|
|
|
+ auto keyItr = RaylibKeyMap.find(KeyboardKey(keyId));
|
|
|
+ if (keyItr != RaylibKeyMap.end())
|
|
|
+ io.AddKeyEvent(keyItr->second, true);
|
|
|
+ keyId = GetKeyPressed();
|
|
|
+ }
|
|
|
+
|
|
|
+ // look for any keys that were down last frame and see if they were down and are released
|
|
|
+ for (const auto keyItr : RaylibKeyMap)
|
|
|
+ {
|
|
|
+ if (IsKeyReleased(keyItr.first))
|
|
|
+ io.AddKeyEvent(keyItr.second, false);
|
|
|
+ }
|
|
|
+
|
|
|
+ // add the text input in order
|
|
|
+ unsigned int pressed = GetCharPressed();
|
|
|
+ while (pressed != 0)
|
|
|
+ {
|
|
|
+ io.AddInputCharacter(pressed);
|
|
|
+ pressed = GetCharPressed();
|
|
|
+ }
|
|
|
+
|
|
|
+ return true;
|
|
|
+}
|