OpenXcom Forum

OpenXcom => Suggestions => Topic started by: Fenyő on October 13, 2012, 12:51:34 am

Title: User Interface (UI) suggestions
Post by: Fenyő on October 13, 2012, 12:51:34 am
Hi!

I haven't seen a UI topic, so i opened it.

I have many suggestions for the UI.

First of all, it would be great to scroll in the Battlescape with the mouse with a left-button hold-down, just like in Transport Tycoon Deluxe, or in OpenTTD!

Actually, i have spent my whole afternoon on inspecting OpenXcom codebase, and i managed to implement this feature. :)
More information about this is in the development section, HERE (https://openxcom.org/forum/index.php/topic,87.msg6213.html#msg6213).
Title: Re: User Interface (UI) suggestions
Post by: Daiky on October 13, 2012, 01:47:04 am
I'll have to point you to this:
https://openxcom.org/forum/index.php/topic,189.0.html

the right-button hold down was implemented, it was gone for a while but planned to be added again
Title: Re: User Interface (UI) suggestions
Post by: Fenyő on October 13, 2012, 08:52:45 am
I'll have to point you to this:
https://openxcom.org/forum/index.php/topic,189.0.html
:o
Why is this topic avoided my eyes??

BTW, i have other UI related ideas, so the topic opening for collecting UI related things is not useless.
Title: Re: User Interface (UI) suggestions
Post by: AndO3131 on October 13, 2012, 12:22:02 pm
It's been a while since  last compilation of OpenXcom source code. I'm very glad there's so mouch stuff going on around here. Keep up the good work :)

My suggestion is about "New battle" feature. When you start new battle, you can make various adjustment: mission, terrain, etc (left click -> next option). It's an excelent idea. I would suggest adding 'right click -> previous option' functionality.
Title: Re: User Interface (UI) suggestions
Post by: Fenyő on October 13, 2012, 01:10:23 pm
It's been a while since  last compilation of OpenXcom source code.
You mean here, on the site?
Maybe you are not aware of the GIT-buids ? :)
Title: Re: User Interface (UI) suggestions
Post by: Fenyő on October 13, 2012, 03:04:44 pm
Ok.

Next feature suggestion:
Left-Mouse-Scrolling on the MINIMAP! :)

