Can I use StablexUI with HaxeFlixel? - haxe

I'm new to Haxe/HaxeFlixel and I want to use an UI tool to make my game.
After some research I find 3 tools that seems to be good to make UI for Haxe.
HaxeUI
StablexUI
flixel-ui
flixel-ui has a serious lack of documentation, so I'm leaning towards StablexUI. However, it's not integrated with HaxeFlixel.
I test to load it in a FlxState but there are some issues.
First, the cursor is behind the UI
Second, the UI doesn't catch keyboard input
Third, the text is not visible
This is my code:
override public function create():Void
{
FlxG.cameras.bgColor = 0xff131c1b;
FlxG.mouse.useSystemCursor = true;
UIBuilder.init();
Lib.current.addChild( UIBuilder.buildFn('ui/main.xml')() );
super.create();
}
And the XML:
<?xml version="1.0" encoding="UTF-8"?>
<HBox padding="10" childPadding="5">
<InputText id="'input'" skin:Paint-border="1" skin:Paint-color="0xFFFFFF" w="150" h="20" text="'type any message here'"/>
<!-- Here we create on-click handler wich shows our alert box with input message -->
<Button h="20" text="'Show me the alert!'" skin:Paint-color="0xbbbbbb" skin:Paint-border="1"/>
Is it possible to use StablexUI with HaxeFlixel, and if yes how?

First of all, Flixel subverts the basic OpenFL display list with its own, so you'll have to layer the entire StablexUI object over the entire Flixel canvas.
This has some noteable downsides to it -- primarily that your entire UI will always have to be over your entire flixel canvas, and will not care about or respond to things like flixel state changes, etc. It also cannot mix with flixel assets like FlxSprites. With the cursor you might be able to get good results by turning off the HaxeFlixel cursor and just using the regular system cursor.
As for flixel-ui's documentation what specifically is lacking? Were you not able to find what you needed here?
https://github.com/haxeflixel/flixel-ui
Another possibility is HaxeUI -- HaxeUI has customizable backends, so it's possible that it could be implemented with native flixel widgets. That's a lot of work, but you could let the maintainer, Ian Harrigan, know that it would be valuable to you, and he might add it in the future.

Related

TextEdit/TextBox onKey events in J2me

I'm developing (or trying to) a J2ME application. I need to be able to handle onKeyEvents (keyDown/keyPressed/keyUp...) in TextEdit/TextBoxes, but I've learned that such thing is not possible in J2me, at least not in a simple way as in Java/Android development (myEdit.setOnKeyListener() for example). I've read something about using Canvas, but I'm not sure how can I use that to make it work for me.
Answer to this question ( Image in button - j2me ) involves using the CustomItem class and make an item look/act like a Button. Is there anyway to use the same approach?
The TextBox and TextField objects are high-level GUI stuff, available when doing javax.microedition.lcdui.Form stuff.
In order to use keyPressed() and keyReleased() you must use javax.microedition.lcdui.Canvas (low-level GUI stuff).
But what you're probably really after, is LWUIT (https://lwuit.java.net). It is a framework built on javax.microedition.lcdui.Canvas which gives you a Form-like API with all the things javax.microedition.lcdui.Form is missing.

Why would I not want to delete a panel when I remove it from a category?

I was looking at the function CMFCRibbonCategory::RemovePanel and I saw something that I don't understand. The 2nd optional parameter is bDelete which according to the docs:
[in] bDelete
TRUE to delete the panel object from memory; FALSE to remove the panel object without deleting it.
I don't see a way of referencing the same panel elsewhere and this isn't like hiding the panel as there is no way to bring it back, so why wouldn't I want to do this?
Unless this is in case I were to keep a live pointer to it using CMFCRibbonCategory::GetPanel? Sounds kinda like a bad idea.
I agree. There is no real use for Setting bDelete to false at all.
m_arPanes is no where accessed in a way that some one can add a Panel with a plain pointer.
It seams to be a relict when they transported the BGC ribbons implementation into the MFC. The BCG version also have this bDelete flag and it isn't useful there too, but there are more complex functions that handle such panels.
But I don't see this functions and internal customizable panels in categories in the MFC.
So from the design point it would have been better to create a special protected function like InternalRemovePanel. That just remove th Panel and keps the pointer...

