davewx7 / citadel

A turn based strategy game based on the Anura engine
Other
97 stars 25 forks source link

Several buttons may overflow the login window. #179

Closed ghost closed 6 years ago

ghost commented 6 years ago

The following information reports about the macOS auto updating distribution and self built client:

With auto login activated or without it but after logging in and out, this is the login screen:

screen shot 2017-12-17 at 12 38 32

Everything renders correctly there.

With auto login disabled and before any successful log in, this is the login screen:

screen shot 2017-12-17 at 12 37 37

Note changes between the previous two pictures, at least note different font sizes inside the buttons.

There the Cancel button of the Create Account facility and the Help Logging In button of the Login facility, both overflow the application window (only when not fullscreen) becoming unreadable:

screen shot 2017-12-17 at 12 37 59

Cheers,

ghost commented 6 years ago

The modules/citadel/data/classes/gui#py(1) function is returning incorrect data occasionally because screen_height is insufficiently initialised and set to a wrong value. Dimensions are defaulting to 1024x768 but the correct dimensions are 1152x648. They get set up correctly, but later than the first uses.

Even though the code seems sensible, the screen_height variable is not being effectively set by modules/tbs/data/object_prototypes/login_controller_base#events#create, as the code reads it should.

I have a stashed incomplete workaround by adding modules/citadel/data/classes/gui#py(2) that receives an additional forced screen_height_ to pass by screen_height, and using it from modules/tbs/data/object_prototypes/login_controller_base instead of modules/citadel/data/classes/gui#py(1).

That'd be ugly to commit, and makes a need for some further changes before it can be really doing the right thing.

It's weird because it feels like a variable is not being set as the code reads it should.

ghost commented 6 years ago

Related probable inconsistency.

Possible bug..?

ghost commented 6 years ago

I can reproduce this issue lastly in https://github.com/davewx7/citadel/commit/32196fb9b1e9d6a96e39c62089ad5899c23dfac0 and never again since https://github.com/davewx7/citadel/commit/de6034b22b91004a7ff1793e312189b22b212ec0.