Conversation
| "align": align, | ||
| "offset": [0,0] | ||
| "offset": [0,0], | ||
| "key": None, |
There was a problem hiding this comment.
To be fair I think having an unused "key" property might be a bad idea (as it'd just add more data to a chart and end up never being used), maybe changing the code that handles duplicate might be a better idea
There was a problem hiding this comment.
I've changed the "d" key to only duplicate notes
| calculatedPos = Game.calculatePosition(screenPos, 5, 3, term.width-10, term.height-11) | ||
| if val == "h": | ||
| # erase hitbox | ||
| if val in "hjklHJKL": |
There was a problem hiding this comment.
oh, interesting! again, didn't know that was a thing
| if val.name == "KEY_RIGHT" and self.colorPickerSelectedCol < 3: | ||
| self.colorPickerColor[self.colorPickerSelectedCol] += 1 | ||
| if val.name in ("KEY_RIGHT", "KEY_SRIGHT") and self.colorPickerSelectedCol < 3: | ||
| self.colorPickerColor[self.colorPickerSelectedCol] += {'KEY_RIGHT': 1, 'KEY_SRIGHT': 10}[val.name] |
There was a problem hiding this comment.
oooh, didn't know that {}[] was a thing!
There was a problem hiding this comment.
It's a pattern of "keying" into a dictionary, instead of using if statements.
if a == "1":
result = "2"
elif a == "2":
result = "3"
else:
result = "4"
can be changed to,
result = {"1": 2", "2": "3"}.get(a, "4")
| print_at(calculatedPos[0]-1, calculatedPos[1]+0, f"{term.normal} ") | ||
| print_at(calculatedPos[0]-1, calculatedPos[1]+1, f"{term.normal} ") | ||
| note["screenpos"][0] = min(round(note["screenpos"][0] + 1/(defaultSize[0]-1), 3), 1) | ||
| # calculate new x/y position |
There was a problem hiding this comment.
yeah previously that section was kinda badly written, thanks for rewriting it in a clearer way-
There was a problem hiding this comment.
tbf i actually did that already but i didn't commit it just yet
| displayedValues = [locales[loc]("lang") for loc in locales] | ||
| self.menuOptions[3]["populatedValues"] = localeNames | ||
| self.menuOptions[3]["displayedValues"] = displayedValues | ||
| self.menuOptions[7]["displayedValues"] = layoutNames |
|
ill implement the actual text duplicate afterwards, seems all good to me, thanks! |
print(term.clear)when editing notes, I don't think it is necessary, fixes screen flashing