How to add a pop up menu in LibGDX? - menu

I am trying to make a popup menu come up in libgdx but i can't figure out how to do it. I want it so that when I click an image on the screen I want it to pop up a smaller image on the screen where the user can buy items!

For that, you can use a Table().
Put all the textures and buttons you need in that table and add the table to your stage, to display it on the screen.
If you want your table to pop up only when you click a button, there are several options. For example you can set your table invisible with table.setVisible(false), and when you click the button, you can make table.setVisible(true).
If you want to add some fancy animations, like sliding, scaling, fading... you'll have to look to the AddAction class.
For example you can create your table outside the screen, let's say it is on the left of the screen, and when you click the button, the table will enter the screen by sliding to the right until it reaches the center of the screen. For that, you'll need to do something like that :
table.addAction(Actions.moveTo(Gdx.graphics.getWidth()/2, Gdx.graphics.getHeight()/2, 0.2f)))
Just look to the AddAction class, there are plenty of cool stuff to popup your menu.

Related

Menu button on keyboard to get Excel Context Menu

Normally on an excel file, when I click the Menu button on the keyboard, the normal context menu like below first screenshot will show. However I got a new computer and it gives me a totally different context menu like below 2nd screenshot. How can I change excel to show me the context menu like the first screenshot when I click the menu button on the keyboard? Many thanks.

How to display several photos in another layout by clicking on one layout?

When I'm in layout 5 and I click on a button, I want to make some images visible in layout 4. I also used the general boolean method but it didn't work, do you have a solution?

Keyboard accessibility ( WCAG) in panels with list of elements that has assigned button role

Hi :) I would like to ask you about how to treat elements that compose a list, but whom have assiged a button role and are put in side panel ( so it is not a menu or dropdown). My main problem is how to decide is to where ARROWS should works and where TAB.
Moreover I have a differ types of list items that consist of:
checkbox/ radiobutton only
checkbox/ radiobutton with a link to another panel
two icons/ buttons that has defined an activities etc.
Please look at pictures and help me please :)
PINK - "arrows"
BLUE - "TAB"key
You should hardly decide which component will use TAB key or Arrow Keys. Keyboard accessibility for a large number of components is already defined in WAI-ARIA Authoring Practices.
Adding a different behavior could create issues to both sighted, and non-sighted users because they'll already be knowing which key to use based on the component or they'll know intuitively because of standard roles or they'll know as they use keyboard more to browse.
Offer List
Listbox will work. Arrow Keys to navigate and Enter key to perform the action.
List of Checkboxes and Radio Buttons
I would recommend to keep Checkboxes and Radio Buttons to their default keyboard behavior. Since your cases are more of a list, you can convert the list of checkboxes and radio buttons to Single Select and Multi Select Listboxes and use Checkbox and Radio Button as a font icon or graphic to show the selection, similar to how tick is shown in this Listbox example. When you convert to a Listbox, you'll meet the Arrow Keys requirement.
Selected Fruits List
There are some issues in the required keyboard behavior: How will user know if Arrow-Left or Arrow-Right need to be presed, think about non-sighted users.
Fruit Name and i icon button
In your need, you want both Fruit Name and i icon button to open a panel, suggest to NOT use Arrow-Right to i icon button and only use the Enter key to open the panel. May be you don't need i icon button at all.
Delete icon button
Suggest to use DEL key to delete the item
Conclusion
Remove i icon button. If you can't just keep it as graphic element without any events
Use Enter key to open the panel
Use DEL key to delete the item
I think the whole list will then become a listbox, navigable using Arrow Keys and Enter to invoke an operation
Vegetables List
Neither Accordion nor Nested List works here because you have two actions to do: Make a selection, and Expand and Collapse. I haven't tried TreeView but you can check.

Hide Add button From Grid

I would like to completely hide the Add button in a grid (using Acumatica Framework). I know how to disable it using AllowInsert false, but I would like to hide it completely? Is that possible please?
Let's assume that for some reasons you want to hide Add button from Sales Order Details Grid. For achieving this you should do the following:
1. Add Sales Orders screeen to Customization's Screens. You can do it by clicking Add Screen -> Customize Existing Screen and selecting Sales Orders screen in the appeared Smart Panel.
2. Now you should go to the Tab->Document Details->Grid:Transactions and select Properties in the panel on the Right open Action Bar -> Actions-> Add New and set Enabled to false.
Now publish your customization. As a result you will get the following:

Toggle a custom icon on an Action Button on Lotus Notes form

When editing the action button properties, it allows an #if statement to flip/flop two choices (lock/unlock). i.e. #If(enlock=1;"Unlock";"Lock") for the "Label" of the action button.
At the bottom of the Action properties, icons can be None, Notes, or Custom. When I select Custom, I want the #if to use either the Locked/Unlocked Notes icons. (actn084.gif and actn085.gif, respectively) Or numbers #62 (locked) and #(I don't know/can't find, the # for the unlock icon).
I've tried formula with the icon number, like in a view, "display as icons" for view column. Using an #if, I've tried the gif on local and server replica's and it didn't give any results.
Please see the example image below.
Image example: http://i.stack.imgur.com/UBac3.png
You have to add actn084.gif and actn085.gif to Resources/Images.
Then, you can use a formula
#If(enlock=1;"actn085.gif";"actn084.gif")
for calculating icon.
As an alternative, you could create two buttons and hide-when them depending on field enlock. You could assign label and icon direct to buttons without formula then.
The hide formula would be enlock=1 for first button and enlock!=1 for the second. In both buttons you would have to add #Command([RefreshHideFormulas]); at the end of your action formula to refresh the action buttons (or Call uiDoc.RefreshHideFormulas for LotusScript action code).

Resources