huginn wrote:GoldenGnu wrote:It's scrollable with the wasd keys (as noted in the readme file)
Oops, I must admit, I never read it.
I guess most don't... hehe....
huginn wrote:GoldenGnu wrote:A mouse edge scroll solution, is not really usable in a windowed program. But, a right mouse button down scroll solution, could be very nice
I don't know what a mouse edge scroll solution is.
It scrolls the map, when the courser is near the edge of the map...
huginn wrote:I had the latter in mind, only with the left mouse button, as this is more intuitive. (Acrobat Reader uses it too for moving a zoomed page.)
The right mouse button is used to select systems, but I guess mouse drag can be used to move the map with....
I guess, I understand now, It endable you to turn the galaxy, that's smart...
huginn wrote:GoldenGnu wrote:Otherwise, It would just be the categories...
As an intermediate step that would already be enough.
I read your other post, look like we are already there...
huginn wrote:Does percent per cargo really make sense? You use profit per cargo with unlimited money but limited cargo space. You use profit in percent (called yield I think) with unlimited cargo space and limited money.
Well as you say, it's when you have less money and enough cargo, then buying by percent make sense...
huginn wrote:I can get both by just sorting the table along the respective columns. So for these two purposes I don't think it is necessary to include again.
yes but, you wouldn't know what one to buy from, if you don't calculate it yourself... I would just make it so that, it would tell you to buy by profit or by percent... then you could sort the columns and just buy the best first and so on...
huginn wrote:If both are limited, well my intuition right now is, that it is not so easy to find the best cargo mix. How did you solve it?
I just counted the profit by both... and printed the largest one...
huginn wrote:I'm finishing the category view. The best cargo mix I won't touch right now. Then I'd thought about the map. Regarding the map, I don't see much interference right now. I'd mainly fiddle with getMapPoint and getViewPoint + some additional attributes + additional key bindings for turning left right up down and reset.
okay, I'll keep coding my part, then
huginn wrote:GoldenGnu wrote:I was going to work a map feature: Waypoints, that would let you add and remove waypoints from the path... But, if you're going to do a lot of work on the map, you might take it on as well?
As already mentioned, it won't be a lot of the map, and it probably won't interfere with each other. I can merge my map work into yours for a change.
yerh, that's great...
POST2:
huginn wrote:OK, I got parts of the Category Table implemented. But now I'm stuck in my struggle with Swing and its model-view-controller architecture.
Yerh, swing is fun, but most of the table work is done with glazed list...
huginn wrote:Up to now I followed the course of least resistance, in order to get a proof of concept. I added a new Category column. This can be displayed in the normal table view as well. Depending on the view I wanted to set the displayed columns to the one given in the settings or to a currently statically hardcoded vector (BuyBase, SellBase, Category, AvgProfit). I saw that in the TradeSettings you can set the columns.
Yes you can, but more is need...
huginn wrote:However, somehow Swing does not take setting the table columns to a new list lightly, even if it is a clone of the old one. Furthermore I still do not understand, how the TablePanel actually gets notified that a change happened in the underlying column model.
When the tables are change, you should do:
tradeTableModel.fireTableStructureChanged();
huginn wrote:I thought looking at the SettingsView.save code helps. There I can change the displayed columns and save applies the changes. But save only sets the TradeSettings as I do. The notification to the Swing table is not there either. Does this occur in Program.save? Or where does it occur?
The code above is call from TradeView.updateLanguage() (last line)
huginn wrote:I'd appreciate any help right now ...
Sorry that I wasn't around, when I was needed...
POST3:
huginn wrote:A good night sleep really helps. Figured out, I thought too complicated. I just reuse the current table. Useless columns are filled with 0 and "".
Yes, sleep and even brakes, really helps when you're stuck....
huginn wrote:So, here is my current version with a switch between cargo and category view. The functionality is all there. The UI ... well it's not yet eye appealing ... I wanted to have the radio buttons next to the Switches panel, i.e. reducing the Switching panel length by half. Didn't manage, though ... therefore this other position. I don't mind, where you locate the button eventually, but I leave this to you.
Sure, I'll fix up the UI, as last time... I like that you do all the hard stuff yourself, and let me do the easy part
huginn wrote:Perhaps needs some more testing, I just simulated the Cephid 17 run.
Well if it's broke, some should report it, hehe...
huginn wrote:Attached the diff to my previous version (the "Profit per Cargo" version) and the zip of the source for better copy/paste. You sure, you want to do it by hand? Perhaps
patch works for you, too.
I'll check it out, but, I kinda like doing it by hand now... It lets me look and somewhat understand the code, while I add it... I think it's good and I'll know where the changes are made etc.
huginn wrote:
Further changes:
- Added some get...Name methods
- Introduced getSellPrice... methods to Cargo and Category (let the cargo decide on its own, whether it is an upgrade or not!)
- Removed all your bUpgrade additions, as after a while they drove me crazy ... I hope, you agree and also that I didn't introduce some regression
That's cool, It was the best solution, I could come up with, It's good that you found a better one... I really like your improvements so far (havn't looked at the latest code, yet), and I'm sure it's all good, as it have been so far...
huginn wrote:Have a nice day, I'm finished for now.
I'll start merging the code, and doing the UI changes, if needed...