Actually i've just implemented this. :)
You can find it in the development section, HERE (https://openxcom.org/forum/index.php/topic,87.msg6239.html#msg6239).
Title: Re: User Interface (UI) suggestions
Post by: Fenyő on October 13, 2012, 03:12:42 pm
I'm wondering if this left-mouse-scroll feature should be implemented to Geoscape also, or should not.
Does it make sense?
What do you think, guys?
Title: Re: User Interface (UI) suggestions
Post by: Volutar on October 13, 2012, 04:41:31 pm
geoscape heavily using caching, and smooth scrolling will lower fps greatly
Title: Re: User Interface (UI) suggestions
Post by: Fenyő on October 13, 2012, 05:03:24 pm
geoscape heavily using caching, and smooth scrolling will lower fps greatly
That's an addition to the difficulties. And Geoscape is not flat, like Battlescape, so its even harder to implement.

So the question is it worth to implement, or no, because not so much benefit the user has from it?
Title: Re: User Interface (UI) suggestions
Post by: Volutar on October 13, 2012, 07:01:17 pm
Actually I think it need to be implemented, though not in software 320x200 mode. OpenGL after 1.0 would be nice.
Title: Re: User Interface (UI) suggestions
Post by: mercy on October 13, 2012, 10:20:43 pm
Yeah, some new planet shading in software mode, maybe a slight atmospheric glow? Or night-lights vanishing on continents as the sun rises.
Title: Re: User Interface (UI) suggestions
Post by: Volutar on October 14, 2012, 08:23:59 am
No need of realistic things really. Because it's a command-center visualization, not real Earth from outer-space observation. Thus no clouds, no athmosphere, no sun or flares required. It actually will be a visual obstacle.
Title: Re: User Interface (UI) suggestions
Post by: Fenyő on October 14, 2012, 10:36:45 pm
Next suggestion:
Right-click on arrow buttons should mean MAXIMUM/MINIMUM.
Example: on the Research project screen you click on the increase scientists button with the right button of the mouse, and the scientists allocated is set to maximum value, immediately!
Or you click on decrease scientists button with the right button of the mouse, and the scientists allocated is set to 0, immediately!
Imagine this function on the Research Project screen, Manufacture allocation screen (count of engineers, pieces to produce), Craft Equipments screen, Transfer items screen, Buy/Hire screen, Sell/Sack screen!

Yes, I've done it (all of these) again! :)
You can find it in the development section, HERE (https://openxcom.org/forum/index.php/topic,661.msg6271.html#msg6271).
Title: Re: User Interface (UI) suggestions
Post by: sklll on October 15, 2012, 12:52:48 pm
Wow!
Guys, its the fastest response I have ever seen!
Respect!

But as of original issue with right-button scrolling:
As adding of some movement threshold appears to be a good idea - then we need some criteria to differentiate two user actions (scrolling and cancelling).
I suggest to use the time between MouseDown and MouseUp events in addition to movement threshold.
Cancel action usually takes much less time than scrolling. So some constant in miliseconds can help...

Thus:
1. Cancel action - mouse can be moved slightly, but click must be fast;
2. Scrolling action - all other cases (right-button held or mouse moved greatly).
Title: Re: User Interface (UI) suggestions
Post by: Fenyő on October 15, 2012, 01:53:49 pm
I suggest to use the time between MouseDown and MouseUp events in addition to movement threshold.
Cancel action usually takes much less time than scrolling. So some constant in miliseconds can help...
Hmm, that's an other excellent idea!!
Title: Re: User Interface (UI) suggestions
Post by: Daiky on October 17, 2012, 12:54:55 pm
It would be nice if the rightscrolling used the "battleScrollType" config, which already had a RMB Scroll option:
battleScrollType: Map scrolling mode (0 = Trigger Scroll, 1 = Auto Scroll, 2 = RMB Scroll).
https://www.ufopaedia.org/index.php?title=Customizing_(OpenXcom)#Options

So it can be disabled if one does not want to use it.
Title: Re: User Interface (UI) suggestions
Post by: sklll on October 17, 2012, 11:14:15 pm
Maybe it would be more user friendly to make something like this:
2 = RMB Scroll + Auto Scroll, 3 = Middle MB Scroll + Auto Scroll
Title: Re: User Interface (UI) suggestions
Post by: Fenyő on October 18, 2012, 10:54:56 pm
Maybe it would be more user friendly to make something like this:
2 = RMB Scroll + Auto Scroll, 3 = Middle MB Scroll + Auto Scroll
I will improve the right-click with pixel tolerance and time-limit, so i don't think a Mid-button is really needed.

Edit: OK, if somebody wants that explicitly then it is needed. But RMB should still exists in the options, and i recommend it as default enabled.
Title: Re: User Interface (UI) suggestions
Post by: SupSuper on October 18, 2012, 11:30:54 pm
There seems to be a lot of debate over this feature, so I would recommend making it an option. Use "battleScrollType" to define if it's on/off like Daiky said, and make a new option for the button (battleScrollButton?) and default it to RMB.
Title: Re: User Interface (UI) suggestions
Post by: Fenyő on October 19, 2012, 02:53:34 pm
There seems to be a lot of debate over this feature, so I would recommend making it an option. Use "battleScrollType" to define if it's on/off like Daiky said, and make a new option for the button (battleScrollButton?) and default it to RMB.
Or maybe a battleScrollButton only with states: "RMB, MMB, None". (Right-Mouse-Button, Middle-Mouse-Button, None)
And perhaps a battleScrollButtonPixelTolerancy with an int value. :)
(and battleScrollButtonTimeTolerancy with also an int)
Title: Re: User Interface (UI) suggestions
Post by: Fenyő on October 19, 2012, 05:57:31 pm
Long time i want to suggest this:
When Saving a game in Geoscape, or in Battlescape, after the game is saved, it returns to the previous menu.
In original X-COM it returns to the game itself instead of the menu.
This problem is really annoying since i used to get back to the game with the original. (i know, its an "end of the world" problem again)

If you agree to change it to the way of the original, i could do it in the source myself. (its just a game popstate)
SupSuper? What is your opinion? Do you allow me to change this?
Title: Re: User Interface (UI) suggestions
Post by: SupSuper on October 19, 2012, 06:18:18 pm
Sure, I never really noticed.
Title: Re: User Interface (UI) suggestions
Post by: Fenyő on October 19, 2012, 06:38:36 pm
Cool.
I've just done a Pull-request. :)

I want to note that i'm right now working on right-mouse-scroll, to make it more user-friendly.
Title: Re: User Interface (UI) suggestions
Post by: Fenyő on October 19, 2012, 10:50:38 pm
I've implemented the time-limit to the right-mouse scrolling. (not yet Pull-requested)

But now i'm thinking, that does it make sense to make a pixel-tolerance also? Do we really need it in combination of the time-limit?

Guys, what do you think?

Edit:
Currently it works this way:
As before + when the button is released, it looks how many times passed, and if it is less than 150 milisec, then it revokes the scroll, and handles the event as a normal right-click.

If i implement the pixel tolerance, 2 ways are possible:

1) When too much pixels scrolled, it handles as scroll, and can not be revoked. (not affected by time of the mouse-down)

