Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

鼠标右键无法点击 #11

Open
finalzeng opened this issue Oct 10, 2019 · 2 comments
Open

鼠标右键无法点击 #11

finalzeng opened this issue Oct 10, 2019 · 2 comments
Assignees

Comments

@finalzeng
Copy link

finalzeng commented Oct 10, 2019

button.onClick.Add(onClick); 无法监听 一点效果没有。

@finalzeng
Copy link
Author

finalzeng commented Oct 10, 2019

新建一个例子右键Popup 可行,在项目里Popup就不行 代码都是一样的,右键点击事件 被占用了么? 有优先级吗,我原有项目做的界面是委托了按钮点击事件!

发现跟我绘制的鼠标有关系,鼠标恢复成window的默认鼠标就没问题,我绘制的鼠标层级设置成了9999
测试后发现确实跟层级有关系 层级设置成0就没问题,可是0会被遮挡在UI下

@finalzeng finalzeng changed the title 如何动态移除创建的组件? 鼠标右键无法点击 Oct 10, 2019
@esengine
Copy link
Contributor

esengine commented Oct 14, 2019

改错层级了?应该修改的是DrawOrder,你是采用继承monogame的IDrawable, IGameComponent的吗

继承这两个接口后在合适的地方调用 Components.Add(new MouseAnimation(this));,修改DrawOrder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants