Michał Czekański
d38b2ff7d5
Use new printToConsole method in Ui class
2020-05-15 23:24:21 +02:00
Michał Czekański
d26703da5b
Add comments in Ui.py
2020-05-15 23:24:21 +02:00
Michał Czekański
6832d41990
Add comments in UiText.py
2020-05-15 23:24:21 +02:00
Michał Czekański
b15382d9bc
Add scroll up and down method in UiConsole class
2020-05-15 23:24:21 +02:00
Michał Czekański
76de35bc3d
Add update method, static buffer, static printing to console method
...
Added static buffer in UiConsole class which stores lines to print. Even if there is no UiConsole object instantiated (cos it's static).
Everything from buffer is being printed on update() calls, update is called every frame.
To add lines to buffer use static printToConsole() method.
2020-05-15 23:24:21 +02:00
Michał Czekański
4e828de1c7
Add type hints for fields and method parameters in UiConsole
2020-05-15 23:24:21 +02:00
Michał Czekański
22355dc960
Add comments to all methods in UiConsole class
2020-05-15 23:24:21 +02:00
Michał Czekański
2cebcd3be6
Fix writeToConsole method
...
This method was adding given string to the console's list of lines, but wasn't displaying this given string.
User had to perform scroll to display this new string.
2020-05-15 23:24:21 +02:00
Michał Czekański
86394ef71b
Add method writing to console
2020-05-15 23:24:21 +02:00
Michał Czekański
7d71333558
Add comments in UiButton.py
2020-05-15 23:24:21 +02:00
Michał Czekański
aab779d4e1
Add comments in UiImage.py
2020-05-15 23:24:21 +02:00
Michał Czekański
08643c7083
Remove unnecessary field in UiBar class
2020-05-15 23:24:21 +02:00
Michał Czekański
9d1ecf5d90
Add comments in UiBar.py
2020-05-15 23:24:21 +02:00
Michał Czekański
bb46f56ace
Add comments in UiElement.py
2020-05-15 23:24:21 +02:00
1610f9c0da
Fixed imports
2020-05-14 14:54:11 +02:00
48e81e206b
Enums refactor
2020-05-13 19:48:08 +02:00
Michał Czekański
69313b0984
Add antialiasing
2020-04-06 15:45:05 +02:00
Michał Czekański
774d186653
Add "s" after printing time alive
2020-04-06 13:51:05 +02:00
Michał Czekański
9d8768cb15
Add method updating console on player's death
2020-04-06 13:41:33 +02:00
Michał Czekański
178115cc4d
Add method updating console on player interaction in Ui and fix bar updating
2020-04-06 13:20:04 +02:00
Michał Czekański
01511757a0
Change console updates
...
Added updateOnPlayerPickup method and modified updateBasedOnPlayerStats so that is used in former method.
Now info is written only on player pickup so that there is no spam.
2020-04-06 13:13:28 +02:00
Michał Czekański
50d8f78ac8
Fix thirst console info print
2020-04-06 01:08:31 +02:00
Michał Czekański
880c0af3c2
Move updating time text view to Ui class
2020-04-06 01:00:02 +02:00
Michał Czekański
ee20ac3214
Add appending time stamps before console lines
2020-04-06 00:55:43 +02:00
Michał Czekański
04898fc27b
Fix console scrolling
2020-04-06 00:45:52 +02:00
Michał Czekański
679cc3f9f4
Add writing to console when player stats change
2020-04-06 00:10:40 +02:00
Michał Czekański
30896285db
Add value field in Bar class
2020-04-06 00:06:19 +02:00
Michał Czekański
932073d72a
Reformat file Ui.py
2020-04-05 23:58:45 +02:00
Michał Czekański
0add2066e2
Add method updating text in UiText
2020-04-05 23:57:28 +02:00
Michał Czekański
0fb5f925d2
Add method updating ui based on player stats
2020-04-05 23:44:31 +02:00
Michał Czekański
c822a1bfd4
Add calculating pos ui elems in Ui.__init__
2020-04-05 22:58:06 +02:00
Michał Czekański
e73fc03fc4
Change how UiText renders text
...
Now UiText renders specified rect surface and on this surface blits text.
2020-04-05 22:37:37 +02:00
Michał Czekański
7f624fe56e
Use colors enum properly in Ui class
2020-04-05 22:16:09 +02:00
Michał Czekański
9ddcec6d73
Add fields for params in __init__ in UiText
2020-04-05 22:15:23 +02:00
Michał Czekański
d6945f2bed
Move up initialization of bar height in Ui class
2020-04-05 21:58:36 +02:00
Michał Czekański
900e8e2203
Add ui fields in Ui class
2020-04-05 21:39:08 +02:00
Michał Czekański
cbb9508c19
Add method addLinesToConsoleAndScrollToDisplayThem in UiConsole
2020-04-05 19:06:15 +02:00
Michał Czekański
8b126f636b
Fix adding functions to invoke in UiButton
2020-04-04 21:37:42 +02:00
Michał Czekański
65c9171428
Fix writing console lines when line ind is too small or too big
2020-04-04 21:37:25 +02:00
Michał Czekański
bf166232f3
Add method addingLines to UiConsole and fix writing on console
2020-04-04 20:49:02 +02:00
Michał Czekański
41b7cd2a3f
Fix font assignment in UiButton and UiText init()
2020-04-04 19:24:47 +02:00
Michał Czekański
3ff1b1b7bc
Add method writing lines on UiConsole
2020-04-04 19:24:04 +02:00
Michał Czekański
e8a961cddd
Fix generating UiConsole image
2020-04-04 18:40:56 +02:00
Michał Czekański
c9e6fac345
Add UiConsole class with __init__
2020-04-04 18:37:18 +02:00
Michał Czekański
b01eaafdc4
Add invoking functions when UiButton click
2020-04-04 18:26:19 +02:00
Michał Czekański
6fc3a3155d
Add button colors parameter, make code clearer in UiButton
2020-04-04 15:48:51 +02:00
Michał Czekański
74a08be69f
Add UiButton class
2020-04-04 02:29:33 +02:00
Michał Czekański
429248c4b5
Add method updating UiBar fill
2020-04-04 01:52:01 +02:00
Michał Czekański
8dd2522b16
Add UiText class
2020-04-04 00:35:40 +02:00
Michał Czekański
5e76932a55
Add UiBar class
2020-04-04 00:35:22 +02:00