SpiecsEngine
 
Loading...
Searching...
No Matches

◆ OnRender()

void Spices::ImguiOperation::OnRender ( )
overridevirtual

This interface is called On SlateRenderer Render.

Begin render ContentBrowser.

End render ContentBrowser.

Begin render ContentBrowser.

End render ContentBrowser.

Implements Spices::ImguiSlate.

Definition at line 12 of file ImguiOperation.cpp.

13 {
15
19 Begin(m_PanelName, 0.5f, ImGuiWindowFlags_NoTitleBar);
20
21 const ImVec2 buttonSize = ImVec2(ImGui::GetContentRegionAvail().x, ImGui::GetContentRegionAvail().x);
22 const float fontSize = ImGui::GetContentRegionAvail().x / ImGuiH::GetLineItemSize().x;
23
24 {
25 SPICES_PROFILE_ZONEN("ImguiOperation Separator");
26
27 ImGui::Spacing();
28 ImGui::Spacing();
29 ImGui::Spacing();
30 ImGui::SetWindowFontScale(0.2f);
31 ImGui::PushStyleColor(ImGuiCol_Separator, ImVec4(0.19f, 0.19f, 0.19f, 1.0f));
32 ImGui::PushStyleVar(ImGuiStyleVar_SeparatorTextBorderSize, 2.0f);
33 ImGui::SeparatorText("##");
34 ImGui::SeparatorText("##");
35 ImGui::SeparatorText("##");
36 ImGui::SetWindowFontScale(1.0f);
37 ImGui::PopStyleVar();
38 ImGui::PopStyleColor();
39 ImGui::Spacing();
40 ImGui::Spacing();
41 ImGui::Spacing();
42 }
43
44 {
45 SPICES_PROFILE_ZONEN("ImguiOperation Icon");
46
47 ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(2.0f, 4.0f));
48 ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.567f, 0.629f, 0.641f, 1.0f));
49 ImGui::SetWindowFontScale(fontSize);
50
51
52 ImGui::Button(ICON_MD_VIEW_IN_AR, buttonSize);
53 ImGui::SetItemTooltip("All Model Kinds(T)");
54 ImGui::Button(ICON_EMPTY, buttonSize);
55 ImGui::SetItemTooltip("Select(Q)");
56 ImGui::Button(ICON_MD_OPEN_WITH, buttonSize);
57 ImGui::SetItemTooltip("Move(W)");
58 ImGui::Button(ICON_MD_FLIP_CAMERA_ANDROID, buttonSize);
59 ImGui::SetItemTooltip("Rotate(E)");
60 ImGui::Button(ICON_MD_ZOOM_OUT_MAP, buttonSize);
61 ImGui::SetItemTooltip("Scale(R)");
62 ImGui::Separator();
63 ImGui::Button(ICON_EMPTY, buttonSize);
64 ImGui::SetItemTooltip("Snap(S)");
65 ImGui::Separator();
66 ImGui::Button(ICON_MD_PLAY_ARROW, buttonSize);
67 ImGui::SetItemTooltip("Play(Space)");
68 ImGui::Button(ICON_MD_PAUSE, buttonSize);
69 ImGui::SetItemTooltip("Pause(Space)");
70 ImGui::Button(ICON_MD_STOP, buttonSize);
71 ImGui::SetItemTooltip("Stop");
72 ImGui::Separator();
73 ImGui::Button(ICON_MD_BRUSH, buttonSize);
74 ImGui::SetItemTooltip("Paint CTRL + B");
75 ImGui::Button(ICON_EMPTY, buttonSize);
76 ImGui::SetItemTooltip("Zero Gravity(X)");
77
78 ImGui::SetWindowFontScale(1.0f);
79 ImGui::PopStyleColor();
80 ImGui::PopStyleVar();
81 }
85 End();
86 }
#define ICON_EMPTY
Definition ImguiHelper.h:26
#define SPICES_PROFILE_ZONEN(...)
#define SPICES_PROFILE_ZONE
static ImVec2 GetLineItemSize()
Get Line Width's Square Size.
void Begin(float alpha=1.0f, ImGuiWindowFlags flags=0)
Begin a common slate.
void End()
End a slate.
std::string m_PanelName
This slate's name.
Definition ImguiUtils.h:161

References Spices::ImguiSlate::End().