Hyphen-ated / RebirthItemTracker

Uses the log.txt file to track item pickups in Binding of Isaac: Rebirth.
BSD 2-Clause "Simplified" License
121 stars 26 forks source link

(Attempt to) Implement cross platform options' window positioning #100

Closed viroulep closed 8 years ago

viroulep commented 8 years ago

The first commit fixes the use of a platform-specific object. It's interesting to note that the tracker's position is never saved if you're not running windows (not a very annoying issue though).

The second attempts to fix the window/screen size detection on Linux. The state "zoomed" doesn't exist and causes the tracker to crash. I think an alternative would be to use the "fullscreen" attribute, which exists on both platforms.

After playing around with the different values and functions from tkinter, I found out using update on the window after going fullscreen fucks up the value we get when we switch back. E.g. : after going fullscreen I correctly get my screen resolution (1920x1080), but when switching back I still get 1920x1080 for the window size. Using update_idletasks gives me the correct window size.

Could one please check if that still works as intended under windows ?

viroulep commented 8 years ago

Thanks @sillypears for helping me testing. Turns out that the "fullscreen" attribute didn't work properly on windows :s I updated the PR to use the appropriate trick depending on the platform (ie: no code change from a windows user point of view).