Presenting text data with playN - playn

Ok, I already noticed that adding image layers in playN is very easy. But is there a good framework for presenting text data? Or it's totally not what was playN built for? I was wondering if I could present my text in a table. Is that eaisly achieveable or recquire some hacky workarounds?

PlayN is a game framework and as such very much oriented towards graphics.
You can draw text on screen quite easily, but it is drawing text. PlayN is not designed to do text-processing. Typically, you draw text to an ImageLayer and then continue working with it, essentially turning it into an image.
You can do (limited) text layout with the TextFormat class (http://docs.playn.googlecode.com/git/javadoc/playn/core/TextFormat.html), but again it is limited and mainly focusing on turning the text into a picture as soon as possible.

Have you looked into Triple Play? It's described as "a collection of game-related utility classes that can be used with the PlayN library on all of its myriad platform targets" and includes a UI toolkit with a TableLayout class.

Related

How to make a draggable and scrollable map with inertia. C#

i am actually trying to follow this tutorial: "How to create a HTML draggable and scrollable map with inertia using Phaser framework" (google it, www. emanueleferonato .com)
Im using Unity but i configured it "pixel perfect" so i can use directly pixels like in AS3 and flashdevelop.
I basically need to make a map for the game where the player can drag in the X axis of the map.
I have no clue of how to do it, also it should have acceleration and deceleration.
Edit:
As i say before, i am using a custom framework that does not allow components, or UI, it works like FlashDevelop and AS3, so imagine the answer is in AS3.
Thanks!
I recommend looking up Unity's UI documentation (AND TUTORIALS!) :D They have really good articles, and the forums are a great resource too.
Regarding your specific problem- Scroll Rect is what you are looking for. You can implement 2D dragging, along with acceleratoion, deceleration, and other kinds of UI physics (inertia, elasticity, etc.) with it.
Please look for tutorials if you're just beginning to dabble with these. I hope that helps!

Nodal graph in Qt for Programmable Flow Charts

I was wondering if there was a nice way to allow users to create nodal graphs (with restrictions) as with LabView.
Something like this:
I have seen http://www.pyqtgraph.org/, which seems to have something similar, and I do intend to use PyQt as my base (though I do not mind linking in C++ code), but it doesn't quite have the look and feel I wanted.
Any pointers to the right direction would be great.
There is a Diagram Scene Example which uses the Graphics View framework to make flowchart diagrams. It is an application in which you can add flowchart shapes and text and connect the shapes by arrows. The shapes, arrows, and text can be given different colors, and it is possible to change the font, style, and underline of the text.
You can take a look at the code and see how to create custom graphics items and handle mouse events and movement of items. Then change the look and behavior as you like.
Check another diagram editor here.
[not enough reps. to comment]I too had a similar task to implement. For me it was a large and complex block diagram. It was really hard to implement using QGraphicsScene. I posted a question on SO and instantly gained enough downvotes. No one gave any useful hints. So I did the hardway. Created images of lines with transparent background and changed the style-sheet dynamically. I don't know weather this is the right way. It will be really helpful if someone gave insights on this.

How do I use my own custom buttons and design with wxpython

I've been looking for some inspiration with wxpython as far as the GUI goes. Everything in the demo looks boring and uninspiring so I want to go in my own direction but I can't figure out how to use my own buttons I made in photoshop or my own background images.
I'm kind of new to GUI programming so I ask if you could please be clear in what steps I should take. Once I intialize the frame...how to I load my custom buttons, or set the panel background?
As acattle pointed out, I already wrote on how to change a panel's background. You should note that wxPython isn't a themable GUI toolkit. It uses the native widgets of the OS wherever possible and most of the time, those just aren't very themable. If you need that, then you should look at Tkinter's (especially ttk) or pyside/pyQt.
If you need bitmap buttons, there are several options:
BitmapButton
GradientButton
AquaButton
PlateButton
I did some googling and I found this tutorial for setting the background of panels.
A bit more googling and I found this post talking about wxPython's Bitmap Button Class and showing some code examples.
I would suggest being very very careful designing your GUI if you're going to use custom images. You need to pay special attention to your spacing and your text sizes or your GUI might come out looking like crap.

Flex & Flash or Flex vs. Flash?

this is not a technical question, well maybe potentially, but since this is such aresponsive messageboard I thought I would get some good responses here.
I am due to create a pretty robust website coming up soon that has to be creative but also incorporates a lot of data. My perspective, as a newcomer to flex, is that it is better for applications than it is for more abstract websites. Things are harder to skin in flex, you can have smoother animations in flash, etc. These are just my perceptions.
Question is, can you do the same creative material in flex that you can do in flash, or if you can is it worth the extra time? Basicially trying to figure out if I should do this project in all flash or flex and flash, because I know the design, transitions and look of the site will be fairly organic.
You can do a lot of the same creative material in Flex that you can do with Flash. In some cases, especially if you can handle coding easily, it's even easier, because you can add effects without having to tweak a timeline. You can use the graphics class to draw the kind of simple shapes Flash lets you work with and you can style them.
You can also add any bitmap or vector images you want to Flex and use them however you want, even as background-images for, say, a Canvas. I create graphics symbols in Illustrator and export them to SWF files which can then be embedded and accessed directly in Flex using the [Embed] directive.
It involves a different way of thinking about it, but let me put it this way: I started off as a graphic designer who could code, and loved and used Flash to create cool interactive animations that used complicated and extensive ActionScript. Then I started working in Flex and once I got to a certain level of proficiency I completely abandoned Flash. I don't use it at all anymore unless I have to work with someone else's Flash files directly.
If in your HTML/Javascript/CSS work you're the kind of person who codes in a text editor first, Flex is going to feel right for you. If on the other hand you rely on DreamWeaver or some other visual tool, you may want to stick with Flash. Bear in mind that Flex also has a fairly rudimentary "design" view, which I never use because it just gets in the way. As would DreamWeaver.
Edited to say: I should add that you can also create animations in Flash and use them in Flex. So you don't have to abandon Flash to use Flex, but it just might fall out that you do, as I did.
Flex has a bunch more components out of the box for handling data -- and is much more geared toward handling data than Flash. And Flash is much more geared towards "animation" (in a broad sense of the word).
You can create your skins in Flash if you want, but skinning in Flex 4 in general is much easier and more robust than in previous releases.
It sounds like Flex will suit your project better, and you can decide as you go if there's a piece that may be more suited for Flash. They're working together pretty well in Flex 4.
Flex & Flash.
Flex for robustness and ease of development.
Flash IDE for assets libraries (gfx, sounds & animations to import in Flex).

I need to design usa interactive Map in flex

i need of simple UsA map in flex ,all Area need to be click able as button .
Is there any tool available for designing buttons in various shape in flex or any build in free map is available in flex.
As vector format so that zoom in will not affect the quality.
i need to design like as shown in this site
http://www.futurevision.com.ua/products/usa_flash_map.php
This is the Degrafa Map Demo. It is still in the samples section so perhaps the site was down at the time.
data viz sample page here:: http://www.degrafa.org/samples/data-visualization.html
Load the "Map Dashboard" sample and Right click/View source to get at the code.
Cheers
Jason.
I posted a similar question a while ago but needed more customization.
I used SVG path data in Degrafa to create custom maps of the world, continents, USA.. for a customer. Degrafa used to have a nice US map demo (with source code) as part of its samples, but it disappeared from the web. I don't know of any tool that would help to design clickable Flex shapes. I have no doubt though that Degrafa will provide more support and tools for converting and using SVG.
Some products I found: ilog, ArcGis
And also found this open-source library : GeoVis (birdeye)
But it's very unstable and haven't seen many changes recently.
I'll do that (or, I'll have a designer to do that) in illustrator, and then import the vector format in flex, with the [Embed] metadata.
I don't know if it is a downside for you (for me is a plus), but in this way you have to do everything in code, not with the FlexBuilder UI.

Resources