degac

Forum Replies Created

Viewing 15 posts - 91 through 105 (of 124 total)
  • Author
    Posts
  • in reply to: code for loading and saving ted21 color palettes #3507

    degac
    Participant

    But… for some really odd reason ToARGB never gave the correct output, so I went with just writing  the direct values instead.

    What does this means? There’s an error in the conversion?

     

    Anyway, as user, I would like to ‘save’ my preferred color (maybe the first 8/16 etc).

    in reply to: code for loading and saving ted21 color palettes #3504

    degac
    Participant

    Ok, understood what is the ‘grid’ 🙂
    It would better if the ‘grid layout’ will be managed automatically, and not based on what is ‘stored’… I mean, I need the colors, not the way they are shown.
    Yes, I admit json is quite a bit ‘redundant’ for low information.
    for a plain text I would use ToARGB and FromARGB method to store colors… it should be faster (in reading/writing I mean).

    in reply to: code for loading and saving ted21 color palettes #3501

    degac
    Participant

    Ok, some (stupid maybe!) questions :D!
    1. what is for the ‘grid’?
    2. why choose a proprietary (even if public) format and not use the .json system – already built in MX2? Considering the possibility to open them directly in TED2?

    in reply to: custom app cursors #3500

    degac
    Participant

    Hi
    again SDL ‘supports’ both pre-coded cursor than user defined one.
    MX2 source code has some references – Struct SDL_CURSOR,SDL_SYSTEM_CURSOR, the external function to create on-the-way via UTF8String a cursor – SDL_CreateCursor:SDL_Cursor Ptr(data_:Utf8String,mask_:Utf8String,w_:Int,h_:Int,hot_x_:Int,hot_y_:Int) – and so on.
    It will be useful to have the possibility to change the cursor – using the default alternative (ARROW, WAIT, HAND etc…)
    I think it’s better Mark decides (or asks) what put/change/add in these core modules.

    https://wiki.libsdl.org/SDL_CreateCursor

    ps: I suppose Emscripten handles this (and other things like Events) in a different way. Not really clear at the moment…

    in reply to: Drag and drop? #3471

    degac
    Participant

    I know (and found in module source) that SDL has an event SDL_DropEvent but not sure if this is implemented/used in MX2 (its defined so I imagine that can be catched).

     

    edit:

    tested using the SDL example, just adding in Select..End Select

    Case SDL_DROPFILE
    Print “Event dropfile”

    edit2:

    looking at the event.monkey2 source it seems that SDL_DROP is not implemented (or maybe I’ve looked in the wrong place! – there are only key, windows and mouse events)

    it seems to works

    in reply to: MX2- keyword 'friend' #3461

    degac
    Participant

    Thanks,

    So – if ever implemented & like the C language – is a way to allow another class to access the ‘private/protected’ part of another one: it’s a sort of ‘authorization’.

    Considering the stackoverflow’s example, If you write a ‘base’ class and don’t specify what are ‘your’ friends immediately, you need – in future – to change the base every time you would like to access the protected things.

    With this logic, make everything private, and add – then- only the sub-classes authorized.

    In a ‘public’ project (where different heads have different visions) this approach is very limiting.
    Honestly, I don’t like very much the ‘private’ thing at all (or the need to make a method Overridden in the main class!), this feature is just another complication in code design to me!

    Thanks anyway!

    in reply to: Ted2: Experimental Plugin System #3459

    degac
    Participant

    @cocon: nice!

    in reply to: Ted21 progress #3365

    degac
    Participant

    Ok, as usual I’ve done some mess on GitHub (if I don’t something strange is not a normal day…).

    In any way – following an user comment about the possibile need to save .txt .json etc file directly from TED2 I changed my update (… and I messed up things on GitHub :/)

    I’ve added a sort of pre-checking. If the path name doesn’t have any ‘valid’ TED2 extensions, it will be added .monkey2

    And in the module OnSave, OnSaveAs, OnSaveAll I’ve added (after If Not Path Return)

     

    Some considerations:

    • I considered these as ‘valid’ extension simply because I found them in TED2 source (somewhere, when loading)
    • I would prefer to have these parameters  stored ted2.state.json – but at the moment it’s just to resolve the main problem
    in reply to: mojox – experimental widget #3346

    degac
    Participant

    Wow, very clean & much more readable!

    I’m not used to Property/Setter … same result but in a more ‘human logic’ way!
    And I discovered Clamp() too!

    I have something new to study now (Style)!

    in reply to: OOP – hierarchy & property #3340

    degac
    Participant

    Damn! I just discovered this right now!!!! Tooo late, thanks anyway!

    (Looking at the source code it start with Class TreeView… and then it has an inner Class Node – I didn’t noticed, so I presumed that the Properties were for TreeView class)

    in reply to: Ted21 progress #3330

    degac
    Participant

    Ok. I started with the ‘original’ Ted2 source (sorry, but the source is already here without download anything!)

    I suppose this ‘piece’ of code is still the same even in your version 🙂

    I changed fileactions.monkey2

    These are ONLY the methods I changed (OnSave, OnSaveAs, OnSaveAll).

    I’ve added a simple check about the presence of ‘.monkey2’ string in Path, otherwise it will be added.

    No check if there’s any other extension on it (I would like to use myname.001 as numbering version…)

     

    I’m trying to ‘push’ this change in the GitHub repository, but it seems I need to ‘fork’ an entire project ? It seems quite useless…

    in reply to: Ted21 progress #3325

    degac
    Participant

    Perfect, thanks!

    in reply to: Little mojox example – calculator #3323

    degac
    Participant

    Ok, I understood.

    I still have no explored deep the ‘key’ event, but I’m quite sure the ‘key’ is just the button pressed on the keyboard…

    Looking at the code & manual there’s a field TEXT in the keyevent returned that should have the ‘ascii character’ pressed I suppose!

    I just tested and if I press the ‘1’ key (on the mainboard) I got (many… depends on my pressure) ‘1’.

    If I try to press SHIFT+1 (to print !) I got both SHIF LEFT and 1 …

    I looked and mojo/input has a class KeyboardDevice… it should what needed.

    I have to investigate

    ps: it’s not an ‘error’ of MX2, it’s due to the different keyboard layout (and notebook are different again!)

    in reply to: Ted21 progress #3318

    degac
    Participant

    @adamstrange

    There are 3 things I would like to change in Ted.

    1. hiding monkey2 extension in the treeview (its’ annoying, and the icon should be enough)
    2. hiding .vbuilXXX folder – they are not very useful
    3. auto .monkey2 extension when saving (I’m quite sure you already did this at the start!)

    Of course 1+2 should be something optional, and maybe a new voice in the contextual menu in the treeview – now it has New File, New Folder, Delete – like ‘Show All Folder’

     

    ps: where I can download the source of your Ted2 (ASted?)

    Thanks!

    in reply to: MojoX Placement/Sizing Code #3314

    degac
    Participant

    Thanks, now it’s clear why I got zero! The ‘real’ size is calculated after the layout… quite logic!

    I’m trying to understand (well) how mojox works: the idea is to implement some gadgets (well, proxygadgets) I did/use on Bmax (ie: FilePicker, DatePicker, Calendar etc)

Viewing 15 posts - 91 through 105 (of 124 total)