# 0.2.7-1 **HOTFIX**
- Fix nullptr->value access issue in UI7::Context - Add UI7MenuFlags_NoMove to disable window movement - Fix testapp to support the new DebugLabels standard
This commit is contained in:
parent
e45598f9f6
commit
85e12c45c0
@ -38,6 +38,7 @@ enum UI7MenuFlags_ {
|
||||
UI7MenuFlags_NoBackground = 1 << 4, ///< Dont Render Menu Background
|
||||
UI7MenuFlags_NoClipRect = 1 << 5, ///< Disable clip render area of the Menu
|
||||
UI7MenuFlags_NoCollapse = 1 << 6, ///< Disable Menu Collapse
|
||||
UI7MenuFlags_NoMove = 1 << 7, ///< Disable Window Movement
|
||||
// Enable Horizontal and Vertical Scrolling
|
||||
UI7MenuFlags_Scrolling = UI7MenuFlags_HzScrolling | UI7MenuFlags_VtScrolling,
|
||||
};
|
||||
|
@ -36,7 +36,7 @@ SOFTWARE.
|
||||
* Major Minor Patch Build
|
||||
* 0x01010000 -> 1.1.0-0
|
||||
*/
|
||||
#define UI7_VERSION 0x00020700
|
||||
#define UI7_VERSION 0x00020701
|
||||
|
||||
namespace PD {
|
||||
namespace UI7 {
|
||||
|
@ -228,23 +228,25 @@ void UI7::Menu::PreHandler(UI7MenuFlags flags) {
|
||||
|
||||
void UI7::Menu::PostHandler() {
|
||||
TT::Scope st("MPOS_" + name);
|
||||
if (inp->IsDown(inp->Touch) &&
|
||||
LI::Renderer::InBox(inp->TouchPos(),
|
||||
vec4(pos + vec2(18, 0), vec2(view_area.z(), tbh))) &&
|
||||
has_touch) {
|
||||
mouse = inp->TouchPos();
|
||||
} else if (inp->IsUp(inp->Touch) &&
|
||||
LI::Renderer::InBox(
|
||||
inp->TouchPos(),
|
||||
vec4(pos + vec2(18, 0), vec2(view_area.z(), tbh))) &&
|
||||
has_touch) {
|
||||
mouse = 0;
|
||||
} else if (inp->IsHeld(inp->Touch) &&
|
||||
LI::Renderer::InBox(
|
||||
inp->TouchPosLast(),
|
||||
vec4(pos + vec2(18, 0), vec2(view_area.z(), tbh))) &&
|
||||
has_touch) {
|
||||
pos = inp->TouchPos() - mouse;
|
||||
if (!(flags & UI7MenuFlags_NoMove)) {
|
||||
if (inp->IsDown(inp->Touch) &&
|
||||
LI::Renderer::InBox(inp->TouchPos(), vec4(pos + vec2(18, 0),
|
||||
vec2(view_area.z(), tbh))) &&
|
||||
has_touch) {
|
||||
mouse = inp->TouchPos();
|
||||
} else if (inp->IsUp(inp->Touch) &&
|
||||
LI::Renderer::InBox(
|
||||
inp->TouchPos(),
|
||||
vec4(pos + vec2(18, 0), vec2(view_area.z(), tbh))) &&
|
||||
has_touch) {
|
||||
mouse = 0;
|
||||
} else if (inp->IsHeld(inp->Touch) &&
|
||||
LI::Renderer::InBox(
|
||||
inp->TouchPosLast(),
|
||||
vec4(pos + vec2(18, 0), vec2(view_area.z(), tbh))) &&
|
||||
has_touch) {
|
||||
pos = inp->TouchPos() - mouse;
|
||||
}
|
||||
}
|
||||
if (scrolling[1]) {
|
||||
scroll_allowed[1] = (max[1] > 235);
|
||||
|
@ -61,7 +61,7 @@ bool UI7::Context::BeginMenu(const ID& id, UI7MenuFlags flags) {
|
||||
if (!this->current->is_open) {
|
||||
this->current = nullptr;
|
||||
}
|
||||
return this->current->is_open;
|
||||
return this->current != nullptr;
|
||||
}
|
||||
|
||||
UI7::Menu::Ref UI7::Context::GetCurrentMenu() {
|
||||
|
@ -57,7 +57,7 @@ class Test : public PD::App {
|
||||
UI7MenuFlags_Scrolling | UI7MenuFlags_CenterTitle)) {
|
||||
auto m = ui7->GetCurrentMenu();
|
||||
m->SeparatorText("Menu Timings");
|
||||
m->DebugLabels();
|
||||
PD::UI7::Menu::DebugLabels(m);
|
||||
m->SeparatorText("Palladium Info");
|
||||
m->PushAlignment(UI7Align_Center);
|
||||
m->Label("Version: " + PD::LibInfo::Version() + " [" +
|
||||
@ -82,7 +82,7 @@ class Test : public PD::App {
|
||||
}
|
||||
m->SameLine();
|
||||
if (m->Button("Palladium")) {
|
||||
//sthis->FeatureDisable(AppFLags_UserLoop);
|
||||
// sthis->FeatureDisable(AppFLags_UserLoop);
|
||||
Overlays()->Push(PD::New<PD::SettingsMenu>());
|
||||
}
|
||||
m->SeparatorText("SeparatorText");
|
||||
|
Loading…
Reference in New Issue
Block a user