Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add math action to life total counter #364

Open
Blkandwhtlion opened this issue Mar 12, 2018 · 7 comments
Open

Add math action to life total counter #364

Blkandwhtlion opened this issue Mar 12, 2018 · 7 comments

Comments

@Blkandwhtlion
Copy link

First love this app. Best one I have found and been using it for months now as a frequent player. I play mostly multiplayer games and I have frequently hit situations where players combo off and gain insane amounts of life or play cards that double, etc.

Would it be possible to easily add a math option for a total you set. My idea would be to replace the click life total pop up with a checkbox. Default show the current "type amount" text box you have now, but add a checkbox/radio button that says something like "calculate" or "arithmetic" and when check show three text boxes.
Text box 1: defaults to your current life total
Text box 2: Drop down list that contains arithmetic operator: (+,-,*,/)
Text box 3: number to perform on first text box defaulting to blank

User fills in all three boxes and hits ok, window closes and life total of player life selected is the resultant of the arithmetic.

@AEFeinstein
Copy link
Owner

This sounds kind of clunky, and I'm having trouble visualizing it. Could you mock up what you want this to look like?

@Blkandwhtlion
Copy link
Author

Sure thing. I also want to say that the first proposal is not necessarily the only one or the best one allow me to put together some screenshots and link them here. If it still proves clunky I'll rethink my proposal as it may be better suited in a different way.

@Blkandwhtlion
Copy link
Author

Blkandwhtlion commented Apr 2, 2018

Sorry for the delay, I tried elaborating. Here is what you currently see when clicking the lifetotal of a user:
image
The concept is to leverage this screen with addtional features for math operators. So you would see something like this: (Excuse my terrible drawing)
image
So the Operator field would be a drop down in my mind. Giving the user 4 options (radio buttons?) with values of "+", "-", "*", and "/". This would then let the user enter 2 numbers to do an action on and then the resultant of that action would be their new life total.

Let me know if there is anything else that can be made clear on this.

@Blkandwhtlion
Copy link
Author

@AEFeinstein is the clarification enough to at least understand what the request is? I just want to make sure you have what you would need if you were to pick this up.

@AEFeinstein
Copy link
Owner

Yeah, that's clearer. If I get around to this on the to-do list, I know what to do.

@magnus-ISU
Copy link

Just to give some feedback, I think a better option would be to allow typing arbitrary equations into that field. An evaluator should go through after and change it back to a nember when closing that popup.

So '20+8', '32 * 4', '10 + (2*6)', '51/2' should coerce to 28, 128, 32, and 25.

If an equation is invalid, say '10 ++ 6' or '12 nl wnsbk', then it should revert to what was there before.

This just feels like it would be more elegant and expressive to use. If work's already been done in the other direction though, nevermind.

@AEFeinstein
Copy link
Owner

@magnus-ISU, work hasn't been done, and I do like that approach better. There are already libraries that evaluate strings as math, so it shouldn't be terribly difficult for someone to hook it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants