sub project of the animal crossing project to handle csv files using raylib and raygui
Screenshot as at 22/01/23
08:36AM
show / hide
===== ===== ===== ===== =====
- Required folders (to get the project to work):
~/build/
~/external/
~/resources/
----- ----- ----- ----- -----
- Required sub projects:
~/external/raygui-3.2
(source)~/external/raylib-4.2.0
(source)
----- ----- ----- ----- -----
- Repository currently setup for environment (other environments untested):
Macbook pro 15in.
---[2019]
macOS Big Sur
---[11.7.2]
VS Code
---[1.74.3]
cpptools extension
---[1.13.9]
- ***Plans to increase useability on other platforms is hindered by my current skill level using cmake***
----- ----- ----- ----- -----
- Notes:
- Currently this project's
cmake
does not auto fetchraylib
/raygui
content - As at
22/1/23
07:59AM
, raygui functionality isn't used except forCorbGrid
'sdraw()
to make the outline/background and the code fromCorbCell
'sdraw()
can be used in its place
- Currently this project's
----- ----- ----- ----- -----
===== ===== ===== ===== =====
show / hide
[from source project README.md relating to this code]
-
[ show / hide ]
[24/12/22]
---> ported readme fromcpp_newer_modeller
(private repo at the time)show / hide
===== ===== ===== ===== =====
[12:27am]
---> started working on cmake handling of raylib and raygui[03:25am]
--->mygiveupjarjar.gif
no more pre-fetching the packages for now, just download them myself yemstve, we goto the store first bc need a break or brain will break[04:55am]
---> we got it working with cmake and provided libraries===== ===== ===== ===== =====
[25/12/22] to [28/12/22][07:03pm]
---> CSV file reader handle added which took some effort and planning but was constructed really haphazardly so maybe need revisiting[28/12/22]
---> additional changes after finishing CSV file readershow / hide
===== ===== ===== ===== =====
[07:03pm]
---> added include statement forCSVRead.hpp
[07:03pm]
---> will need a list of the CSV files and then can begin working on something to search them for similarities===== ===== ===== ===== =====
[30/12/22]
---> setting up data handlesshow / hide
===== ===== ===== ===== =====
[07:34pm]
---> added in stubs for data handle and ideas as comments===== ===== ===== ===== =====
[31/12/22]
---> we making a spreadsheet thingershow / hide
===== ===== ===== ===== =====
[01:12pm]
---> we start the structure i guess[03:10pm]
---> eyes glazed over from this tutorial, so stopped trying to library in cmake for now, just hardcoding it:----- ----- ----- ----- -----
[04:17pm]
---> added in some stubs forCorbSheet
, which will have:CorbCell
: holds our drawn content for valuesCorbGrid
: holds ourCorbCell
instancesCorbSheet
: project specialisedClient
class
[04:19pm]
---> still need to add in code for handling csv data and putting it into our grid===== ===== ===== ===== =====
[01/01/23]
---> cleaning upCSVRead
errorsshow / hide
===== ===== ===== ===== =====
[12:07pm]
---> fixed up issue with signature ofCSV::getTokenList
not having correct parameters for both definition and declaration[12:07pm]
---> movedstatic
methods ofCSV::Handler
to namespace scope[12:07pm]
---> fixed issue withCSV::getFilestreamLines
not keeping the reference of theifstream
parameter by changing to pass by address[12:07pm]
---> changedCSV::getTokenList
to havecurrChar
as string, and cleaned up the conditionals relating to it----- ----- ----- ----- -----
[01:03pm]
---> completedMain.cpp::getTableObjects
[01:07pm]
---> began work onMain.cpp::getTableHeaderLists
----- ----- ----- ----- -----
[01:20pm]
---> updatedCSV::Handler::get
to usecol/row
instead ofx/y
[01:23pm]
---> finishedMain.cpp::getTableHeaderLists
----- ----- ----- ----- -----
[01:35pm]
---> added inMain.cpp::listHasItem
for searching a list for an exact match to a string[01:42pm]
---> completed definition ofMain.cpp::getUniqueFieldsList
[02:05pm]
---> completed definition ofMain.cpp::getTablesContainingFieldList
----- ----- ----- ----- -----
[02:54pm]
---> completed construction of code including testing code inMain.cpp::main
[03:26pm]
---> fixed issue inCSV::Handle::process()
[03:48pm]
---> fixedCSV::getTokenStackAsString
andCSV::getCSVTokenList
not correctly accessing chars/strings----- ----- ----- ----- -----
[03:57pm]
---> added code toCSV::Handler::process()
to tidy up incomplete rows----- ----- ----- ----- -----
[04:07pm]
---> currently code runs and works, but to have the output/dump for fields or tables you need to defineDUMP_ALL_TABLE_DATA
for tables, andDUMP_ALL_FIELD_DATA
for fields===== ===== ===== ===== =====
[05/01/23]
---> declaration and definitions of theCorbSheet
stuffshow / hide
===== ===== ===== ===== =====
[02:55pm]
---> finished basic declarations for theCorbSheet
situation[03:00pm]
---> cleaned up the./Main.cpp
to use preprocessor definitions for choosing what code is run----- ----- ----- ----- -----
[03:06pm]
---> added in some code to use theCorbSheet
code as part ofMain.cpp::appHandle()
----- ----- ----- ----- -----
[03:16pm]
---> modified cell draw structure to use more raygui functions and provided a non raygui implementation commented out[03:16pm]
---> setup the CSV processing code to be used based on preprocessor value to speed up testing of the GUI code----- ----- ----- ----- -----
[03:23pm]
---> completed the implementation of basicCorbSheet
and verified that it is working as intended, however the text size is too large and the cells are too small----- ----- ----- ----- -----
[03:36pm]
---> added some tasks to./docs/README.md
tasks section[04:11pm]
---> completed merging stale branch structure back to main branch in github repositiory===== ===== ===== ===== =====
[10/01/23]
---> improvements and changes toCorbSheet
/CorbTable
show / hide
===== ===== ===== ===== =====
[01:03pm]
---> added in some documentation toREADME.md
for contained sub projects[01:03pm]
---> hypothesized a change to the name of our library for handling the data[01:11pm]
---> added a summary of written ideas to the ideas section ofREADME.md
===== ===== ===== ===== =====
-
[13/01/23]
---> port fromcpp_csv_handle
show / hide
===== ===== ===== ===== =====
[11:57am]
---> completed restructure of notices section ofREADME.md
and copied across some of the file structur[12:09pm]
---> completed porting of files and cmake configure----- ----- ----- ----- -----
[02:53pm]
---> began refactoring theCorbSheet.hpp
to use our new formatting----- ----- ----- ----- -----
[05:23pm]
---> changed theCorbGrid
to no longer using a cell instance[05:23pm]
---> added in a task for suggested cell data handle holding references to the col/row===== ===== ===== ===== =====
[14/01/23]
---> minor changesshow / hide
===== ===== ===== ===== =====
[04:10am]
---> fixed bug in cell drawing where they werent offset by grid view space position[01:14pm]
---> removed some of the TODO statements inCorbCell
[01:14pm]
---> changed the window title to be correct for current project----- ----- ----- ----- -----
[01:17pm]
---> changedREADME.md
to strikethrough the tasks complete----- ----- ----- ----- -----
[01:32pm]
---> added inRefSpace
which is a copy ofraylib
'sRectangle
structure but takes references[01:32pm]
---> prepared directory for initial repository push to track further changes during spelling correction/refactoring to have cell use references----- ----- ----- ----- -----
[02:04pm]
---> added a testing section to./Main.cpp
[03:07pm]
---> provided some tested data for address containers in./Main.cpp
===== ===== ===== ===== =====
[16/01/23]
---> reimplementing theCorbCell
objectsshow / hide
===== ===== ===== ===== =====
[01:51pm]
---> restructuredCorbCell
to use a shared reference member for position/size based on col/row[01:51pm]
---> restructuredCorbCell
draw method to useraylib
methods so each cell isnt required to have a rectangle member===== ===== ===== ===== =====
[17/01/23]
---> changes on this dayshow / hide
===== ===== ===== ===== =====
[11:52am]
---> changed some minor things inREADME.md
[12:15pm]
---> added in containers for color/border size/text size to the cell objects----- ----- ----- ----- -----
[01:16pm]
---> changed over to having variable and offsetting the drawing of cells correctly (not including grid border size)----- ----- ----- ----- -----
[02:27pm]
---> removed defunct overloading of grid's draw method[02:27pm]
---> provided functionality for mouse hovering and mouse selection and made the position provided to grid as relative to the view space----- ----- ----- ----- -----
[00:00pm]
--->[00:00pm]
--->===== ===== ===== ===== =====
[18/01/23]
---> changes on this dayshow / hide
===== ===== ===== ===== =====
[12:12pm]
---> cleaned upREADME.md
----- ----- ----- ----- -----
[12:26pm]
---> added inborderSize
data member toCorbGrid
[12:26pm]
---> added inColor
data members for the fill/border/hovered borders[12:26pm]
---> included the border in the draw position of each cell[12:26pm]
---> resolved error where it was removing the border offset on draw by not including it in the provided offset[12:28pm]
---> after reveiwing changes, notice that border size doesnt need to be included in cell position----- ----- ----- ----- -----
[12:31pm]
---> as per previous note, removed the border size addition from each cell's position----- ----- ----- ----- -----
[02:05pm]
---> modified the mouse handoff fromCorbSheet
toCorbGrid
so that the offset is handled by the grid----- ----- ----- ----- -----
[00:00pm]
--->[00:00pm]
--->----- ----- ----- ----- -----
[00:00pm]
--->[00:00pm]
--->===== ===== ===== ===== =====
[18/01/23]
---> changes on this dayshow / hide
===== ===== ===== ===== =====
[11:53am]
---> updated thegetCell
in theCorbGrid
so it's using the new cell format[11:53am]
---> removed thecellVals
list from grid, as it's defunct[11:56am]
---> addedgetText
toCorbGrid
[11:56am]
---> removed old todo statements and code fromCorbGrid
that is no longer used----- ----- ----- ----- -----
[00:00pm]
--->[00:00pm]
--->===== ===== ===== ===== =====
[22/01/23]
---> changes on this dayshow / hide
===== ===== ===== ===== =====
[08:10am]
---> updated the "useful to user" section of~/docs/README.md
to reflect this repository----- ----- ----- ----- -----
[08:35am]
---> fixed extra qualifier in theCorbGrid
'sgetText
member function[08:35am]
---> added screenshot toREADME.md
----- ----- ----- ----- -----
[00:00pm]
--->[00:00pm]
--->===== ===== ===== ===== =====
show / hide
show / hide
===== ===== ===== ===== =====
[from source project README.md relating to this code]
-
[ show / hide ]
[10/01/23][01:05pm]
---> change to the structure of ourCorbSheet
code:has offset for position of drawing pixels- uses drawable structure from other projects
calculates a cell's position and size when the table is loaded- change to file formatting
- use some sort of seperator for each table contained in a file including table name
- maybe also include the table sizing in that header
- have a line that says the character limit of each column after the column names
- modularise the concept of the table for the different parts?
- have the header row as seperately stored to the table entries
- each cell is given the data that it draws by the table? when we do concurrent stuff
- have a cell as just a structure for relative position and size
-
----- ----- ----- ----- -----
[13/01/23][05:28pm]
--->change the cell structure to be holding references for positioning, where the references are to data held in grid shared for a column or a row----- ----- ----- ----- -----
[00/01/23][00:00xx]
--->[00/01/23][00:00xx]
--->----- ----- ----- ----- -----
[00/01/23][00:00xx]
--->[00/01/23][00:00xx]
--->===== ===== ===== ===== =====
show / hide
===== ===== ===== ===== =====
[from source project README.md relating to this code]
-
[ show / hide ]
[05/01/23][03:27pm]
---> add in some more functionality toCorbSheet
[ show / hide ]
CorbCell
member variables for:- hover color
- background/border color
- text color
CorbGrid
member variables for:- hover col/row index
- background/border color
colWidthPx
as a list
CorbSheet
code handle for:veiwing col/row index and veiwing col/row count code- mouse position translation to viewing row/col index
- data handle inputing into the grid instance from 2D list of strings
-
----- ----- ----- ----- -----
[13/01/23][02:53pm]
--->CorbGrid
--->change column size and row size to list[13/01/23][02:53pm]
--->CorbGrid
--->add in the position vars as list for col and row[13/01/23][02:53pm]
--->CorbGrid
--->add in 2D vector of strings[13/01/23][02:53pm]
--->CorbGrid
--->change draw to using the new available values instead of theCorbCell
instances----- ----- ----- ----- -----
[13/01/23][03:56pm]
--->CorbGrid
--->have the veiwing things calculated as asking if they're inside the veiwing space----- ----- ----- ----- -----
[16/01/23][01:05pm]
--->CorbCell
--->using the float address containers for shared memory by column/row----- ----- ----- ----- -----
[18/01/23][12:33pm]
---> need to restructure mouse position and veiw size calculations to not need to happen as often[18/01/23][12:33pm]
---> having a calculation for if the mouse is close to a border of a cell[18/01/23][12:35pm]
---> some method of selecting a cell in the grid or an array of cells in the grid[18/01/23][12:35pm]
---> a handle for writing to a file the csv information- can use O(2N) by having it add each character to the string
- then check off if they found a comma in the token at all
- once the line is done, sending the whole line to the file
[00/01/23][00:00xx]
--->----- ----- ----- ----- -----
[00/01/23][00:00xx]
--->[00/01/23][00:00xx]
--->----- ----- ----- ----- -----
[00/01/23][00:00xx]
--->[00/01/23][00:00xx]
--->----- ----- ----- ----- -----
[14/01/23][01:19pm]
--->[cpp_csv_handler]
---> get cmake to treat our code sections as static libraries correctly===== ===== ===== ===== =====
show / hide
===== ===== ===== ===== =====
[14/01/23][01:36pm]
---> cell drawing isnt inside the border of the grid due to border going inwards from boundary pixels[14/01/23][01:36pm]
---> text in cell is too far to the left[14/01/23][01:36pm]
---> text in cell isnt properly shortened to the cell size- ( font isnt monospace so would need to be calculated from each font's glyph size )
[14/01/23][01:36pm]
---> currently cell isnt its own instance to improve code speed but should be used with references to shared data fields in column/row[16/01/23][01:13pm]
---> cell also doesnt share the memory for column index or row index----- ----- ----- ----- -----
[14/01/23][01:42pm]
---> border is a magic number for cells and grid[14/01/23][01:42pm]
---> no color storage for any ui elements, using magic color values----- ----- ----- ----- -----
[14/01/23][01:42pm]
---> incorrect spelling of "view" throughout the project as "veiw"[14/01/23][01:42pm]
---> old TODO statements in code that should be updated----- ----- ----- ----- -----
[14/01/23][01:42pm]
---> no mouse tracking----- ----- ----- ----- -----
[16/01/23][01:51pm]
---> draws cells from top left without offsetting by grid position----- ----- ----- ----- -----
[22/01/23][08:11am]
---> as highlighted by the "useful to user
" section ofREADME.md
, this repository requires you to add folders to any fetched copy of it, which should be able to be resolved by ammending~/.gitignore
[22/01/23][08:11am]
---> will need to ammend/update the~/CMakeLists.txt
to auto fetch theraylib
/raygui
repositories----- ----- ----- ----- -----
[22/01/23][08:11am]
---> an update was made to the source google sheet that this repository uses for test data which should be considered further down the line (perhaps some sort of webscraping to fetch it automatically?)----- ----- ----- ----- -----
[00/01/23][00:00xx]
--->[00/01/23][00:00xx]
--->----- ----- ----- ----- -----
[00/01/23][00:00xx]
--->[00/01/23][00:00xx]
--->[00/01/23][00:00xx]
--->===== ===== ===== ===== =====
show / hide
===== ===== ===== ===== =====
- C++ resources
show / hide
- raylib [
raysan5
] - raygui [
raysan5
] - dear imgui [
Ash Wolf (@_Ninji)
] - VulpIRC [
Ash Wolf (@_Ninji)
] - GenericIRC [
Ash Wolf (@_Ninji)
] - ImHex editor thingy [remember how we thought of this and then got distracted?]
- some rendering thingy? seems neat
- has some neat stuff about paths
- raylib [
----- ----- ----- ----- -----
- source database used in this project
----- ----- ----- ----- -----
----- ----- ----- ----- -----
===== ===== ===== ===== =====