Hezkore

Forum Replies Created

Viewing 15 posts - 31 through 45 (of 367 total)
  • Author
    Posts
  • in reply to: m2irc – IRC module #13414

    Hezkore
    Participant

    Yeah… I have a few modules that could go into the user module section I suppose.

    I can hardly even remember to update the GitHub repos for everything though.
    I also have to update my server backup that compiles everything for me.

    Those are still automatic processes though that I just have to trigger, so sometimes I do remember it heh!
    So the problem, for me at least, is that “User Module” uploads are a very manual process, and I update my stuff quite often. At least at this stage in development.

    But I can upload them at some point.
    Or feel free to do it yourself, but remember that I update often! 🙂

    in reply to: getc/fread change to character-at-a-time #13412

    Hezkore
    Participant

    Ah right you are Simon, thanks!

    Getting it to work on Windows was easy.
    And with a bit of work I’ve managed to get it working on Linux as well.

    in reply to: m2conio – Console I/O module #13401

    Hezkore
    Participant

    Big Linux commit pushed.
    Works a lot better now!

    Underline has returned as well.

    All special features via Ansi codes have been moved into the Ansi structure.
    All Console struct functions are safe to use, and the Ansi struct functions should only be used if Ansi.Supported returns true.

    in reply to: Console terminal sequences #13400

    Hezkore
    Participant

    Alright, I seem to have gotten it working.
    Thanks everyone! 🙂

    Legacy Console in general doesn’t seem to be able to display colors. (correct me if I’m wrong)
    And the not-legacy console CAN show colors, but it has to be enabled via the function I posted above.
    In older Windows 10 version it was enabled by default, but not any more.

    I’m removing the code so it doesn’t cause any confusion!
    It’ll be part of my m2libcext module.

    in reply to: Console terminal sequences #13387

    Hezkore
    Participant

    Hmm even with Legacy Console mode off I can’t get it to work heh.
    Nothing seems to work…

    And this updated code with your fixes doesn’t work either:
    REMOVED

    Not in “normal” nor Legacy console.
    Can’t figure out what I’m doing wrong…

    in reply to: Console terminal sequences #13378

    Hezkore
    Participant
    in reply to: m2libui – Libui wrapper (Cross-Platform Native UI) #13367

    Hezkore
    Participant

    @cocon It’s fine, I’m using the manifest files and it’s working on both x86 and x64 Windows.
    They make sure the visual themes are applied.

     

    The newest commit has (I believe) all gadgets wrapped.
    And I’ve fixed a lot of the old issues.

    There are some issues left that I’d like to try and solve now.
    One is uiTabAppend crashing.
    And also uiFontButton along with uiColorButton crashing the app when clicked.

    Other than that, I think things are mostly working as intended.

    Perhaps I’ll try and wrap the drawing methods at some point.
    Which lets you draw 2D stuff to the “Area” control.

    in reply to: m2irc – IRC module #13359

    Hezkore
    Participant

    You can throw it anywhere for now @Diffrenzy
    I’ll make a proper documented module of it at some point heh.

     

    And about the game…

    You COULD make a turn based multiplayer game, sure.
    It’s just text. 🙂
    But since the only kind of identification on IRC is the nickname, it means that they could probably cheat by just logging into IRC via a standard IRC client using the same nickname and send messages from there.
    In fact if the nickname wasn’t registered, anyone could sign in with it and mess things up.

    Only one person can use a nickname at the same time from one client, so if it’s in use it’s “safe”.
    But I’m guessing the idea would be that they could basically turn the game off and come back later and continue?
    If it’s a game that ends when a client quits, then it could work, yes.

    You’d have to make sure that the clients connects to the same server though, because “net splits” can happen on networks from time to time.
    Which basically means that a server loses connection to the bigger network for a short while.

    So for example ‘chat.freenode.net’ is a network for open source projects (Freenode where #monkey2 is) and you can connect to that and be assigned a server based on your location, and there are lots of servers all around the world and they all connect to the main network.
    In the end, every user can all talk to each other (even if they’re on different servers) because the servers all talk to each other via the network.
    But at some point one of the servers could lose connection to the network and they’d be separate from everyone else for a little while.

    But that’s easy to work around.
    If you just connect the clients to the same server, for example ‘sinisalo.freenode.net’ which is a Freenode server in Sweden, they’d be together during net splits.

    in reply to: Monkey 3d dead #13341

    Hezkore
    Participant

    Can’ tell if you’re joking or being serious heh.

    Last update to Mojo3D was 4 days ago.
    “Added vertex colors to mojo3d + Entity.Color for modulating material colors (if supported by shader etc).”

    Update after that was 5 days ago.
    And the app template for Mojo3D was updated 6 days ago.

    The first example for Mojo3D was added 4 days ago as well.

    I made my IRC module back in early 2017.
    I didn’t work on it all year, but I’ve worked on it now, so it’s not dead.
    Mark’s been away for barely 4 days, and that makes Mojo3D dead? heh

    in reply to: m2libui – Libui wrapper (Cross-Platform Native UI) #13338

    Hezkore
    Participant

    The EnableVisualStyles() function seems perfect!
    But I can’t really figure out how to add it to M2…

    “system” seems to be what it’s included in.
    But how do I get that into M2?

     

    But I’ve managed to get the manifest files to work.
    Compiled one for x86 and one for x64 so we should be okay with those.

    I’ve updated the source code as well.

    in reply to: m2irc – IRC module #13335

    Hezkore
    Participant

    Heh thanks. 🙂

    An early version of this that I wrote last year is still inside Ted2Go, it’s what it used for the “Chat” tab.
    I’ve since rewritten it, and I plan on redoing some part of this as well later on.
    But I figured I’d share what I’ve got so far as it’s likely to be backwards compatible anyways.

    A few more modules are on the way.

    in reply to: m2stp – Simple text processing module #13334

    Hezkore
    Participant

    @cocon hmm I’m not sure what you mean.
    You can not load a .txt or any other external files and have Monkey2 process them in real time with any of the standard libs.
    Because there’s no library in Monkey2 that handles string processing outside of the compiling process.
    Monkey2 only does stuff when compiling, this module does it in real-time.

    The idea is that you’d write your little “script” in something like “myScript.txt” and then load that into Monkey2.
    Then if the user don’t like how the script acts, they could change it! 🙂
    And they wouldn’t have to recompile the entire thing, in fact they don’t even need the source code.
    They just need the little script.

    So in Ted2Go for the output/product folder, right now I’d have to recompile the entire Ted2Go project to change that.
    But if it used this module, the user could change that without even restarting Ted2Go.

    I’ve added “Test4” to show this better.

    On another topic.
    I’ve moved this thread to the Code Library instead.

    in reply to: m2libui – Libui wrapper (Cross-Platform Native UI) #13329

    Hezkore
    Participant

    I tried this on MinGW, and it complained about some missing functions, like “RemoveWindowSubclass”
    I went ahead and looked those up and they seemed to be apart of “Comctl32.lib”
    So I added #Import "<libcomctl32.a>" and it does compile but when launched I get this error dialog:
    “The procedure entry point TaskDialog could not be located in the dynamic link library G:\code\monkey2\m2libui\src\m2libui.products\Windows\M2libui.exe.”

    I’m guessing it’s because Monkey2 uses 32bit MinGW?
    Or maybe it’s cause the wrong “Comctl32” is being used, as there seems to be multiple versions?

    I’ve also tried compiling this on Linux, but get:
    libui-master/unix/uipriv_unix.h:6:21: fatal error: gtk/gtk.h: No such file or directory
    #include <gtk/gtk.h>

    I tried “sudo apt install libgtk-3-dev” (and libgtk2.0-dev) but same error.

    in reply to: m2libui – Libui wrapper (Cross-Platform Native UI) #13328

    Hezkore
    Participant

    Mark saves the day!
    It now compiles with Monkey and as a static library, so no DLL 🙂

    I’ve updated GitHub and the compiled example.
    A new problem has arisen though!
    The “modern” theme in Windows 10 isn’t being applied.

    This is how it looks now:

    This is how it looked with the DLL:

    I’ve Googled the issue and it appears there needs to be a manifest file.
    Looking into the issue…

    in reply to: m2libui – Libui wrapper (Cross-Platform Native UI) #13324

    Hezkore
    Participant

    Okay new info, but no progress sadly.

    Turns out you can compile libui into a static library.
    Which means there’s no need for a DLL, at the price of a slightly larger executable.
    I’ve tried doing it with MinGW-W64 and it does output a “.a” file.
    But importing it to Monkey2 doesn’t seem to work – https://pastebin.com/raw/iWH5bXVT
    For anyone wanting to do this, the process is:

    1. Grab libui
    2. Create a “build” folder in the libui root folder
    3. Make sure you’ve got MinGW-W64 installed
    4. Open CMD in your “build” folder and call cmake -DBUILD_SHARED_LIBS=OFF -G "MinGW Makefiles" ..
      (the -DBUILD_SHARED_LIBS=OFF line is what gets rid of the DLL)
    5. Then from CMD in the “build” folder again, call mingw32-make
      (you can call mingw32-make -j <number of CPU cores/threads> to compile faster)
    6. If everything went as it should, the “build/out” folder should now have some new files in it
      If not, continue to step 7
    7. It seems the code isn’t made for cmake to output for mingw (atleast not for my version), but you can just edit line 75 in “windows/CMakeLists.txt” to read resources.rc.obj instead of resources.rc.*
      Then just clear out your “build” folder and start from step 4 again

    I’ve also tried to make cmake output for MSVC (and 64bit in my case) as a static library.
    It seems to fail (says success 2 failed 1), and the error message is just garbage, but there’s a “.lib” and “.pbd” file output anyways.
    Tried importing the “.lib” to M2 but fails…
    Steps for that were:

    1. Grab libui
    2. Create a “build” folder in the libui root folder
    3. Make sure you’ve got MSVC 2017 installed
    4. Open CMD in your “build” folder and call cmake -DBUILD_SHARED_LIBS=OFF -G "Visual Studio 15 2017 Win64" ..
      (the -DBUILD_SHARED_LIBS=OFF line is what gets rid of the DLL)
    5. Open “ALL_BUILD.vcxproj” in your “build” folder
    6. Then I just right click the “ALL_BUILD” item in the solution explorer and select “Build”

    No matter what, I can’t get it to work as a static library.
    So I guess we’ll have to stick with the DLL for now?
    To compile the DLL, I just did the previous steps for MSVC but without “-DBUILD_SHARED_LIBS=OFF” with cmake.
    I’ve tried to get MinGW to output the DLL as well, but there’s an actual error saying libui doesn’t do that with MinGW right now, so you’ll have to use MSVC.

    That also means that this will only compile if you’re using M2 with MSVC! (which you should be anyways)

    And @cocon, doing something like Class uiControl Extends Void="const uiControl" does work.
    BUT! It makes things unable to be cast into other things.
    For example I’ve now got Class uiControl Extends Void="const uiControl" and Class uiWindow Extends Void="const uiWindow"
    uiWindow is really just extending uiControl in the C code, so I should be able to do things like uiControlShow( uiControl ) and put my window there, even though it’s a “uiWindow” and it wants a “uiControl”
    And that works with my old method of just extending it, but doing this new Extends Void="const uiWindow" method it tells me it can’t cast “uiWindow” into a “uiControl”
    So I’m reverting back to what I’ve got on GitHub.
    Still some casting issues with that (can only cast “down”?) like “uiControl” can’t seem to be cast into “uiWindow”
    But at least “uiWindow” can be cast down to “uiControl”

    So in the end, no progress has really been made.

Viewing 15 posts - 31 through 45 (of 367 total)