Descriptive Problem Summary:
Less of a bug, and more of a reminder to Tom... The default interface doesn't have a status bar, which is used to display info in games such as Settlers.
Numbered Steps to Reproduce Problem:
Code Snippet (if applicable) to Reproduce Problem:
Expected Results:
Actual Results:
Does the problem occur:
Every time? Or how often?
In other games?
In other user accounts?
On other computers?
When does the problem NOT occur?
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Workarounds:
ID:1670144
Aug 30 2014, 11:02 pm
|
|||||||||||||
Resolved
| |||||||||||||
Aug 30 2014, 11:12 pm
|
|
Yes, I was surprised by how important that was for some older games! We should definitely add support for it.
|
I've been trying to add this, but I can't seem to figure out how mouse support works.
Getting a MouseEvent is easy, but how do you translate the coordinates on screen to the appropriate atom id? The documented "mouse" event (http://files.byondhome.com/LummoxJR/webclient_doc.html) doesn't have any of the expected parameters set... |
There is not yet anything that responds when the mouse goes over an object and sets some kind of global param (or calls a function) to say what it's over/dragging. That however will be required for a status control, so it's one of the things I plan to add.
|
Lummox JR resolved issue with message:
A status bar control has been added (class "status"). This goes along with a new routine, byond.skin.status(obj), which takes an object of the type used in byond.skin.output(). byond.skin.status() is called automatically when mousing over an atom. |
As clarification, the status control will receive {text:name, atom:id} when over an atom. clear() is called when it's not. (The behavior that calls clear() is handled in byond.skin.output().) I am not including an icon in the info at this time, but that can be grabbed via the atomInfo() method if you want to make a fancier status control or do some heavy customization.
The status control is added to translated skins if the default window's statusbar setting is true (see pane.dms), and is included in defaultSkin.dms for games that don't define a skin. |
Sorry, for clarification: Is it now possible to call a Javascript function to translate pixel x/y coordinates on the map (e.x., "100, 200") to x/y coordinates within the view (e.x., "1:8, 2:16")?
Is it possible to get the atom under the mouse pointer with/without using the statusbar feature? (e.x., translate "1:8, 2:16" -> atom id 2) |
Lummox JR will have to clarify, but I don't believe that this feature would allow coordinate mapping to atoms. This automatically outputs the item under the mouse, which can presumably be overriden.
However, I agree that we would like the ability to automatically grab the atom or atoms within particular pixel blocks on the client map. I am not sure if such functionality exists right now, but since the client has that information, it should be possible. If you would like to use this from within DM, you'd need to also track the translation between server and client coords, which may be more difficult. |
In response to Sir Lazarus
|
|
Sir Lazarus wrote:
Sorry, for clarification: Is it now possible to call a Javascript function to translate pixel x/y coordinates on the map (e.x., "100, 200") to x/y coordinates within the view (e.x., "1:8, 2:16")? No, we have no function that currently does this. However, we do have the information to convert a position to screen coords. I'm not sure if this would be easy to do with raw coords rather than a mouse event, but there's probably a way. This is something I could add. Is it possible to get the atom under the mouse pointer with/without using the statusbar feature? (e.x., translate "1:8, 2:16" -> atom id 2) There is currently not a function that grabs a set of atoms from a given coordinate. That's addable too. |
I opted for a Chrome-style approach where it only pops up in the lower left after you mouse over something. The status control is in the default skin, and is also added automatically to any translated skin with statusbar=true in the default window.
|
I'm not seeing it either. I'm playing Settlers and the status bar displays a lot of information in DS, however, nothing pops up when I hover over the buttons, pieces, or locations on the board in the webclient. Same system/browser specs as above except using 507.1255.
|
I'm seeing it in Settlers; it's popping up over the input bar.
If you're not seeing it there: 1) Do you have status.dms in your byond/web dir with the other files? 2) If you inspect the page, is there a div with byondclass=status? |
That would be the issue then. Your new build didn't install correctly.
[edit] Ah, it looks like there was an issue with our zip builder. This will be fixed in 507.1256. In the meantime, you can get a copy of status.dms here. Right-click the link and Save As so it doesn't try to launch in the pager. |
I've noticed that over the last few builds, Byond no longer attaches itself to the 'pinned' Byond on my taskbar when I launch it after install. I'll uninstall and reinstall and let you know
EDIT: Or, I'll just download that link. Thanks ;) |