MCPcopy Create free account
hub / github.com/aspizu/goboscript / menu

Method menu

src/blocks.rs:282–436  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

280
281impl Block {
282 pub fn menu(&self) -> Option<Menu> {
283 match self {
284 Self::GotoRandomPosition => Some(Menu {
285 opcode: "motion_goto_menu",
286 input: "TO",
287 field: "TO",
288 default: "_random_",
289 }),
290 Self::GotoMousePointer => Some(Menu {
291 opcode: "motion_goto_menu",
292 input: "TO",
293 field: "TO",
294 default: "_mouse_",
295 }),
296 Self::Goto1 => Some(Menu {
297 opcode: "motion_goto_menu",
298 input: "TO",
299 field: "TO",
300 default: "_random_",
301 }),
302 Self::Glide2 => Some(Menu {
303 opcode: "motion_glideto_menu",
304 input: "TO",
305 field: "TO",
306 default: "_random_",
307 }),
308 Self::GlideToRandomPosition => Some(Menu {
309 opcode: "motion_glideto_menu",
310 input: "TO",
311 field: "TO",
312 default: "_random_",
313 }),
314 Self::GlideToMousePointer => Some(Menu {
315 opcode: "motion_glideto_menu",
316 input: "TO",
317 field: "TO",
318 default: "_mouse_",
319 }),
320 Self::PointTowardsMousePointer => Some(Menu {
321 opcode: "motion_pointtowards_menu",
322 input: "TOWARDS",
323 field: "TOWARDS",
324 default: "_mouse_",
325 }),
326 Self::PointTowardsRandomDirection => Some(Menu {
327 opcode: "motion_pointtowards_menu",
328 input: "TOWARDS",
329 field: "TOWARDS",
330 default: "_random_",
331 }),
332 Self::PointTowards => Some(Menu {
333 opcode: "motion_pointtowards_menu",
334 input: "TOWARDS",
335 field: "TOWARDS",
336 default: "_random_",
337 }),
338 Self::SwitchCostume => Some(Menu {
339 opcode: "looks_costume",

Callers 2

blockMethod · 0.80
reprMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected