Skip to content

Commit 7a3f7a2

Browse files
committed
touch priority in devtools
1 parent 3e664bf commit 7a3f7a2

3 files changed

Lines changed: 17 additions & 1 deletion

File tree

mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"geode": "v2.0.0",
3-
"version": "v1.4.0",
3+
"version": "v1.5.0",
44
"gd": "*",
55
"id": "geode.devtools",
66
"name": "DevTools",

src/DevTools.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ void DevTools::setup() {
190190
#ifdef GEODE_IS_MOBILE
191191
ImGui::GetIO().FontGlobalScale = 2.f;
192192
ImGui::GetStyle().ScrollbarSize = 60.f;
193+
// ImGui::GetStyle().TabBarBorderSize = 60.f;
193194
#endif
194195
}
195196

src/pages/Attributes.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,21 @@ void DevTools::drawNodeAttributes(CCNode* node) {
217217
}
218218
}
219219

220+
ImGui::NewLine();
221+
ImGui::Separator();
222+
ImGui::NewLine();
223+
224+
if (auto delegate = typeinfo_cast<CCTouchDelegate*>(node)) {
225+
if (auto handler = CCTouchDispatcher::get()->findHandler(delegate)) {
226+
auto priority = handler->getPriority();
227+
228+
if (ImGui::DragInt("Touch Priority", &priority, .03f)) {
229+
CCTouchDispatcher::get()->setPriority(priority, handler->getDelegate());
230+
}
231+
}
232+
}
233+
234+
220235
ImGui::NewLine();
221236
ImGui::Separator();
222237
ImGui::NewLine();

0 commit comments

Comments
 (0)