Unity Editor script with multiple levels of selectable toolbars - unity3d

I've created an editor script that shows a toolbar of different buttons along the top, the view changes depending on which toolbar button is selected. I'm currently using this line:
toolIndex = GUILayout.Toolbar (toolIndex, parsedTools, EditorStyles.toolbarButton );
but there are too many options that scroll off screen. How can I set it so it shows 10 buttons then shows the next 10 buttons underneath those, rather than all in one single line?

Ah, I think GUILayout.SelectionGrid is what I am looking for…

Related

How to edit the objects in FileMakerPro

I have one doubt in filemaker pro. In my project I have one layout with a button(Lets say layout1). If I click on the button, it is navigating to next page(Lets say layout2). If I go to layout mode in this page(layout2), it is showing the layout mode of previous page(layout1). I checked the button setup in this page(layout1). It is calling some script(Lets say script1). In the script(script1) it is calling some object using "go to object[object name:nameoftheobject]". I want to make some changes in layout2. Is there any way to find this layout or suggest some ideas to edit the object 'nameoftheobject'?
Your script does not change the layout, instead the interface is re-drawn by going to an object covering a whole layout. It could be a hidden tab control, popover or slide control. Duplicate layout and try to select all and apply a visible border.

Access Menu sub form - No default Tab stop

I have a main form...imagine that...that for most of my users will be the only form they use. Naturally, it contains tabs with sub forms.
I have a navigation sub form on the left side of this form that changes based on the user's rights level. Currently, this sub form is all buttons...and 1 always is selected as the default tab stop for that form.
I don't want to highlight any of them at first...and I can remove the highlight by switching off Tab Stops for all buttons. However, I'm not sure that I want to remove that functionality all together...and it still highlights a button. I'd just like for there to not be a default button highlighted.
As you can see, Add Course is 'selected'. I can't seem to find the correct terminology to search for a way to do this. I tried using a smaller button set behind another button, but since it has the focus, it moves to the front. Using a text field with the same colors as the background shows the cursor in a random, blank area...not visually ideal.
I'm sure that there is someone here clever enough to have this figured out. Please enlighten me. I don't care if this can be handled in VBA code or through design view.
"Focus" is the word you're looking for - you don't want any visible control to have the focus when opening the form.
The easiest method is an invisible button: create a button with Transparent = True, and an empty OnClick (i.e. the button does nothing, even when accidentally clicked).
Move this button to the top in the Tab Order, so it has the focus when opening the form.
But if your users use TAB to walk through the buttons, there will be one position where the focus disappears (when circling around from the last to first control). I don't know if it will confuse them.
Create a button on the main form itself.
Named is cmdDummyButton with the following GotFocus event code.
Set the tab order property to 0 (ie first)
Make the button transparent.
This will cause no control on the form to have the focus when it starts up.
Private Sub cmdDummyButton_GotFocus()
Static IveHadFocusAlready As Boolean
If Not IveHadFocusAlready Then
Me.cmdDummyButton.Enabled = False
IveHadFocusAlready = True
End If
End Sub
Sweet.

MATLAB GUIDE pushbutton effect when pushed and title size

I have created a GUIDE script with 5 push buttons. Each button creates a different graph for given data. I would like every time I push one of the buttons (let's call it Button1), the button to look like it is pushed or maybe change color or title (I would prefer it to look pushed). When a different button(let's call it Button2) is pushed I want Button2 to look pushed and Button1 to look like it was initially.
Also when I plot figures and I use a title on top of the figure, GUIDE cuts the top part of the title. Is there any way to have the title on the inside of the figure or maybe closer to the top axis so that all of it is visible?
(HARD) In the ButtonDownFcn callback for each button, put code that sets the BackgroundColor property. (You can see all of the available properties for any control by choosing View/PropertyInspector in the main menu for GUIDE.) Since you only have 5 buttons, the easiest way to get what you want is to just copy and paste code between them, with appropriate changes.
Pseudocode for Button 1:
Button1.BackgroundColor=PushedColor
Button2.BackgroundColor=NonpushedColor
etc for rest of buttons
(EASY) Use a group of radio buttons instead. They do what you want, automatically.
To reposition the title, you just change the Position property of the title's text box.

Cocos2d and UIScrollView

I am developing an IPhone cocos2d app with a scene like the the one depicted in the following image (I hope you can see that):
On the right there is a vertically scrollable menu contained in a separated layer (menulayer) which is itself contained in the main scene's layer. On the left there is a back button contained in the main scene's layer.
I am trying to exploit the UIScrollView as described in this link. However, despite I can see the UIScrollView working I am experimenting some problems:
1) while the menulayer actually scrolls it seems the menu does not. In fact when a press the menu item 8 the menu item 4 is selected, when I press the menu item 7 the menu item 3 is selected and so on.
2) the back button only works when the menulayer is at its first position
Do you have any idea of how shall I do to fix it?
You need to check you selectors. calls selectors from proper controls. check it carefully.Your problem shows your menu item 8 th selector bind with 4th same for others. some mis binding of selectors is present in your code so check them properly.

How in Interface Builder can you select a rectangular group of items when they're on top of a background item?

I've had this problem several times now, and never found a satisfactory solution: If I want to move a group of items with a view all together in Interface Builder, and these items are all on top of a larger background item, I can't put a selection rectangle around the items in the view because any click and drag in the view initiates a move of the background item. In other words, every pixel in the area I'm interested in (and nearby) has a "hand" mouse pointer, no "arrow" pointer is available so I can't drag out a rectangle selection box.
cmd-clicking individual items to build up the group only works when they are separate, and only when there are a few of them. Sometimes I want to select a "pile" of items all on top of each other.
Is there some way to "select for moving" by clicking in the .xib item list? Double clicking a single item selects it for moving in the view, but I have't found a way to add to the "select for moving" selection this way.
So far the best way I've found is temporarily moving the background out of the way and then putting it back but this is unsatisfactory, and wouldn't work with a more complex background arrangement.
How have others done this?
I know what you mean, and I have found a slightly better solution: go to the list view and...
drag either the background view or your custom view up to the root hierarchy level (adjacent to File's Owner)
double click on your custom view and edit away using drag-box-selection
when finished, drag the view back into its original hierarchy position
The key here is that the GUI editor only edits one root object at a time, so moving the background vs. 'foreground' views into separate root objects allows you to edit them separately. Woo!
This is my solution to this problem: Select the background images/object that you don't want to move and set its width to 1 and then, after a comfortable layout editing, restore its original width. This works for me.
Use the left hand side list view and multi-select a range by clicking on the first item in the range then shift-click on the last item. Use ctrl-click to unselect some items if necessary. As items are selected they will also show as being selected in the interface view on the right.
Once have set up all the selected items, cmd-click on the selected items in the right hand side interface view and drag.
In the list of objects, cmd+click each one you want to select them all. In the interface hold command and click and drag the stack of items. Drag them to where you want them and release cmd. If you don't release the button they will rubber band back to their original position.