OR:

2) If too little pixels scrolled when mouse released, scroll is revoked, and the event is handled as a click, regardless of the time of the mouse-down.

So, what are your opinions?
Title: Re: User Interface (UI) suggestions
Post by: sklll on October 19, 2012, 11:56:19 pm
I've implemented the time-limit to the right-mouse scrolling. (not yet Pull-requested)
Cool! But I want to see how it works now. Is there a way to download updated version to test it?

But now i'm thinking, that does it make sense to make a pixel-tolerance also? Do we really need it in combination of the time-limit?
Don't know without testing of how it works now...
Maybe wide fast scrollings will be miss-interpreted by current algorithm... 

1) When too much pixels scrolled, it handles as scroll, and can not be revoked. (not affected by time of the mouse-down)
Exactly what I meant in previous posts, but don't know if it is still necessary in regard of current time criteria...
Title: Re: User Interface (UI) suggestions
Post by: Fenyő on October 20, 2012, 12:01:52 am
Okay, I've just sent you a PM with a link to a binary I've just compiled.
You can test it, after you copy the whole data folder of your current working version.

The time limit now is 150 miliSecond, i will externalize this value to the options file.
Title: Re: User Interface (UI) suggestions
Post by: AedanClarke on October 20, 2012, 12:33:29 am
Ah, good job Fenyo for doing something I've been wanting to do for a long time. The world shall explode in your honor.
Title: Re: User Interface (UI) suggestions
Post by: sklll on October 20, 2012, 12:59:54 am
150 miliSeconds appear to be not enough for me  :D but 300 do the job just fine  :)
but with a small issue: on fast wide scrollings it can cancel scrolling and that results in a screen blinking. I think the pixel tolerance can help to avoid such things and will make scrolling really user friendly and flexible (with battleScrollButtonPixelTolerancy and battleScrollButtonTimeTolerancy ints).
Title: Re: User Interface (UI) suggestions
Post by: Fenyő on October 20, 2012, 02:04:46 pm
Okay, I've done the threshold implementation.
Now i have to find out how can i externalize to the options file. :)
Title: Re: User Interface (UI) suggestions
Post by: Fenyő on October 20, 2012, 04:53:37 pm
Ok, I'm done!!
I've made a Pull-request!

