Jump to content

[Early WIP] kOS-Editor


tajampi

Recommended Posts

On 6/3/2016 at 0:30 AM, Steven Mading said:

I noticed your github page doesn't contain the font image PNG file you're using to get the codepage437 symbols.

I was wondering about permission to use it for a test I'm trying to carry out on kOS itself.  I just made a change to support making a drop-in replacement for the font_sml.png file that kOS ships with that would (in principle) let you replace it with any other font image of your choosing provided that you adhered to the following pattern:

...
http://i.imgur.com/vsqfssv.png

Sorry, I was a bit busy yesterday and could not do a thing!

Here is the font I'm using: (I believe it's public domain, 10x10 glyphs)

MTyX1AY.png

(I might modify it so the faces are kerbals ;))

 

That looks awesome by the way!

Edited by tajampi
Link to comment
Share on other sites

6 hours ago, tajampi said:

Sorry, I was a bit busy yesterday and could not do a thing!

Here is the font I'm using: (I believe it's public domain, 10x10 glyphs)

MTyX1AY.png

(I might modify it so the faces are kerbals ;))

 

That looks awesome by the way!

That looks like it could literally be used directly in kOS as-is with the only change being to change the black pixels to transparency pixels.  The layout of the letters in the grid is already exactly correct.

Edit: yes I just tried it and it works as-is with the only edit to the file being to bring it into  GIMP and tell GIMP to turn all black pixels transparent.   It did notice that the font doesn't scale *down* very well, so at the default terminal size of 8x8 it looks patchy and some of the lines in the letters are missing, but when the terminal font is resized to 10x10 or higher, it looks good.

Edited by Steven Mading
added mention that I did try it.
Link to comment
Share on other sites

It's so small at 10x10 that re-scaling it to 8x8 will possibly break everything ;)

I can post a 8x8 font if you want!

 

Also, VGA was broken, it could not manage multiple lines :P

Here is a "demo", but there is some weird issue with pixels being smoothed (I made sure texture filterMode is Point), no idea what's going on:

zQEXW8r.jpg

Link to comment
Share on other sites

It looks like you hit the exact same issue I did in v0.19.1 of kOS.  To prove whether or not this is the case, try changing your graphics texture settings in KSP (the value that has choices "full", "half", "quarter", and "eighth".).  If it only looks right at "full" and looks wrong at all other settings, then you have the same problem I had.

The fix for me was this: when calling the constructor for the Texture2D objects that hold the letter images, set the "mipmap" argument to false.

 

Link to comment
Share on other sites

16 hours ago, Steven Mading said:

It looks like you hit the exact same issue I did in v0.19.1 of kOS.  To prove whether or not this is the case, try changing your graphics texture settings in KSP (the value that has choices "full", "half", "quarter", and "eighth".).  If it only looks right at "full" and looks wrong at all other settings, then you have the same problem I had.

The fix for me was this: when calling the constructor for the Texture2D objects that hold the letter images, set the "mipmap" argument to false.

 

That was it! Thank you :)

 

Also, now the font is 12x12, but I will make sure you can use a custom font, no fixed values anymore!

 

Link to comment
Share on other sites

There's a part of me that wants to replace the outline-smiley-face and filled-smiley-face images at chr(1) and chr(2) with little kerbal icons.

Just because in kOS at the moment, the underline cursor is using chr(1) (which is wrong, I know) and when used with the codepage437 font that turns the cursor into a little happy face.  I'm tempted to not fix it at all, and leave it like that.

 

Link to comment
Share on other sites

Sorry for not updating! I have been working in EngineLight, still trying to get the color of particles :P

 

Working on input now, will update soon!

 

EDIT: I wont use the textinput method but Unity's inputString, which will hopefully solve all my problems!

EDIT2: It works surprisingly well! Took barely 5 minutes to implement,unlike the textinput...

Edited by tajampi
Link to comment
Share on other sites

Uh, i found that by running -popupwindow i can get rid of the problems of alt-tabbing, making this project useless for me...

I may finish it though, can be quite interesting, but with another scope, mostly an individual computer inside KSP, not an editor :)

 

Edited by tajampi
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...