format documents

This commit is contained in:
2026-09-05 17:04:28 +02:00
parent 85f50df154
commit 8c1063640c
13 changed files with 68 additions and 74 deletions
+1 -1
View File
@@ -23,9 +23,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.
*/ */
#include <functional>
#include <pd/ui7/container/container.hpp> #include <pd/ui7/container/container.hpp>
#include <pd/ui7/io.hpp> #include <pd/ui7/io.hpp>
#include <functional>
namespace PD { namespace PD {
namespace UI7 { namespace UI7 {
+1 -1
View File
@@ -82,7 +82,7 @@ class PD_API Menu {
Container* r = pLayout.FindObject(id); Container* r = pLayout.FindObject(id);
if (!r) { if (!r) {
r = new UI7::DragData<T>(label, data, num_elms, pIO, min, max, step, r = new UI7::DragData<T>(label, data, num_elms, pIO, min, max, step,
precision); precision);
// Isnt This exactly the same line??? // Isnt This exactly the same line???
// r = UI7::DragData<T>::New(label, data, num_elms, pIO, min, max, step, // r = UI7::DragData<T>::New(label, data, num_elms, pIO, min, max, step,
// precision); // precision);
+1 -2
View File
@@ -56,8 +56,7 @@ class PD_API Context {
void AddViewPort(const ID& id, const ivec4& vp); void AddViewPort(const ID& id, const ivec4& vp);
void UseViewPort(const ID& id); void UseViewPort(const ID& id);
void Update(); void Update();
Menu* BeginMenu(const ID& id, UI7MenuFlags flags = 0, Menu* BeginMenu(const ID& id, UI7MenuFlags flags = 0, bool* pShow = nullptr);
bool* pShow = nullptr);
Menu* CurrentMenu() { return pCurrent; } Menu* CurrentMenu() { return pCurrent; }
void EndMenu(); void EndMenu();
void AboutMenu(bool* show = nullptr); void AboutMenu(bool* show = nullptr);
+1 -1
View File
@@ -51,7 +51,7 @@ PD_API void Button::Draw() {
// io->Ren->OnScreen(screen); // io->Ren->OnScreen(screen);
list->PathRect(FinalPos(), FinalPos() + size, io->FrameRounding); list->PathRect(FinalPos(), FinalPos() + size, io->FrameRounding);
list->PathFill(io->Theme.Get(color)); list->PathFill(io->Theme.Get(color));
// list->LayerUp(); // list->LayerUp();
list->DrawText(FinalPos() + size * 0.5 - tdim * 0.5, label.c_str(), list->DrawText(FinalPos() + size * 0.5 - tdim * 0.5, label.c_str(),
io->Theme.Get(UI7Color_Text)); io->Theme.Get(UI7Color_Text));
// list->LayerDown(); // list->LayerDown();
+10 -12
View File
@@ -33,8 +33,7 @@ PD_API void ColorEdit::HandleInput() {
} }
// Assert(screen.get(), "Screen is not set up!"); // Assert(screen.get(), "Screen is not set up!");
// if (screen->ScreenType() == Screen::Bottom) { // if (screen->ScreenType() == Screen::Bottom) {
if (io->InputHandler.DragObject(this->GetID() + 2, if (io->InputHandler.DragObject(this->GetID() + 2, fvec4(FinalPos(), size))) {
fvec4(FinalPos(), size))) {
if (io->InputHandler.DragReleasedAW) { if (io->InputHandler.DragReleasedAW) {
is_shown = !is_shown; is_shown = !is_shown;
} }
@@ -55,17 +54,16 @@ PD_API void ColorEdit::Draw() {
} }
layout->SetPosition(FinalPos()); layout->SetPosition(FinalPos());
layout->AddObjectEx( layout->AddObjectEx(
new DynObj( new DynObj([=, this](UI7::IO* io, Li::Drawlist* l, Container* thiz) {
[=, this](UI7::IO* io, Li::Drawlist* l, Container* thiz) { thiz->SetSize(layout->GetSize());
thiz->SetSize(layout->GetSize()); // l->Layer(30);
// l->Layer(30); l->PathRect(thiz->GetPos(), thiz->GetPos() + thiz->GetSize(),
l->PathRect(thiz->GetPos(), thiz->GetPos() + thiz->GetSize(), io->FrameRounding);
io->FrameRounding); l->PathFill(io->Theme.Get(UI7Color_FrameBackground));
l->PathFill(io->Theme.Get(UI7Color_FrameBackground)); }),
}),
UI7LytAdd_Front | UI7LytAdd_NoCursorUpdate | UI7LytAdd_NoScrollHandle); UI7LytAdd_Front | UI7LytAdd_NoCursorUpdate | UI7LytAdd_NoScrollHandle);
auto obj = new DynObj( auto obj =
[=, this](UI7::IO* io, Li::Drawlist* l, Container* thiz) { new DynObj([=, this](UI7::IO* io, Li::Drawlist* l, Container* thiz) {
l->PathRect(thiz->FinalPos(), thiz->FinalPos() + io->ItemRowHeight, l->PathRect(thiz->FinalPos(), thiz->FinalPos() + io->ItemRowHeight,
io->FrameRounding); io->FrameRounding);
l->PathFill(*color_ref); l->PathFill(*color_ref);
+4 -4
View File
@@ -31,10 +31,10 @@ PD_API void Container::HandleScrolling(fvec2 scrolling, fvec4 viewport) {
} }
last_use = PD::Os::GetTime(); last_use = PD::Os::GetTime();
pos -= fvec2(0, scrolling.y); pos -= fvec2(0, scrolling.y);
skippable = !Li::Math::InBounds( skippable =
pos, size, !Li::Math::InBounds(pos, size,
fvec4(viewport.x, viewport.y, viewport.x + viewport.z, fvec4(viewport.x, viewport.y, viewport.x + viewport.z,
viewport.y + viewport.w)); viewport.y + viewport.w));
} }
PD_API void Container::HandleInternalInput() { PD_API void Container::HandleInternalInput() {
+3 -3
View File
@@ -21,10 +21,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.
*/ */
#include <algorithm>
#include <pd/ui7/container/dragdata.hpp> #include <pd/ui7/container/dragdata.hpp>
#include <pd/ui7/container/label.hpp> #include <pd/ui7/container/label.hpp>
#include <type_traits> #include <type_traits>
#include <algorithm>
namespace PD { namespace PD {
namespace UI7 { namespace UI7 {
@@ -93,8 +93,8 @@ PD_API void DragData<T>::Draw() {
// list->LayerDown(); // list->LayerDown();
off_x += td.x + io->ItemSpace.x + io->FramePadding.x; off_x += td.x + io->ItemSpace.x + io->FramePadding.x;
} }
list->DrawText(FinalPos() + fvec2(off_x, io->FramePadding.y * 0.5), label.c_str(), list->DrawText(FinalPos() + fvec2(off_x, io->FramePadding.y * 0.5),
io->Theme.Get(UI7Color_Text)); label.c_str(), io->Theme.Get(UI7Color_Text));
} }
template <typename T> template <typename T>
+1 -1
View File
@@ -33,7 +33,7 @@ PD_API void Image::Draw() {
list->BindTexture(img); list->BindTexture(img);
list->DrawRectFilled(FinalPos(), newsize, 0xffffffff); list->DrawRectFilled(FinalPos(), newsize, 0xffffffff);
list->UnbindTexture(); list->UnbindTexture();
//list->LayerDown(); // list->LayerDown();
} }
} // namespace UI7 } // namespace UI7
} // namespace PD } // namespace PD
+4 -4
View File
@@ -21,10 +21,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.
*/ */
#include <algorithm>
#include <pd/ui7/container/label.hpp> #include <pd/ui7/container/label.hpp>
#include <pd/ui7/container/slider.hpp> #include <pd/ui7/container/slider.hpp>
#include <type_traits> #include <type_traits>
#include <algorithm>
namespace PD { namespace PD {
namespace UI7 { namespace UI7 {
@@ -57,9 +57,9 @@ PD_API void Slider<T>::HandleInput() {
fvec4(FinalPos() + fvec2(2, 0), fvec2(width, GetSize().y)))) { fvec4(FinalPos() + fvec2(2, 0), fvec2(width, GetSize().y)))) {
if (!io->InputHandler.DragReleasedAW) { if (!io->InputHandler.DragReleasedAW) {
*data = std::clamp( *data = std::clamp(
T(max * (std::clamp(io->InputHandler.DragLastPosition.x - xps, 0.f, T(max *
width) / (std::clamp(io->InputHandler.DragLastPosition.x - xps, 0.f, width) /
width)), width)),
this->min, this->max); this->min, this->max);
} }
} }
+3 -3
View File
@@ -22,8 +22,8 @@ SOFTWARE.
*/ */
#include <pd/core/core.hpp> #include <pd/core/core.hpp>
#include <pd/ui7/io.hpp>
#include <pd/drivers/drivers.hpp> #include <pd/drivers/drivers.hpp>
#include <pd/ui7/io.hpp>
namespace PD { namespace PD {
PD_API void UI7::IO::Update() { PD_API void UI7::IO::Update() {
@@ -39,7 +39,7 @@ PD_API void UI7::IO::Update() {
DrawlistRegestry.push_front(std::make_pair("CtxBackList", &Back)); DrawlistRegestry.push_front(std::make_pair("CtxBackList", &Back));
if (Font) ItemRowHeight = FontScale * Font->PixelHeight; if (Font) ItemRowHeight = FontScale * Font->PixelHeight;
// RegisterDrawList("CtxBackList", Back); // RegisterDrawList("CtxBackList", Back);
NumIndices = 0;//FDL.pNumIndices; NumIndices = 0; // FDL.pNumIndices;
NumVertices = 0;//FDL.pNumVertices; NumVertices = 0; // FDL.pNumVertices;
} }
} // namespace PD } // namespace PD
+22 -23
View File
@@ -21,9 +21,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.
*/ */
#include <algorithm>
#include <pd/ui7/containers.hpp> #include <pd/ui7/containers.hpp>
#include <pd/ui7/menu.hpp> #include <pd/ui7/menu.hpp>
#include <algorithm>
namespace PD { namespace PD {
namespace UI7 { namespace UI7 {
@@ -84,8 +84,8 @@ PD_API void Menu::ColorEdit(const std::string& label, u32& clr) {
PD_API void Menu::Separator() { PD_API void Menu::Separator() {
// Dynamic Objects are very simple... // Dynamic Objects are very simple...
Container* r = new DynObj( Container* r =
[=, this](UI7::IO* io, Li::Drawlist* l, UI7::Container* self) { new DynObj([=, this](UI7::IO* io, Li::Drawlist* l, UI7::Container* self) {
l->DrawRectFilled(self->FinalPos(), self->GetSize(), l->DrawRectFilled(self->FinalPos(), self->GetSize(),
pIO.Theme.Get(UI7Color_TextDead)); pIO.Theme.Get(UI7Color_TextDead));
}); });
@@ -99,7 +99,7 @@ PD_API void Menu::Separator() {
PD_API void Menu::SeparatorText(const std::string& label) { PD_API void Menu::SeparatorText(const std::string& label) {
// Also note to use [=] instead of [&] to not undefined access label // Also note to use [=] instead of [&] to not undefined access label
Container* r = new DynObj([=, this](UI7::IO* io, Li::Drawlist* l, Container* r = new DynObj([=, this](UI7::IO* io, Li::Drawlist* l,
UI7::Container* self) { UI7::Container* self) {
fvec2 size = self->GetSize(); fvec2 size = self->GetSize();
fvec2 tdim = io->Font->GetTextBounds(label.c_str(), io->FontScale); fvec2 tdim = io->Font->GetTextBounds(label.c_str(), io->FontScale);
fvec2 pos = self->FinalPos(); fvec2 pos = self->FinalPos();
@@ -135,7 +135,7 @@ PD_API void Menu::HandleFocus() {
PD::Hid::IsEvent(Hid::Event::Down, Hid::Keyboard::MouseLeft)) && PD::Hid::IsEvent(Hid::Event::Down, Hid::Keyboard::MouseLeft)) &&
Li::Math::InBounds(PD::Hid::MousePos(), newarea) && Li::Math::InBounds(PD::Hid::MousePos(), newarea) &&
!Li::Math::InBounds(PD::Hid::MousePos(), !Li::Math::InBounds(PD::Hid::MousePos(),
pIO.InputHandler.FocusedMenuRect)) { pIO.InputHandler.FocusedMenuRect)) {
pIO.InputHandler.FocusedMenu = pID; pIO.InputHandler.FocusedMenu = pID;
} }
if (pIO.InputHandler.FocusedMenu == pID) { if (pIO.InputHandler.FocusedMenu == pID) {
@@ -188,7 +188,7 @@ PD_API void Menu::HandleTitlebarActions() {
vec2 cpos = pLayout.Pos + pIO.FramePadding; vec2 cpos = pLayout.Pos + pIO.FramePadding;
// clr_collapse_tri = UI7Color_FrameBackground; // clr_collapse_tri = UI7Color_FrameBackground;
if (pIO.InputHandler.DragObject(UI7::ID(pID.GetName() + "clbse"), if (pIO.InputHandler.DragObject(UI7::ID(pID.GetName() + "clbse"),
fvec4(cpos, fvec2(18, TitleBarHeight)))) { fvec4(cpos, fvec2(18, TitleBarHeight)))) {
if (pIO.InputHandler.DragReleased) { if (pIO.InputHandler.DragReleased) {
pIsOpen = !pIsOpen; pIsOpen = !pIsOpen;
} }
@@ -204,7 +204,7 @@ PD_API void Menu::HandleTitlebarActions() {
// clr_close_btn = UI7Color_FrameBackground; // clr_close_btn = UI7Color_FrameBackground;
if (pIO.InputHandler.DragObject(UI7::ID(pID.GetName() + "clse"), if (pIO.InputHandler.DragObject(UI7::ID(pID.GetName() + "clse"),
fvec4(cpos, size))) { fvec4(cpos, size))) {
if (pIO.InputHandler.DragReleased) { if (pIO.InputHandler.DragReleased) {
*pIsShown = !(*pIsShown); *pIsShown = !(*pIsShown);
} }
@@ -217,7 +217,7 @@ PD_API void Menu::HandleTitlebarActions() {
// clr_close_btn = UI7Color_FrameBackground; // clr_close_btn = UI7Color_FrameBackground;
if (pIO.InputHandler.DragObject(UI7::ID(pID.GetName() + "rszs"), if (pIO.InputHandler.DragObject(UI7::ID(pID.GetName() + "rszs"),
fvec4(cpos, fvec2(20)))) { fvec4(cpos, fvec2(20)))) {
fvec2 szs = pLayout.Size + (pIO.InputHandler.DragPosition - fvec2 szs = pLayout.Size + (pIO.InputHandler.DragPosition -
pIO.InputHandler.DragLastPosition); pIO.InputHandler.DragLastPosition);
if (szs.x < 30) szs.x = 30; if (szs.x < 30) szs.x = 30;
@@ -268,8 +268,8 @@ PD_API void Menu::DrawBaseLayout() {
/** Background */ /** Background */
Container* r = new DynObj([](IO* io, Li::Drawlist* l, Container* r = new DynObj([](IO* io, Li::Drawlist* l,
UI7::Container* self) { UI7::Container* self) {
//l->Layer(0); // l->Layer(0);
l->PathRectEx(self->FinalPos(), self->FinalPos() + self->GetSize(), 10.f, l->PathRectEx(self->FinalPos(), self->FinalPos() + self->GetSize(), 10.f,
LiPathRectFlags_KeepTop | LiPathRectFlags_KeepBot); LiPathRectFlags_KeepTop | LiPathRectFlags_KeepBot);
l->PathFill(io->Theme.Get(UI7Color_Background)); l->PathFill(io->Theme.Get(UI7Color_Background));
@@ -284,13 +284,13 @@ PD_API void Menu::DrawBaseLayout() {
UI7LytAdd_Front); UI7LytAdd_Front);
} }
if (!(Flags & UI7MenuFlags_NoTitlebar)) { if (!(Flags & UI7MenuFlags_NoTitlebar)) {
Container* r = new DynObj( Container* r = new DynObj(
[=, this](UI7::IO* io, Li::Drawlist* l, UI7::Container* self) { [=, this](UI7::IO* io, Li::Drawlist* l, UI7::Container* self) {
//l->Layer(20); // l->Layer(20);
/** Header Bar */ /** Header Bar */
l->DrawRectFilled(self->FinalPos(), self->GetSize(), l->DrawRectFilled(self->FinalPos(), self->GetSize(),
io->Theme.Get(UI7Color_Header)); io->Theme.Get(UI7Color_Header));
//l->Layer(21); // l->Layer(21);
/** Inline if statement to shift the Text if collapse sym is shown */ /** Inline if statement to shift the Text if collapse sym is shown */
/** What the hell is this code btw (didn't found a better way) */ /** What the hell is this code btw (didn't found a better way) */
l->DrawText(self->FinalPos() + l->DrawText(self->FinalPos() +
@@ -308,9 +308,9 @@ PD_API void Menu::DrawBaseLayout() {
/** Collapse Sym */ /** Collapse Sym */
if (!(Flags & UI7MenuFlags_NoCollapse)) { if (!(Flags & UI7MenuFlags_NoCollapse)) {
r = new DynObj([=, this](UI7::IO* io, Li::Drawlist* l, r = new DynObj([=, this](UI7::IO* io, Li::Drawlist* l,
UI7::Container* self) { UI7::Container* self) {
/** This sym actually requires layer 21 (i dont know why) */ /** This sym actually requires layer 21 (i dont know why) */
//l->Layer(21); // l->Layer(21);
/** /**
* Symbol (Position Swapping set by pIsOpen ? openpos : closepos;) * Symbol (Position Swapping set by pIsOpen ? openpos : closepos;)
*/ */
@@ -339,10 +339,10 @@ PD_API void Menu::DrawBaseLayout() {
fvec2(pLayout.Pos.x + pLayout.Size.x - size.x - pIO.FramePadding.x, fvec2(pLayout.Pos.x + pLayout.Size.x - size.x - pIO.FramePadding.x,
pLayout.Pos.y + pIO.FramePadding.y); pLayout.Pos.y + pIO.FramePadding.y);
pLayout.DrawList.DrawLine(cpos, cpos + size, pLayout.DrawList.DrawLine(cpos, cpos + size,
pIO.Theme.Get(UI7Color_FrameBackground), 2); pIO.Theme.Get(UI7Color_FrameBackground), 2);
pLayout.DrawList.DrawLine(cpos + fvec2(0, size.y), pLayout.DrawList.DrawLine(cpos + fvec2(0, size.y),
cpos + fvec2(size.x, 0), cpos + fvec2(size.x, 0),
pIO.Theme.Get(UI7Color_FrameBackground), 2); pIO.Theme.Get(UI7Color_FrameBackground), 2);
} }
} }
} }
@@ -394,14 +394,13 @@ PD_API bool Menu::BeginTreeNode(const ID& id) {
l->DrawTriangleFilled(ts, ts + pl[0], ts + pl[1], l->DrawTriangleFilled(ts, ts + pl[0], ts + pl[1],
io->Theme.Get(UI7Color_FrameBackground)); io->Theme.Get(UI7Color_FrameBackground));
l->DrawText(self->FinalPos() + fvec2(10 + io->ItemSpace.x, 0), id.GetName().c_str(), l->DrawText(self->FinalPos() + fvec2(10 + io->ItemSpace.x, 0),
io->Theme.Get(UI7Color_Text)); id.GetName().c_str(), io->Theme.Get(UI7Color_Text));
}); });
/** Yes this new function handler was created for tree nodes */ /** Yes this new function handler was created for tree nodes */
r->AddInputHandler([=, this](IO* io, Container* self) { r->AddInputHandler([=, this](IO* io, Container* self) {
if (io->InputHandler.DragObject( if (io->InputHandler.DragObject(ID(pID.GetName() + id.GetName()),
ID(pID.GetName() + id.GetName()), fvec4(self->FinalPos(), self->GetSize()))) {
fvec4(self->FinalPos(), self->GetSize()))) {
if (io->InputHandler.DragReleased) { if (io->InputHandler.DragReleased) {
n->second = !n->second; n->second = !n->second;
} }
+16 -18
View File
@@ -51,15 +51,14 @@ PD_API void Context::UseViewPort(const ID& id) {
pIO.CurrentViewPort = pIO.ViewPorts[id.RawID()]; pIO.CurrentViewPort = pIO.ViewPorts[id.RawID()];
} }
PD_API Menu* Context::BeginMenu(const ID& id, UI7MenuFlags flags, PD_API Menu* Context::BeginMenu(const ID& id, UI7MenuFlags flags, bool* pShow) {
bool* pShow) {
if (pCurrent) { if (pCurrent) {
PDERR("UI7: You are already in {} Menu!", pCurrent->pID.GetName()); PDERR("UI7: You are already in {} Menu!", pCurrent->pID.GetName());
return nullptr; return nullptr;
} }
if (std::find(pCurrentMenus.begin(), pCurrentMenus.end(), (u32)id) != if (std::find(pCurrentMenus.begin(), pCurrentMenus.end(), (u32)id) !=
pCurrentMenus.end()) { pCurrentMenus.end()) {
PDERR("UI7: Menu {} already exists!", id.GetName()); PDERR("UI7: Menu {} already exists!", id.GetName());
return nullptr; return nullptr;
} }
pCurrent = pGetOrCreateMenu(id); pCurrent = pGetOrCreateMenu(id);
@@ -208,18 +207,18 @@ PD_API void Context::MetricsMenu(bool* show) {
m->Label("Renderer: {}", PD::Gfx::GetDriverName()); m->Label("Renderer: {}", PD::Gfx::GetDriverName());
if (m->BeginTreeNode( if (m->BeginTreeNode(
std::string(std::string("Input: ") + PD::Hid::GetDriverName()))) { std::string(std::string("Input: ") + PD::Hid::GetDriverName()))) {
/* if (pIO.pCtx.Hid()->Flags & PD::HidDriver::Flags_HasKeyboard) { /* if (pIO.pCtx.Hid()->Flags & PD::HidDriver::Flags_HasKeyboard) {
m->Label("- Keyboard Supported"); m->Label("- Keyboard Supported");
} }
if (pIO.pCtx.Hid()->Flags & PD::HidDriver::Flags_HasMouse) { if (pIO.pCtx.Hid()->Flags & PD::HidDriver::Flags_HasMouse) {
m->Label("- Mouse Supported"); m->Label("- Mouse Supported");
} }
if (pIO.pCtx.Hid()->Flags & PD::HidDriver::Flags_HasTouch) { if (pIO.pCtx.Hid()->Flags & PD::HidDriver::Flags_HasTouch) {
m->Label("- Touch Supported"); m->Label("- Touch Supported");
} }
if (pIO.pCtx.Hid()->Flags & PD::HidDriver::FLags_HasGamepad) { if (pIO.pCtx.Hid()->Flags & PD::HidDriver::FLags_HasGamepad) {
m->Label("- Gamepad Supported"); m->Label("- Gamepad Supported");
}*/ }*/
m->EndTreeNode(); m->EndTreeNode();
} }
/** Section IO */ /** Section IO */
@@ -256,8 +255,7 @@ PD_API void Context::MetricsMenu(bool* show) {
m->Label(std::format("Cursor: {}", pMenus[it]->pLayout.Cursor)); m->Label(std::format("Cursor: {}", pMenus[it]->pLayout.Cursor));
if (m->BeginTreeNode( if (m->BeginTreeNode(
"ID Objects (" + "ID Objects (" +
std::to_string(pMenus[it]->pLayout.IDObjects.size()) + std::to_string(pMenus[it]->pLayout.IDObjects.size()) + ")")) {
")")) {
for (auto& jt : pMenus[it]->pLayout.IDObjects) { for (auto& jt : pMenus[it]->pLayout.IDObjects) {
m->Label(std::format("{:08X}", jt->GetID())); m->Label(std::format("{:08X}", jt->GetID()));
} }
@@ -321,7 +319,7 @@ PD_API void UI7::Context::StyleEditor(bool* show) {
} }
/// Small trick to print without prefix /// Small trick to print without prefix
#define ts(x) m->ColorEdit(std::string(#x).substr(9), pIO.Theme.GetRef(x)); #define ts(x) m->ColorEdit(std::string(#x).substr(9), pIO.Theme.GetRef(x));
#define ts2(x) \ #define ts2(x) \
m->DragData(std::string(#x).substr(9), (u8*)&pIO.Theme.GetRef(x), 4, (u8)0, \ m->DragData(std::string(#x).substr(9), (u8*)&pIO.Theme.GetRef(x), 4, (u8)0, \
(u8)255); (u8)255);
ts(UI7Color_Background); ts(UI7Color_Background);
+1 -1
View File
@@ -309,7 +309,7 @@ int main(int argc, char** argv) {
m->Label("LI Draw Comamnds: {}", PD::Gfx::GetNumCommands()); m->Label("LI Draw Comamnds: {}", PD::Gfx::GetNumCommands());
m->Label("GFX Draw Calls: {}", PD::Gfx::GetNumDrawcalls()); m->Label("GFX Draw Calls: {}", PD::Gfx::GetNumDrawcalls());
m->Label("GFX Vertices: {}", PD::Gfx::GetNumVertices()); m->Label("GFX Vertices: {}", PD::Gfx::GetNumVertices());
m->Label("GFX Triangles: {}", PD::Gfx::GetNumVertices()/3); m->Label("GFX Triangles: {}", PD::Gfx::GetNumVertices() / 3);
m->Label("GFX Indices: {}", PD::Gfx::GetNumIndices()); m->Label("GFX Indices: {}", PD::Gfx::GetNumIndices());
ui7.EndMenu(); ui7.EndMenu();
} }