Netlogo鼠标悬停/鼠标悬停

时间:2018-03-25 15:54:16

标签: netlogo mouseover

在NetLogo中是否可以在补丁中执行鼠标悬停,以便标签显示某个补丁变量的值?我有一个案例,屏幕上有许多补丁,需要看到一个特定的值,因为我将鼠标放在每个补丁上。我知道我可以右击并“检查补丁”,但有很多补丁,鼠标悬停可以使任务更容易。

1 个答案:

答案 0 :(得分:5)

这不是悬停选项,但您不必使用// Create shims. They only apply within this isolate block. var dateTimeShim = Shim.Replace(() => DateTime.Now) .With(() => new DateTime(2010, 1, 1)); var usernameShim = Shim.Replace(() => Environment.UserName) .With(() => "john.wick"); // Shims are only active within an Isolate block - and you // have to pass all shims you want to be active. PoseContext.Isolate(() => { // Run your test - shims are active at this point. RunTest(); }, dateTimeShim, usernameShim); ,您可以使用inspectmouse-down?的某种组合,{{1单击补丁时获取要显示的值(您需要对其进行编码,检查鼠标的位置,打开该补丁,关闭其他补丁等)。

但是听起来你可能会对拥有所有不同变量的选择器做得更好,你可以简单地选择你想要显示的变量,并让mouse-xcor显示所有变量的值补丁。

相关问题