By default, the mouse buttons are assigned to camera control as:
Left: Translate
Right: Zoom
Scroll/middle: Rotate
How do I change these mouse button bindings so that I want this?:
Scroll/middle: Zoom
Left: Rotate
Right: Translate
I can see that the default mouse bindings for camera control are set in DirectCameraControl.py. But, how can I change them from my main class which is derived from ShowBase?
The camera controls in DirectCameraControl are separate from the default controls, and changing these settings will not affect the default camera. The default controls are hardcoded in panda/src/tform/trackball.cxx; it is presently not possible to change these.
The default camera controls are primarily intended for early development and debugging. For most purposes, you'll want to use base.disableMouse() to disable the default camera controls and develop your own camera control code.
Related
I'm implementing picture-in-picture on my website but I have various custom video controls (for play/pause, seek etc). When I enter pictureinpicture (using requestPictureInPicture()), the video pops out properly, but it has the play/pause control, which I don't want (I want to just use my custom controls).
Is there any way to hide the play/pause control (or all controls) from the floating PIP window?
The only customization I can find is in CSS for the empty video that remains in the main page - so I can hide that altogether via
:picture-in-picture { display: none; }
but I don't see any way to customize the look of the floating PIP window, including removing some/all controls.
Thanks,
David
I want to create an application and chatting is involved. I am currently struggling to format existing controls or to create a control with the following conditions:
a container is docked to the main form's bottom
inside of that container, a button can be used to toggle a chat
component (e.g. text edit) to become either visible or invisible
if visible, the chat component is aligned with the button that was
pressed but does not force a resize on the container of the button
So basically I want to achieve a facebook or google hangouts like chat layout in vb.net that can also scale dynamically according to the current window size. Nevertheless it should always stick to the bottom.
Please keep in mind that this question is not about making the chat work but only the layout/design problem I am facing.
My current approach is the following:
FlowLayoutPanel docked to bottom with buttons
RichEdit as placeholders to simulate the chat component
My current layout
Is there an easier way to do what I want to do?
Set the anchors to the bottom of the page/panel.
On the designer, click the control you want to edit, find the Anchor property and change it to bottom (and left/right/top, whatever you'd like).
How do I get the new toolbar item style of OSX Yosemite?
I created a standard toolbar, but the buttons don't have that button-like look. Do I need to drag actual buttons to the toolbar to get this look?
What I have:
What I want (that round bezel and white background):
There are two types of items in toolbars, image items and view items. It looks like you have an image item. You seem to want a view item where the view is an NSButton configured as a round textured button. So, yes, you should drag actual buttons to the toolbar.
I would not attempt to control the button background. You should use the button as-is to get the default system appearance. Apple recommends using a PDF template image (all black with the alpha channel used to make the image). The button itself would not have a title/label. Rather that would be on the containing toolbar item.
It looks like you may have applied an internal blue "glow" or highlight to your image. Generally, you should not do that. Let the frameworks apply appropriate effects to the template image automatically based on the button state and shows-state-by mode.
Toolbars in the Human Interface Guidelines
Controls which are appropriate to use in the window frame (including the toolbar)
Designing images for toolbar buttons
Works just fine for my Cocoa app under Yosemite -
are you actually setting the template property for your icon images..?
From the NSImage docs:
The 'template' property is metadata that allows clients to be smarter
about image processing. An image should be marked as a template if it
is basic glpyh-like black and white art that is intended to be
processed into derived images for use on screen.
I am working on OSX 10.10
I am facing a strange problem of sub view colors getting inverted for HUD Panel.
For example the button when set to default button looks right in Xib file but when executed the look and feel of button is modified by the HUD panel.
I am having a HUD Panel in my Xib file as follows
But when executed the button looses its default button status. It looks as follows
How do I maintain the look and feel of the button after execution. User is not able to judge which action will be the default action due to this look and feel
Try
_defaultButton.appearance = [NSAppearance appearanceNamed:NSAppearanceNameAqua];
Interface Builder follows a set of rules but these rules are not context-dependent. The context I'm talking about is "being displayed in a HUD Panel".
The rule applied in this case is "draw a blueish button in Interface Builder if the button is a default button" even if it's not always what happens (cf. what you're seeing in your second screenshot).
I don't know since which OS X version it's working like that, but now controls in HUD Panels are displayed with a different style (which does not have a special color for default button).
You can confirm this Interface Builder comportment by adding a simple NSTextField in your HUD Panel, it'll draw with a white background in Interface Builder but it will have a black background when running with a gray focus ring.
Interface Builder:
OS X 10.10:
I've never found a way to disable this special styling for controls in HUD Panel but several workarounds (the default button is still working correctly even if not having a special color).
The special styling only occurs when your HUD Panel have a title bar.
self.panel.styleMask = (NSHUDWindowMask | NSTitledWindowMask | NSUtilityWindowMask | NSNonactivatingPanelMask);
If you remove the title bar, it'll display without any special styling:
self.panel.styleMask = (NSHUDWindowMask | NSUtilityWindowMask | NSNonactivatingPanelMask);
At this point, you can implement and draw your own title bar in the panel and mimic the default one. I don't really like this approach because first it's a lot of work for a simple button and the custom styling of controls make them prettier and more easy to read in a HUD Panel.
Another solution was the 'VLC' way. They use HUD Panels but their controls don't have any special styling. They're using BGHUDAppKit which was released when Apple provided HUD Panel without any special controls to go with it. They use it to force the bluish style instead of the greyish one which are now used by default in HUD Panels.
I didn't really like this approach too, I didn't want to add a library for a simple button, library not updated since 2011.
What I end up doing was drawing a custom button (with a simple subclass) for default buttons in a HUD Panel. This solution is quick and allow you to choose the color you want for default button in a HUD Panel (blueish may not be the best for a HUD Panel, your call).
Is it possible to have a Bootstrap 3 modal window that doesn't darken the screen and also lets users interact with the background if they want to? I use the default modal as well so I would want this functionality in addition, not instead of.
I've got an audio player inside a modal window and I'd like usersto be able to scroll the screen behind it (while the modal stays fixed in place) so they can access tracks etc..)
If you can interact with background then it's not modal.
Instead of a modal it sounds like you want an absolutely positioned div. Check out the "affix" object:
http://getbootstrap.com/javascript/#affix
You actually should prefer Avibodha's proposal!
But if you really want to use a modal, I've done some first approach here: http://bootply.com/109120
The key steps where:
disable the grey modal background
using the backdrop parameter, eg. in the button tag:
data-backdrop="false"
shrink the modals container
such that the underlying element is accessible
#myModal {
right: auto;
bottom: auto;
overflow: visible;
}
Now you can set this modals position with top and left