healeycodes / noter Goto Github PK
View Code? Open in Web Editor NEW๐ A text editor for macOS. Built using the Ebitengine game engine.
Home Page: https://healeycodes.com/making-a-text-editor-with-a-game-engine
License: MIT License
๐ A text editor for macOS. Built using the Ebitengine game engine.
Home Page: https://healeycodes.com/making-a-text-editor-with-a-game-engine
License: MIT License
Hey, I read your blog post on the editor, as Hajime Hoshi shared it on the discord chat. I follow the development of Ebitengine fairly closely, and I wanted to share a few tips and ideas that you may find useful / interesting, even if you are unlikely to implement most of them. Using an issue for this feels a bit wrong, but you can just close it without remorse, no problem, this is only meant to be informative for you or other people that may want to do something similar or take things one step further.
ebiten.DeviceScaleFactor()
into account and applying it on the Layout()
function. While many Ebitengine examples do this, you can also check this article that goes more in depth explaining it. It also touches on LayoutF
, which can be fairly important for an application such as a text editor.ebiten.SetScreenClearedEveryFrame(false)
and avoid doing anything in the Draw()
function unless necessary. This will make a massive difference in power usage, and for an application that's idle most of the time, this is a very big deal. It's still not as efficient as regular GUI frameworks, which skip buffer swaps altogether and often don't have a fixed timestep update loop called regularly, but it's still a massive improvement.Maybe changing to vectorial fonts now is too bothersome, and you are probably doing this only for fun and learning, but wanted to share anyway! Have fun with Ebitengine!
If a non-meta key is held down, repeat it after a time delay.
Default to a delay of 500ms, then the held down key is repeated every 30ms thereafter.
I'm interested in contributing an adaptation of your editor, to make it a library that can be more easily pulled into another Ebitengine application.
Can you add a license to this code, so that it's clearer in how it can be used?
I prefer MIT and BSD-3 Clause myself, as Go is a statically linked language that doesn't play well with mixing in GPL libraries, but of course it's up to you.
Editor.Layout() should return the logical size of the editor, no just echoing back the screen size.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.