Author Topic: WAR_DROBE - A window manager for Arma2 (Demo version)  (Read 1353 times)

0 Members and 1 Guest are viewing this topic.

Offline Worldeater

  • Former Staff
  • ****
  • Suum cuique
Here's a demo of a window manager for Arma2. Enjoy! :)

Note: I won't be around for the next few days, weeks, maybe months and probably won't have access to the internet. Be patient in case you have any questions.
try { return true; } finally { return false; }

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: WAR_DROBE - A window manager for Arma2 (Demo version)
« Reply #1 on: 25 Oct 2010, 18:53:45 »
Some more info for interested people.

From lessonslearned.txt

- Images for RscShortcutButtons must have a height:width ratio of 1:4 or they get stretched.
- You can have modal windows by "ctrlEnable false" all other windows.
- Forgetting a bloody plus sign can be pretty annoying.

A sample text definition:

Code: [Select]
              Worldeater's Arma Resources\n
                     presents the\n
          Dialog Resource (OpenBox Edition)\n
This is a tech demo. A proof of concept. It's not very\n
useful yet. But it demonstrates that it is possible to\n
build a window manager by (ab)using RscControlsGroups.\n
Have fun! :)\n
 -- Worldeater

More details in the code.  ;)


The X, up/down arrow do not work, neither does scrolling inside a window. However:

Code: [Select]
["Implement me!","Maximize",[Control #750727,0,0.787723,0.0238095,false,false,false]]
["Implement me!","Minimize",[Control #750726,0,0.754241,0.016369,false,false,false]]
["Implement me!","Close",[Control #750728,0,0.808928,0.03125,false,false,false]]

On ESC there is:

Script res\WAR_DROBE_OnUnload.sqf not found

That aside it is a very fine piece of work. Great job Worldeater.  :good:
« Last Edit: 25 Oct 2010, 19:00:26 by kju »

Offline JamesF1

  • Editors Depot Staff
  • *****
Re: WAR_DROBE - A window manager for Arma2 (Demo version)
« Reply #2 on: 25 Oct 2010, 19:17:56 »
Impressive work.  Can't say it's something I'd have much of a use for, personally, but I can definitely see the merits :)

Offline Worldeater

  • Former Staff
  • ****
  • Suum cuique
Re: WAR_DROBE - A window manager for Arma2 (Demo version)
« Reply #3 on: 29 Oct 2010, 18:00:54 »
Thanks! :)

I'm currently rewriting the whole thing from scratch. The current version (codename: SAW, Simple Arma Windows) looks a bit nicer than the old one:


I've attached the current version. Hit 0-0-0 to get the windows.

- Every window has a border now that can be used for resizing.
- Maximizing works (I still don't know were to place minimized windows).
- I've added several functions to deal with windows (hide, show, make modal, set title, etc).

Known problems:
- The "trash" that shows up a split second before the windows appear is because I forgot to set the default sizes of the controls to zero.
- Being forced to use single precision floating point numbers for UI element positioning that also might have an additional scale factor applied. ;)

This whole "Interface size" scaling stuff is one big pain! It makes it almost impossible to get pixel-accurate results [1]. Every damn X/Y-value, height and width is handpicked and had to be tested, adjusted, tested, adjusted, tested, adjusted, <insert CYCLE waypoint here>. Depending on your settings there are gaps between borders, the scrollbars are too big (or too small), texts are rendered beyond their controls, etc. Just take a look at window #2 and #4 (you have to resize them to read the full title).

This project probably pushes the UI far beyond what it was designed for (or I'm simply too dumb to figure out how to get it right). I hope for the latter to be true. :)

[1] At least for me, if someone knows how to solve this then pretty please with sugar on top: enlighten me!
« Last Edit: 02 Nov 2010, 07:17:58 by Worldeater »
try { return true; } finally { return false; }