One small problem:
Shugyousha has also made a Pull-request with a simple reverse mouse mode modification, which is contained in my Pull-request also!
I wish he was cooperated with me, to avoid the double work... :(

EDIT:
In the options.cfg:

battleScrollButton: RMB
- It can be RMB, MMB, None  (Right-Mouse-Button, Middle-Mouse-Button, None)
  (any other else string means None)

battleScrollButtonInvertMode: Normal
- It can be Normal, Inverted
  (any other else string means Inverted)

battleScrollButtonPixelTolerancy: 10
- Its an int, in pixels, functions as we stated before

battleScrollButtonTimeTolerancy: 300
- Its an int, in miliseconds, functions as we stated before
Title: Battlescape: Save Equipment
Post by: Fenyő on October 22, 2012, 10:09:06 pm
New suggestion:
Save the state of the units-inventory on mission start and load it back on next pre-equip before mission start.
So i mean automatically reequip the team with their last weapon layout. :) (its from UFO Extender)

I have inspected the code, and i have some ideas for implementing this, you can read it in the development section, HERE (https://openxcom.org/forum/index.php/topic,708.msg6699.html#msg6699).


EDIT:
I have implemented this feature!

You can read it (and things need to be know about this) in the development section, HERE (https://openxcom.org/forum/index.php/topic,708.msg7030.html#msg7030).
Title: Re: User Interface (UI) suggestions
Post by: Fenyő on November 04, 2012, 05:12:38 pm
I was thinking on the feature named 'Auto Flares' in UFO Extender, and i think i've got a better idea for that.
I think not everyone uses flares in night missions for lighting, after all an incendiary weapon can be used to that purpose also. :)
So my idea is:
There could be night-time equipment layouts also!!
They could be independent from normal layouts, and applied instead of normal layouts when mission is at night. (there could be a darkness threshold to decide when is it counted as night, this could be in Options.cfg)
If a soldier only has night-time equipment layout when entering daytime mission, then the daytime layout is copied from the night-time, and vice versa on the contrary case. (but then it is handled independently)

Before i implement this, i want to ask you guys, what are your opinion about this idea?
Title: Re: User Interface (UI) suggestions
Post by: Volutar on November 04, 2012, 06:48:49 pm
Autoflares? First of all player should know how dark is outside, before pre-mission equipment screen or during it.
Title: Re: User Interface (UI) suggestions
Post by: Fenyő on November 04, 2012, 07:51:31 pm
You're right! :)
Perhaps a text should tell the darkness value on the pre-equip screen. (and maybe the fact that it is considered as daytime or night (by the aforementioned threshold value in options.cfg))
This way, would this feature be a good idea?
Title: Re: User Interface (UI) suggestions
Post by: moriarty on November 04, 2012, 08:12:13 pm
I think a pre-mission briefing screen would be nice in any case. it could feature several additional pieces of information:

- country
- local time and light level
- terrain type
- type of mission (terror site / crash site / landed UFO site / alien base assault)
- if crashed/landed UFO: size of UFO https:// - if hyperwave decoder info available: type of UFO and UFO's mission
- if hyperwave decoder info available: alien race involved

(for V1++: a "surveillance satellite map" of the terrain, like a blurry, maybe partially cloud-covered top-down view that lets you estimate the outlines of the terrain, buildings and the UFO)
Title: Re: User Interface (UI) suggestions
Post by: Fenyő on November 04, 2012, 09:07:08 pm
- type of mission (terror site / crash site / landed UFO site / alien base assault)
This is already exist, the "Briefing screen" with an OK button. D' u remember?

- country
- local time and light level
- terrain type
- if crashed/landed UFO: size of UFO https:// - if hyperwave decoder info available: type of UFO and UFO's mission
- if hyperwave decoder info available: alien race involved
These are actually known before the Battlescape starts, if you look at the place on the Geoscape.
Ok, the time is not local time, but is this a relevant info anyways?
Actually, light level is also visible on the geoscape, before the mission starts, however i admit that it's hard to evaluate the Battlescape darkness based on this.
Terrain type is a similar issue than light level.

Hmm, and how about if i expand the Briefing screen with some of these infos? (the one with the OK button)

And a new idea: Maybe the user could choose (on the Briefing screen) which "Layout-preset" are going to be used. (there would be Layout-1, Layout-2, and so on) This could give the user more freedom.
Opinions about this?