Woogachaka / DeckFactoryTool

For rapid prototyping of decks in Tabletop Simulator
GNU General Public License v3.0
0 stars 1 forks source link

Build New Deck Editor to take advantage of the JSON Deck saving format #5

Open Woogachaka opened 5 years ago

Woogachaka commented 5 years ago

Retool the deck editor window to better allow deck manipulation and design (preferably including copies of cards) Sub tasks are as follows:

  1. Design GUI for interface (what kind of representation of the entries in the list)
  2. rework backbone of the deck factory to support the gui from step 1
  3. save that list as a json formatted deck file.
Woogachaka commented 5 years ago

The formatting needed internally is already present via the sheetMaker.Manifest object and its convertToDict function, now we just need the editor to populate that via the add-card functionality and make movable GUI elements representing cards in the editor.

Woogachaka commented 5 years ago

Ok, Plan for the Deck Editor New interface:

  1. The interface should stay largely as it is now with the exception of the main portlet in the deck editor window. That window should be replaced by a stack of rectangular, "drag and drop"-able GUI elements. When a given element is dragged to a point on the list, it should snap into the nearest location on the list and push the rest of the elements down. This may be done with an ordered list of "elements" and inserting the drag and drop into it, pushing everything else down and updating location that way. These elements should come in two flavors, Cards and Categories. Card elements should do the following: -Have indicator as to which card they are (maybe the name-box from the actual card image) -Have an iterable box, defaulting to 1, of number of copies of the card -Have a means of removing the card from the deck, either by setting to 0 copies and auto deleting the card or having an x button or something. 0 may be better here due to space concerns in the element.

Category Elements should do the following:

  1. Build a back end data structure to sort the elements in the gui and coordinate with a Manifest object or dictionary structured like it to store the deck. We can extend the manifest object to have a constructor based on the dictionary version of it already present in the tool if necessary.
  2. Retool the save button to save this dictionary version of the deck manifest.
  3. with these changes include a running tally of how many cards are in the deck.