columns and sorting

Started by arj0n, Tue 13/09/2011 14:48:57

Previous topic - Next topic

arj0n

Question:
Is it possible to create a room containing an 'excellish' way of columns and being able to sort them too?

Mouth for war

2 topics in a row...you suck Arjon ;) sorry I can't help you though :D
mass genocide is the most exhausting activity one can engage in, next to soccer

Khris

Not sure I understand the question; in principle, this is very well possible, yes, why not?
You need a data structure and a function to display it on the screen.

It's possible to work around the one-dimensional array issue using structs or simply code.
Scrolling is also pretty much a non-issue; either the drawing function uses its own offsets or the room is big enough and you use the viewport commands.

Sorting is also pretty trivial.

In short, the answer to your question is a resounding "yes" :)

arj0n

#3
@MfW:
You can't help me out here? You suck Mr. 'Mouth for Troublemaker'  :P

@Khris:
I think you did understand what I was asking for. Thanx.

The scrolling isn't that difficult but since the rest of your answer is too difficult for me to understand/implement:
is there a sample/example somewhere on this forum of someone who has implemented such stuff before...?


Khris

Sorry, didn't wanna come across arrogant or something; I just find it funny that people so often ask "is it possible to do [trivial thing]" OR "how can I do [really complex thing]" rather than the other way around. Seems like AGS has a knack for getting over- and underestimated all the time :)

Multi-dimensional arrays are already mentioned in several threads; and I believe monkey coded a module that greatly simplifies handling them.

A drawing function would be called every-time the screen gets dirty i.e. has to be redrawn; either every loop or every time the display changes.
The function would contain two nested loops, iterate through columns and rows and draw the Strings and lines to the room background.

Do you want to be able to edit the cell contents on the fly? Or do you just want to show a table?

arj0n

It really didn't felt for me like you came across arrogant or something so no need to say sorry.
(If you felt like that it probably was accidentally and unintended caused by my comment I guess... sorry)  ;)

Anyway,
Quote
Do you want to be able to edit the cell contents on the fly? Or do you just want to show a table?

I 'only' need to show a table with sortable columns.

SMF spam blocked by CleanTalk