mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-15 20:08:54 +03:00
Merge branch 'main' of https://github.com/antopilo/Nuake
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
#include "src/Rendering/SceneRenderer.h"
|
||||
#include <dependencies/glfw/include/GLFW/glfw3.h>
|
||||
#include <src/Rendering/Buffers/Framebuffer.h>
|
||||
#include "UIDemoWindow.h"
|
||||
|
||||
namespace Nuake {
|
||||
Ref<UI::UserInterface> userInterface;
|
||||
@@ -1544,6 +1545,7 @@ namespace Nuake {
|
||||
|
||||
bool isLoadingProject = false;
|
||||
bool isLoadingProjectQueue = false;
|
||||
UIDemoWindow m_DemoWindow;
|
||||
|
||||
int frameCount = 2;
|
||||
void EditorInterface::Draw()
|
||||
@@ -1610,6 +1612,8 @@ namespace Nuake {
|
||||
|
||||
pInterface.m_CurrentProject = Engine::GetProject();
|
||||
|
||||
m_DemoWindow.Draw();
|
||||
|
||||
_audioWindow->Draw();
|
||||
|
||||
DrawMenuBar();
|
||||
|
||||
@@ -62,9 +62,9 @@ namespace Nuake
|
||||
void FileSystemUI::DrawDirectory(Ref<Directory> directory, uint32_t drawId)
|
||||
{
|
||||
ImGui::PushFont(FontManager::GetFont(Icons));
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 4.0f);
|
||||
const char* icon = ICON_FA_FOLDER;
|
||||
const std::string id = ICON_FA_FOLDER + std::string("##") + directory->name;
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 4.0f);
|
||||
if (ImGui::Button(id.c_str(), ImVec2(100, 100)))
|
||||
{
|
||||
m_CurrentDirectory = directory;
|
||||
|
||||
20
Editor/src/Windows/UIDemoWindow.cpp
Normal file
20
Editor/src/Windows/UIDemoWindow.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "UIDemoWindow.h"
|
||||
|
||||
#include "src/UI/ImUI.h"
|
||||
|
||||
float floatSlider = 0.6f;
|
||||
bool checkbox = false;
|
||||
|
||||
void UIDemoWindow::Draw()
|
||||
{
|
||||
using namespace Nuake;
|
||||
|
||||
UI::BeginWindow("UI Demo");
|
||||
{
|
||||
UI::PrimaryButton("Primary Button");
|
||||
UI::SecondaryButton("Secondary Button");
|
||||
UI::FloatSlider("Float slider", floatSlider);
|
||||
UI::CheckBox("Checkbox", checkbox);
|
||||
}
|
||||
UI::EndWindow();
|
||||
}
|
||||
13
Editor/src/Windows/UIDemoWindow.h
Normal file
13
Editor/src/Windows/UIDemoWindow.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
class UIDemoWindow
|
||||
{
|
||||
public:
|
||||
UIDemoWindow() = default;
|
||||
~UIDemoWindow() = default;
|
||||
|
||||
void Draw();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user