Mark Sibly

Forum Replies Created

Viewing 15 posts - 1,216 through 1,230 (of 1,431 total)
  • Author
    Posts
  • in reply to: Structs can't be passed as reference. #3236

    Mark Sibly
    Keymaster

    In general, no.

    You can Varptr a struct use a pointer, but this is very unsafe.

    in reply to: Ted21 audio view #3208

    Mark Sibly
    Keymaster

    Looks good, but what’s the source like? Is it a simple ‘drop replacement’ for the current AudioDocumentView?

    in reply to: MojoX Placement/Sizing Code #3202

    Mark Sibly
    Keymaster

    I would have quite liked Window to extend or contain DockingView, but it would have meant dragging a significant chunk of mojox into mojo, and would have been extra overhead (albeit very little) for people who only need a plain window (eg: games) so I decided against it.

    There are also still a few layout view types missing IMO – a GridView, a FlowView and no doubt more. These will happen over time, but in the meantime you can get away with quite a lot using the DockingView.

    in reply to: Ted2 1.0.3 crashes when trying to open a file on W10 and W7 #3201

    Mark Sibly
    Keymaster

    Ok, just pushed a potential fix for this.

    The best way to debug ted2 problems is in ted2 – just run src/ted2/ted2.monkey2 in debug mode.

    in reply to: Problem with forward referencing. #3200

    Mark Sibly
    Keymaster

    Anything that craps out the c++ compiler is a bug – please post an issue at github.

    in reply to: MojoX Placement/Sizing Code #3195

    Mark Sibly
    Keymaster

    Another point probably worth making: when a window lays out its content view, all it does is set the content view’s frame to match entire window content rect (checkout the Window.OnLayout method). This means when the actual contentview’s ‘Layout’ mode is applied, it will float within or fill the entire window.

    But this isn’t very flexible – in most cases you probably want to use a DockingView as the ‘main’ window/content view. This way, the docking view fills the window (unless you change its Layout!) and you can then add things at the top, left, etc of the dockingview/window.

    in reply to: MojoX Placement/Sizing Code #3194

    Mark Sibly
    Keymaster

    Here you go…

    Note that mojox is very much oriented towards auto-layout, ie: buttons are really designed to be added to toolbars, dockingviews etc, which are added to other dialogs, dockingviews and so on.

    This is why buttons default to ‘fill-x’ layout and not ‘float’…try it with ‘fill-x’ layout to see the difference. Note you can also set TextGravity to Vec2f( .5,.5 ) to center text within a button if you need to in ‘fill-x’ layout.

    in reply to: Another modified version of Ted2 #3160

    Mark Sibly
    Keymaster

    OK, just pushed the results of this evenings experiments if you want to have a play.

    There’s a TextViewKeyEventFilter plugin class in there too. I just did it as an experiment so feel free to go nuts with it.

    I also added a Ted2TextView subclass to call the key event filters, so anything that extends this (only Monkey2TextView right now) will get filtered.

    in reply to: Another modified version of Ted2 #3158

    Mark Sibly
    Keymaster

    Note: I’ve gone for ‘Plugin’ instead of ‘Extension’ because extension still might end up as a keyword, although I suspect not…

    in reply to: Another modified version of Ted2 #3157

    Mark Sibly
    Keymaster

    Actually, here’s an interesting approach…

    As long as your plugin calls ‘AddPlugin’ in it’s ctor, it will automagically appear in it’s Plugin.PluginsOfType() array!

    So to get at all Ted2DocumentType plugins, you call Plugin.PluginsOfType<Ted2DocumentType>(), while to get at *all* plugins you call Plugin.PluginsOfType<Plugin>() (theoretically…).

    Definitely has the ‘cute’ factor and I *think* it’s useful…?

    in reply to: Another modified version of Ted2 #3156

    Mark Sibly
    Keymaster

    I’m definitely keen on making ted2 as expanded as possible – this would help keep the ‘core’ mean and clean.

    Not sure if an ‘uber’ extension class is necessarily a good idea though, as there could be many ‘kinds’ of extension. One thing that’s definitely going in is a ‘Ted2DocumentType’ class, for example (just experimental!)…

    Then, DocumentManager just calls Ted2DocumentType.Create() instead of it’s current select/case block. Just had a quick hack with an AudioDocumentType class…

    With this in place, adding a new document is just a single #import away – which is really one step away from being able to drop in dlls (which I still plan to do eventually).

    Ted2DocumentType could also provide the ability for document types to add their own views to the right/bottom tabviews, eg:

    Method AddBrowserTab( name:String,view:View )  ‘Add a tab+view to the RHS tabview.
    Method AddConsoleTab( name:String,view:View )  ‘Add a tab+view to the BOTTOM tabview.

    The views passed to these tabs could contain things like editing tools for image apps etc. The IDE would automatically hide/show them as documents became current etc.

    There’s also the potential for multiple document types per extension, in which case ‘Open’ would need some kind of ‘Open With’ trickery.

    I do think this should be kept separate from stuff like ‘KeyFilter’ extensions though, even if they do work sort of the same. You want ‘DocumentTypes’ and ‘KeyFilters’ in separate lists in the first place, so there’s not much they have in common at all. Perhaps description/version info?

    Just brainstorming!

    in reply to: Binary and Source wont execute #3155

    Mark Sibly
    Keymaster

    > Perhaps that would be an old OpenGLES version?

    No, mx2 uses angle which uses d3d9/d3d11.

    in reply to: Compiling on Mac OS X #3153

    Mark Sibly
    Keymaster

    Just a did a ‘download zip’ of monkey2-master and rebuild all worked fine.

    It looks like an EOL conversion problem to me – but this shouldn’t happen on Mac!

    Are you using git to get the project? Can you confirm a zip download/.rebuild instead works?

    in reply to: Experimental module manager now online! #3070

    Mark Sibly
    Keymaster

    Not having any such problems here.

    Does a plain ‘update modules’ crash? ‘Rebuild documentation’?

    If you can get other of these to crash outside of module manager (or not) it should be a clue!

    in reply to: Experimental module manager now online! #3051

    Mark Sibly
    Keymaster

    Published – love the little asteroids game too!

    Thanks for renaming it too, although I’m probably just be overly paranoid…

Viewing 15 posts - 1,216 through 1,230 (of 1,431 total)