impixi

Forum Replies Created

Viewing 15 posts - 31 through 45 (of 100 total)
  • Author
    Posts
  • in reply to: Windows SendInput function #8110

    impixi
    Participant

    Can’t you just use MX2’s built-in event handling mechanisms to generate mouse movement events? Eg:

    [/crayon]
    in reply to: Closing a Window #7833

    impixi
    Participant

    There’s a bug in the Window.BeginFullscreen method. I posted an issue on Github…

    When it’s fixed the following *rough* example should work. It gets your primary display’s supported modes and allows you to switch through them at run time:

    [/crayon]
    in reply to: Four different ways to iterate. #7801

    impixi
    Participant

    @jesse

    Your TestE function is wrong. Hint: it has something to do with your while condition. 😉

    EDIT: Okay here’s a solution (because Lists in MX2 are apparently circular):

    [/crayon]
    in reply to: FileStream #7636

    impixi
    Participant

    On iOS and MacOS, assuming I understand the information in this link:

    https://developer.apple.com/library/content/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html

    Persistent user-specific files like app configuration and save game files should be stored in the user’s Library folder.

    eg:
    Users/Dude/Library/Application Support/TheGame/options.cfg
    Users/Dude/Library/Application Support/TheGame/save001.dat
    etc..

    in reply to: FileStream #7615

    impixi
    Participant

    Try this:

    [/crayon]
    in reply to: stream, binary file #7552

    impixi
    Participant

    Well, that was simpler than I thought. Works on MacOSX, untested on Windows. It pays to poke around monkey2’s source code (I merely copied and modified the DesktopDir function). 😉

    [/crayon]

    EDIT: And it works in place of the DesktopDir() function in my earlier file creation/reading/writing test code. Just remember to import libc..

    in reply to: stream, binary file #7551

    impixi
    Participant

    Actually, it would be nice if I could do this on MacOS X to access/read/write to the user’s Documents directory:

    [/crayon]

    But, alas, it’s not that simple. 😉

    in reply to: stream, binary file #7550

    impixi
    Participant

    I think we need to expose a few additional folders so we can do our file handling in a more “appropriate” manner, ie according to modern expectations.

    Here’s a good link for iOS / MacOS X:

    https://developer.apple.com/library/content/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html

    I don’t have time right now, but later I’ll have a crack at exposing the Documents and Library folders via a wrapper or maybe a modification to std.filesystem (if nobody else does it first).

    I haven’t looked into the other target platforms yet, but the principles are the same IIRC. In any case I need the functionality for Mac OS X and Windows 10, so minimally that’s what I need to get working at some point…

    IIRC Brucey had a “bah.volumes” BlitzMax module that exposed appropriate folders/directories on the various platforms – I wonder if any of that c/c++ native code would be useful for us…

    in reply to: stream, binary file #7537

    impixi
    Participant

    Monkey 2’s file streaming capabilities have some “quirks” depending on the target platform. (eg The “rw” mode is not working for me on MacOS). You’re also limited to the file types you can “#Import”.

    You can, however, create, load and save files at runtime. The location of the created files will depend on the target platform and the chosen target directory.

    Here’s an example that creates, saves and loads one text and one binary file to your desktop (tested on MacOS, might encounter file permission issues on other platforms?)

    [/crayon]
    in reply to: Extracting App view image #7536

    impixi
    Participant

    canvas.CopyPixmap(New Recti(0, 0, canvas.Viewport.Width, canvas.Viewport.Height))

    ?

    example: (press F10 to save capture to your desktop)

    [/crayon]
    in reply to: sort with list #7506

    impixi
    Participant

    Mark just beat me to it, about the ‘<=>’ operator. Anyway, here’s what I whipped up:

    [/crayon]
    in reply to: Node based path-finding #7182

    impixi
    Participant

    I think there’s a node/pathfinding demo in blitzmax!

    samples/aaronkoolen/AStar/astar_demo.bmx?

    EDIT: Removed possibly incorrect info.

    @hezkore: I’m not sure I understand your requirements. Do you want to calculate the most efficient route through a set of given nodes?

    in reply to: Legends of Solitaire TriPeaks – Android #7114

    impixi
    Participant

    Yes, looks great. Any plans for an iOS edition?

    in reply to: Hiding Button Background Color #7113

    impixi
    Participant

    I’m seriously considering writing some comprehensive Mojo/MojoX docs. However, it would be a big job and distract me from my current project… Probably worth it though… We’ll see…

    in reply to: Hiding Button Background Color #7110

    impixi
    Participant

    Here’s a “better” example, doing things “properly”, using only skins this time. Themes should be stored in a “assets/themes” folder along with the relevant skin images. Bizarrely, setting the initial “UP”/default state skin in the theme file isn’t working – I must be missing something obvious. Instead I set the required image as the icon on Button creation. I’ll update this example when/if I figure it out…

    BTW: In this example use “skinColor” if you want to change the button state colors.

    [/crayon]

    Yes, someone needs to document MojoX: it’s actually a very powerful GUI library. Currently you need to poke around the module’s source files (and the TED source code) to figure it out, and that can take ages. 😉

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