nerobot

Forum Replies Created

Viewing 15 posts - 241 through 255 (of 805 total)
  • Author
    Posts
  • in reply to: One more Extension example #11489

    nerobot
    Participant

    Since v1.1.08 we can get a similar result for some cases with ?.operator :

    _img?.Draw( … ) but it’s overhead in this case.

    in reply to: One more Extension example #11488

    nerobot
    Participant

    It’s a feature of extensions!

    We can write “safe” methods with that. Not only checking for nulls:

    Below is an example app to see Self is Null inside of extension:

    in reply to: One more Extension example #11486

    nerobot
    Participant

    Self can be null inside of extension.

    in reply to: Vectors extensions #11467

    nerobot
    Participant
    in reply to: Ted2Go IDE #11451

    nerobot
    Participant

    I finished working on drag-n-drop inside of project tree.

    Now we can organize our project folder structure without leaving IDE!

    There can be some minor bugs. And need to gain window focus on files dropped…

    Doing that I separated draggable tabs’ logic into own class(es) to re-use it

    for any drag-n-drop stuff. Including project tree.

    New in Project tree:

    • Drag-n-drop for moving files and folders – just hold mouse left button and drag up or down until detach item;
    • Hold Ctrl key to copy item instead of move;
    • Drag-n-drop files / folders from your desktop explorer directly into custom folder in Project tree – to copy items into that folder;
    • If you drop folder into project tree but on empty space – it will be opened as a project;
    • Drop folder outside of project tree now have no effect;
    • Drop files outside of project tree will open them as usual.

    See the GIF below.

    in reply to: Rendering to views in mojox #11414

    nerobot
    Participant

    I’ve got it! 🙂

    in reply to: Rendering to views in mojox #11410

    nerobot
    Participant

    Still haven’t worked out this though: How do I change the font of the menus? I can change the font of other views ok using styles but the same method doesn’t seem to be working for menus.

    minimal style’s part to change menus font.

    in reply to: Vectors extensions #11388

    nerobot
    Participant

    A few helpers for vectors – I started to use them instead of New Vec2_x(...):

    in reply to: Rendering to views in mojox #11374

    nerobot
    Participant

    Maybe add Property PrefferedSize:Vec2i()  as an alternative way to specify view size.

    in reply to: Structs and reflection #11372

    nerobot
    Participant

    and I think a REFLECTION_FILTER equivalent also needs to be added before any of this is truly useful.

    I’m waiting for such filter!:)

    I want to have minimal reflection where each class/interface would have its own instance for Typeof – to have comparison of them, and type should have at least Name property.

    in reply to: Rendering to views in mojox #11371

    nerobot
    Participant

    You can override OnMeasure method for MainView to set its size.

    You can use MinSize and MaxSize to specify bounds. Separately or both.

    Also there is a ContentView property.

    And there is a Layout property. For example Layout=”float” ; Gravity=new vec2f (.5,1) – align view at x-center&y-bottom.

    And you can omit size param of AddView () to use view own size.

    in reply to: How is it going? #11370

    nerobot
    Participant

    New version 1.1.08 is coming soon. You can see what’s new on github in VERSIONS.TXT of develop branch. 😉

    in reply to: Ted2Go IDE #11345

    nerobot
    Participant

    Some new stuff in v2.7 (in dev branch, will be merged into master today)

    • Improved autocompletion for pointer-types.
    • Added -> for dereferencing pointer types (v1.1.08 is coming with that).
    • Added option “Place opened document to the left side” – it helps to use “Close to the right” tabs action for earlier opened tabs.
    • Improved code templates – added dot-prefixes.
    • Restored logic “save all opened tabs before compilation”.

    Code templates

    1. Use Tab or mouse-click to choose template from completion list.
    2. You can add/remove your own templates in Preferences — CodeTemplates section.
    3. Now templates showing in completion even for ‘unknown’ vars (local variables).
    4. Now we can specify ‘where’ to show templates by adding dot-prefixes:
      • Without dots – shows only for single idents like abc
      • Single dot . – shows for any idents: single like abc ; and dot-separated like abc.def
      • Double dot .. – shows only for dot-separated idents like abc.def
    5. Dots are used just for definition not for typing in code.

    Examples

    (^ it’s part of json, internal presentations of templates ^)

    If we typed on a new line adc we can’t see ..adc template in completion because double-dots prefix require instanse.

    But abrakadabra.a shows us adc template in the list, and we can insert AddComponent<>() by pressing Tab.

    .len will work for both len and arr.len cases.

    And each template will work when it typed as a single ident and will don’t work for myVar.each.

     

    It’s useful for me, and you? 🙂

    in reply to: Max Databuffer File Size? #11344

    nerobot
    Participant

    #define with #if 🙂

    in reply to: Chipmunk + TimelineFX #11329

    nerobot
    Participant

    Is there way to disable simulation for custom body?

    I tried to use body.sleep function but got runtime error.

    Will try to temporarily remove body from world.

    EDIT: I found solution.

Viewing 15 posts - 241 through 255 (of 805 total)