ActionBar implementation

which is better to use, GreenDroid, ActionBarSherlock or the ActionBarCompat library?
i'm really having problems in making my app interface for this feature.
//use your custom xml view to show your actionbar
View actionBarView = getLayoutInflater().inflate(R.layout.action_bar_custom_view, null);
actionBar.setCustomView(actionBarView);
actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
A simple thing is to do your own BUT if you really want it you could try actionbarsherlock, best is always a question about preference but I use sherlock. With your own you don't have some of the small quirks which comes with the bigger libraries.

how can i handle rad window popup by watir script?

How can i handle this type of Rad window pop up by using watir.
<span id="RadWindowTitlectl00_ContentPlaceHolder1_rwmWinManager_rwMessage" class="RadWTitleText" onselectstart="return false;" unselectable="on">Check Results</span>
This is for button html...
<input id="btnOk" class="LoginButton" type="button" onclick="javascript:CallBackToEdit('1');" value="Ok">
Please give guidance for this.
Need more info to help you.
If you're trying to access a newly generated popup window, do it something like this:
browser.window(:title => "annoying popup").use do
browser.button(:id => "close").click
end
Given that the HTML you have supplied just seems to be an ordinary div element, my first guess is that this is not truly any kind of popup, but just a div that is using Ajax/javascript and CSS to simulate the effect of a popup (by manipulating the coloring of objects, and perhaps the 'enabled' state as well so it appears to be modal)
To be sure we'd need to see more than just fragments of the HTML Or better yet a reference to an example of a page that implements this control. It would also be helpful to know WHICH set of 'Rad' controls (since Telerik has multiple versions (Ajax, MS-MVC, Silverlight, WPF and Winforms) available) and knowing which one might make it easier to find an example of the control on the demo pages at Telerik's site
based on what little you've provided I would think that simply
browser.button(:id, 'btnOK').click #ought to work
Note that since this thing could well be coming into existence via client side scripting, potentially a brief wait might be necessary to ensure that the object exists, before trying to click it.
If that does not work for you, then use developer tools to look at the button input element and make sure it is not in a frame.
Otherwise please give us either more HTML, specifics on which RAD control this is (so we can perhaps find an example among their demos) or both.

What View Component does the Google Plus App (Stream) use?

if you use the Google Plus App on Android and switch to the Stream, you get a view where you can swipe to the left and right between the All circles/Incoming/Nearby-Stream. What view component is used for this? Is this a standard Android component? Or where can I find democode how i can build such a view component?
You should take a look at the ViewPager from Android Compatibility Package for the desired widget/swipe navigation. Find more about it here
http://developer.android.com/sdk/compatibility-library.html
Also, checkout this recently posted tutorial and some sample code on ViewPager by Richard:
http://geekyouup.blogspot.com/2011/07/viewpager-example-from-paug.html
It is a combination of a ViewPager together with an indicator for where you are currently and where you can go swiping left and right.
A sample of how this can be done along with code you can use in your own apps may for example be found here. I've played with this code a little and it works pretty well.
None of the default widgets/views. I guess, it's some kind of a custom view with swipe functionality.
Honeycomb opens up a few new widgets which seem to have these functionality. Have a look here.
http://developer.android.com/sdk/android-3.0.html (New Widgets)
I used APKTool to take a look at what's going on. Hopefully it is okay to post this here. This is from version 1.0.2 of the G+ APK.
removed google+ app code as per CommonsWare's suggestion
So, it looks like they're using standard views, though perhaps with a good deal of gesture detection and smooth animation magic.
EDIT) If you really want to know about the exact inner-workings of what is going on in the Stream activity, I suggest you use APKTool yourself and examine the .smali code

Resources