Custom MojoX View?

About Monkey 2 Forums Monkey 2 Programming Help Custom MojoX View?

This topic contains 3 replies, has 2 voices, and was last updated by  nerobot 2 years, 4 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5760

    scurty
    Participant

    How does one comply with MojoX View Class standards?

    I understand I have to “Extends View.”
    I’ve tried getting Mouse/Key Events from within a “View” but so I got nothing.

    Then I simply create a “View” Instance in the main window class and run the app.
    I get no rendering of the DrawRect.
    And no Keyboard/Mouse input seems to be getting through.

    #5766

    nerobot
    Participant

    Did you attach this view to a window? Window class is an entry point for all your views.

    pseudocode:

    Also pay attention to some view-based classes have OnContentMouseEvent not a OnMouseEvent.

    #5797

    scurty
    Participant

    Oh my, thanks nerobot! Never noticed…

    #5798

    nerobot
    Participant

    It’s good to look at sources of mojox module to better undertanding.

    Maybe you’ll find some more suitable views to extend then the base View class.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.