PaulCombal / SamRewritten

Steam Achievement Manager For Linux. Rewritten in C++.
GNU General Public License v3.0
340 stars 32 forks source link

Implement Stats GUI and Modifications #54

Closed wgpierce closed 4 years ago

wgpierce commented 4 years ago

Add notebook with tabs for achievements and stats in preparation for adding stats to the GUI Disable overlay scrolling on scrollbars so that grabbing the scrollbar doesn't risk activating a game (and it looks cleaner to me) Remove some placeholders

wgpierce commented 4 years ago

I'll continue to add features to this branch, but I wanted to make sure layout looks fine @PaulCombal.

PaulCombal commented 4 years ago

I didn't expect that at all! I'll check that out tomorrow and let you know!

PaulCombal commented 4 years ago

Nice job! There's a few things I would change though, it was too hard to describe with words so here's a picture: image

Tell me if you agree, I can try to do some of the work if you need me to!

I'm also thinking a refactoring of g_steam wouldn't hurt, those method names are getting messy

wgpierce commented 4 years ago

I'll consider the GUI changes. Making the globals not be globals would be nice too. re: your comments in the picture: Committing stat changes isn't actually hooked up yet. I'm going to do that next. Stat modifications are queued/removed on every keypress currently -- I put a big comment about it in StatBoxRow::on_new_value_changed.

PaulCombal commented 4 years ago

Makes sense. Are you sure there's not an 'onBlur' equivalent for GTK for that? I guess that'd be more appropriate in this case.

wgpierce commented 4 years ago

Committing stats modifications are fully implemented now, so stats are fully functional. I have some more UI/UIX changes to make.

Are you sure there's not an 'onBlur' equivalent for GTK for that?

I don't see GTK having an onBlur signal equivalent. Maybe I'm missing something, but I've looked around all the classes/interfaces GtkEntry extends/implements.

re: tooltip and incremental stats from picture

Incremental could be plumbed through too, yes. Could also use that to restrict user input for changes that would fail, along with the permissions.

About the spin button, what precision would you use for the precision for floats?

I'm ambivalent to increasing the "Achievements" and "Stats" tabs. I like them how they are because it shows they're clearly tabs.

PaulCombal commented 4 years ago

I just had a try, and that works! I think there's still plenty to do on the GUI before merging though. It's ok if the tabs don't take all width, ok. One cool thing I would do would be disabling the tabs while it's loading, and then only disabling the 'Stats' tab if there's no stats. Of course there could be a tooltip saying "No stats for this game". There's also the things I said in my last post but you know that.

Also for the spin buttons I'd always set the precision to 1, but if it's a float display the value like 1.00 (two decimals) as much as possible.

Could also use that to restrict user input for changes that would fail, along with the permissions.

That's be really cool yeah! Like for incrementOnly you can't accept lower values, and the value must be incremented one by one in a loop instead of a simple assignment.

Hopefully I'll have time to give you a hand sometime even though I'm not sure I'll always have free time..

Also after reading the commits, I really think a refactoring would be best for the next step..

wgpierce commented 4 years ago

Spinbuttons, info boxes, invalid stats conversions, stats placeholders, and stat search bar are implemented. I think incrementOnly stats could use some more investigation before implementing them. I think stats is implemented fully enough to merge now. Also I'd like to implement a few other features first, so I'm going to merge this branch if all is ok with you.

PaulCombal commented 4 years ago

I just discovered a small bug about it, some descripttions don't show up as seen in the screenshot. Also, I'm still not satisfied with the looks of it. Is it ok if I move things around in the GUI? image

wgpierce commented 4 years ago

I just discovered a small bug about it, some descripttions don't show up as seen in the screenshot.

Not sure, would have to debug it. Maybe some stats don't have names?

I'm still not satisfied with the looks of it. Is it ok if I move things around in the GUI?

Sure, go ahead. Looks good to me at least :).

PaulCombal commented 4 years ago

I just changed a few things. Is this ok to you?

wgpierce commented 4 years ago

GUI changes are fine. I have a few gripes with other logic changes.

The data.display_name check is a nice fix!

PaulCombal commented 4 years ago

I think I addressed the issues you pointed out, please tell me if I'm wrong of course. Give it a try to test it out if you want!