mojox needs ListboxView and CanvasView

About Monkey 2 Forums Monkey 2 Development mojox needs ListboxView and CanvasView

This topic contains 5 replies, has 2 voices, and was last updated by  skn3 2 years, 6 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #4428

    skn3
    Participant

    Hey,

    I started a little tool in mx2 the other day but have decided to halt as I needed these two gadgets in mojox. The tool is very simply a way for me to load my atlas, pick items from it, add game values to those items and then dump it into an xml file. I plan to have 100’s of items, so I wanted to make a quick tool to facilitate this visually.

     

    Listbox, to show currently hilighted item(s) in a list of scrollable items.

    Canvas, a gadget that provides a generic way for rendering/interacting-with custom controls via a lambda function.

     

    I could go ahead and create these myself, but I am trying not to distract myself off project like this. I have a bad habit of getting distracted from making games, so I am trying really hard to stay focused. If I start writing custom controls, then I may as well just use the time to do it manually in XML.

    These are core components for any GUI so it would be a waste for me to implement them, if they are going to be implemented officially at some point.

    #4441

    Mark Sibly
    Keymaster

    Just added ListView – more coming, esp. more layout views.

    To create a custom view, you need to extend ‘View’ and implement OnRender.

    #4447

    skn3
    Participant

    Awesome stuff, thanks! I will have a bit of a play today 🙂

    #4491

    skn3
    Participant

    Is there currently a way to layout two columns, have one fixed width and the other fill the rest?

    I have a few nested DockingView’s and it doesn’t seem to work.

    #4493

    Mark Sibly
    Keymaster

    A single docking view will do the trick:

    leftView here is probably your ListView, and mainView is probably a custom/canvas view.

    The ‘ContentView’ of a docking view is what takes up all the space left over after “left”, “right” etc views are layed out.

    The ‘100’ is the width of the left view – you can add ‘,True’ after this to make it resizable.

    #4508

    skn3
    Participant

    Ahhhh cool thanks. I was trying to just add a second view and set it to “100%”

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

You must be logged in to reply to this topic.