Hey

Description: New to wohlsoft.ru? Introduce yourself to the community here.
Moderators: Moderators, Semi-moderatos

Rhubarb M
Topic author, Passerby
Passerby
Avatar
Rhubarb M
Topic author, Passerby
Passerby
Reputation: 0
Posts: 3
Joined: 2 Apr 2024
English Pronouns: he/him
Website

Post #1by Rhubarb » 2 Apr 2024, 17:19

I present myself, I'm Rhubarb, and I'm the owner of mcrhubarb.net, my website where I submit my softwares about SMBX

Image


Image

Image

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 31
Reputation: 512
Posts: 1831
Joined: 15 Feb 2014
English Pronouns: he/him
Location: Moscow, Russia
Website Youtube channel URL Skype Tencent QQ

Post #2by Wohlstand » 5 Apr 2024, 2:51

Hello and welcome!

On a quick hand I reviewed your Tileset Editor, and I want to give some notes:
- Do use the dedicated temp directory instead of absolute "C:/tmp" (for this example, you need to import the "sys" module):

Code: Select all

if sys.platform == 'win32':
    tmp_dir=os.environ.get('TEMP', 'C:/tmp').replace("\\", "/")
else:
    tmp_dir='/tmp'


And everywhere in the code, do use the:

Code: Select all

tmp_dir + '/temporary_filename.png'


Windows has the %TEMP% environment variable that specifies the system-wide temporary files directory. It always exists as if you break it, several software will fail to work. On Linux and other UNIX-like systems the temporary directory is just the "/tmp".

Also, a tip: you may want to make an own sub-directory in the temporary directory to reduce the chance of possible collision with other programs' temporary files.

- Do use layouts instead of absolute positions and sizes of UI elements: on different operating systems and desktop environment, and even depending on the themes, is a different behaviour of UI elements, and even on Windows, something may be broken if, for example, a different theme or DPI was set. Python's Tk is tricky for that case.

So, please use the .pack() or .grid() methods isntead of .place(). Really, your UI would look nicer and more flexible if you will do that :doge:. And actually, grid/pack is easier than manual adjustment of every UI element per pixel. :huaji:

How your UI looks at me when I run it on my system (after applying the temporary directory change of cource):
Снимок экрана от 2024-04-05 02-39-01.png


Anyway, have a good time! I hope, my advices would help you to make things better. :)
Image

Rhubarb M
Topic author, Passerby
Passerby
Avatar
Rhubarb M
Topic author, Passerby
Passerby
Reputation: 0
Posts: 3
Joined: 2 Apr 2024
English Pronouns: he/him
Website

Post #3by Rhubarb » 8 Apr 2024, 12:21

Wow, thank for your reply, and yes I'm gonna check this because I never really used pack and grid so I'm gonna try it out, I remember I had the same problem on my Debian PC, but I thought than people were more gonna use it on Windows since SMBX is more used on Windows than on Linux. I'm probably work on it later because I'm currently working on my website and I'm trying to create an level upload section and a levels section. Thanks for your help :)

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 31
Reputation: 512
Posts: 1831
Joined: 15 Feb 2014
English Pronouns: he/him
Location: Moscow, Russia
Website Youtube channel URL Skype Tencent QQ

Post #4by Wohlstand » 8 Apr 2024, 15:04

Don't forget that here are Moondust Project and TheXTech which are literally crossplatform projects and TheXTech is a branch of SMBX that is fully cross platform, works on Linux, macOS, Android, homebrew consoles, etc.
Image


Return to “Introductions”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest