Internal lua editor: change font to monospace?

  • #1, by LebosteinWednesday, 18. February 2015, 10:09 5 years ago
    It is difficult to write program code with a non monospaced font (especially when you select chars like "i" or something). It is possible to set the font to Courier or similar?

    PS: What about things like:
    - undo in script editor (don't work at the moment)
    - find and replace (not possible)
    - comment/uncomment all selected lines (with right click: comment)
    - autocomplete function (this could be very helpful for newbies and helps to see what is possible)

    Key Killer

    598 Posts


  • #2, by LebosteinThursday, 07. May 2015, 16:18 5 years ago
    Please! Add an option to change the font in the LUA-Editor in Visionaire. This very small, thin and narrow font scared every programmer....

    A saw a cool screenshot from the game "a little less desperation". It seems the developers using an external editor for this reason:

    http://media.indiedb.com/images/games/1/37/36878/alld_dev_screen-4.1.png

    Key Killer

    598 Posts

  • #3, by afrlmeThursday, 07. May 2015, 16:29 5 years ago
    Yes I am using sublime text 3 for all scripting. The plan is to eventually add similar functions as Sublime Text & Github's Atom text editor such as auto-complete, multi-line / multi-word editing, search & replace etc & hopefully a dark & light theme option.

    For now though I recommend using Sublime Text, Atom or even Notepad++ for writing your scripts in.

    Here's a quick tip for you: You can actually include external lua files in Visionaire Studio with a small function, which means you don't actually even after use the built in script / text editor once you add some include scripts / functions to your project... however I do recommend directly pasting in the final version of your scripts to VS as opposed to having them as external files, as they should load faster internally, plus they are more secure from tampering when internally included.

    Please check this wiki page, for more information on how to include external lua script files. Technically it should even be easy enough to update the script to contain a table & for table to iterate through the table, so you don't have to write unique functions for each external file.

    Imperator

    6812 Posts

  • #4, by LebosteinThursday, 07. May 2015, 16:33 5 years ago
    And these external scripts are included when I build an executable? Or is this only a workaround for the development process?

    PS: This seems a very far feature request. For the near future a simple possibility to change the widget font for this editor widget would be great.

    Key Killer

    598 Posts

  • #5, by afrlmeThursday, 07. May 2015, 16:56 5 years ago
    I think the texts & style of the editor is based on your OS & whatever theme you are using? At least that's my understanding of how WxWidgets seems to work. I could be wrong though.

    I think that when Simon manages to eradicate WxWidgets from the editor in a future version that such things will be more customizable, such as choosing fonts, increasing / decreasing font sizes, editor themes etc. But for now I'm afraid you'll just have to deal with it, how it is.

    No the external scripts wouldn't be included. The scripts you used to load them would though, so it would just be a case of adding the external scripts into the same folder / paths they were in before in the compiled game folder. I do recommend not including them externally though because as I said, it's not secure & you would be giving everyone who plays your game access to the script code, which they could then modify, steal &/or claim credit for.

    Imperator

    6812 Posts

  • #6, by LebosteinThursday, 07. May 2015, 17:11 5 years ago
    I have programmed with different gui- and widget-tools in different languages on different os. And it is almost always possible to change the font of a single widget... But I don't know how the WxWidgets works....

    Thanks for the external script info!

    Key Killer

    598 Posts

  • #7, by afrlmeThursday, 07. May 2015, 17:35 5 years ago
    The only thing I can say for sure is that WxWidgets is very limiting in so many ways, which is why the VS devs want to get away from using it.

    Imperator

    6812 Posts

Write post