MCPcopy Create free account
hub / github.com/GrapheneCt/NetStream / SetPageDebugMode

Function SetPageDebugMode

NetStream/source/debug.cpp:142–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142void SetPageDebugMode(paf::Plugin *plugin, paf::IDParam const& id, paf::Plugin::PageDebugMode mode, bool on)
143{
144 plugin->SetPageDebugMode(id, mode, on);
145
146 if (on && (mode == paf::Plugin::PageDebugMode::PageDebugMode_PageVisual || mode == paf::Plugin::PageDebugMode::PageDebugMode_PageVisualEdit))
147 {
148 ui::Scene *page = static_cast<ui::Scene *>(plugin->GetNodeEntity_Widget(id));
149 page->SetDebugFocusCB(DebugFocusCB);
150
151 s_debugText = (ui::Text *)plugin->CreateWidget(page->GetDebugCube(), "text", "debug_text", "_common_style_text_copy_dialog_desc");
152 s_debugText->SetPos(0.0f, 0.0f, 0.0f);
153 s_debugText->SetAlign(ui::Widget::ALIGN_MINUS, ui::Widget::ALIGN_PLUS, ui::Widget::ALIGN_NONE, NULL);
154 s_debugText->SetAnchor(ui::Widget::ANCHOR_LEFT, ui::Widget::ANCHOR_TOP, ui::Widget::ANCHOR_CENTER, NULL);
155 s_debugText->SetAdjust(ui::Widget::ADJUST_CONTENT, ui::Widget::ADJUST_CONTENT, ui::Widget::ADJUST_CONTENT);
156 s_debugText->SetStyleAttribute(graph::TextStyleAttribute::TextStyleAttribute_BackColor, 0, 0, { 0.0f, 0.0f, 0.0f, 1.0f });
157 s_debugText->EnableDebugFocus(false);
158 }
159}
160
161/*
162uint32_t oldButtons = 0;

Callers 1

OnUpdateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected