Search the Community

Showing results for tags 'widget'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Public Forums
    • Announcements
    • General Chatter
    • Tournaments
    • Mapping forum
    • UI Scripting
    • Trading
    • Support
    • Bugs
    • Silver Screen

Found 11 results

  1. Is there a way to save a certain way widgets are set up? I just want to be able to switch between two huds quickly without having to manually disable and enable all of the widgets, or repositioning them.
  2. I recently dug into scripting and noticed that a lot of information is missing from the docs and wiki. I thought I would go ahead and list off some problems I ran into as I wrote my first widget. Shoutouts to MAD_JIHAD and SickDownlink. Where can I find example scripts? My first heuristic when diving into a new API or code base is to find examples and see how they work. The two main examples (the fade example, and the basic wiki example, are good but generally geared to the visual aspect of widgetcraft.) However, there are more examples tucked away in reflexfps\base\internal.pak\internal\ui\widgets\ You'll need to open the .pak with an archive viewer like 7zip, or your unlicensed version of WinRAR. This was extremely useful information that I wish I would have known about! So I highly recommend starting there if you're interested in widgets. What functions were called by the engine for initialization, updating, and enabling? This information came from Qualx on the Reflex Discord, people are great there, and I highly recommend poking your head in there if you have any additional questions. The entire code file is executed immediately when the game loads it. This execution will usually define one or more widgets which will exist persistently, and the game will then call widget:draw() every frame on any visible, registered widgets. It'll also call initialize() on every widget, followed by show() and draw() if the widget will be visible, immediately after loading the file, and before continuing to load other files, iirc. How does scope work? I've noticed that if you're attempting to call function that are scoped to your Widget (e.g.: MyWidget:SomeFunction(){} ), you'll need to call it from either MyWidget:draw(), MyWidget:initialize(), or MyWidget:show(). I've also noticed that calling my own functions internally require the self: prefix to reference the objects function. (e.g.: MyWidget:draw(){self:SomeFunction();} ). How do I setup a variable to modify from the game's command line? This one was a bit tricky because I needed to change the way I thought about variables. If you want to store a variable for later use, or for use in a console command you'll need to create a variable. This variable is pushed to game.cfg and is persistent. (I believe...) to create a variable, widgetCreateConsoleVariable("myvariablename", "variabletype", 1); where variable type is int, string, float, or any other primitive. Now modifying that variable from the console is a little more interesting. Once you add the variable, you can access it like this: ui_MyWidget_myvariablename 12345678 where 12345678 should represent the type you're trying to modify. Note you can call a console command with consolePerformCommand("bind mousewheeldown UI_MyWidget_MyVariableName DVD"); I hope this helps someone out in the future. If I'm wrong about any of this, let me know. -Nath (pain][world)
  3. Updated August 28th, 2016 MCPMClock options: Toggle clock to count up or down Toggle the CPM style seconds. This widget is visually very similar to the default clock/round timer with some extra options. Like the default clock It will show you the score difference on the right. Example "-10" if you are 10 points behind. It will show a "-" if you are in race mode or warm up. It will show the normal seconds unless you have the option checked and are playing in a duel with more than 30 seconds remaining. (CPM style) It will not disappear when you die like the default clock does. If the time limit is over 99 minutes it shows a "-" (looks better than 9 billion minutes left on race servers). Steam Workshop Link Old Download link
  4. Hi, I made a widget for those who wish to improve their circlejumping, it tells you how fast your prestrafe and overall speed after the circlejump was. It's pretty bad and may screw up now and then due to the dodgy way it checks things, but it should work well on flat ground for practicing. Feel free to modify it if you're a coder, and any advice on the code inside appreciated! What it shows The top number is your prestrafe speed, the bottom is your end circlejump speed. The prestrafe speed will reset to 0 once you hit the ground, but will be printed to console along with your circlejump speed. I'll adjust this at some point to keep it on screen for a bit in some form, perhaps show a list of the last 10 jumps somewhere on the HUD. The on-screen text will colour based on your performance, basically compared against mine (I'm bad but probably better than a lot of new players.), here are the ranges: Prestrafe > 419 BLACK 420-439 RED 440-464 YELLOW 465-479 GREEN 480-490 BLUE (I've never hit this, don't know if it's possible) Circlejump > 499 BLACK 500-539 RED 540-569 YELLOW 570-589 GREEN 590-600 BLUE (I've never hit this, don't know if it's possible) Beware that circlejumping over a gap and on flat ground are a bit different due to being able to step up onto platforms. CirclejumpStat.lua
  5. widget

    Overview I have made an widget that extends upon the original crosshair. This Also integrates Movement Keys and a Velocity Display. Velocity Display will show in what direction your velocity vector is pointing. Settings Color Options Color Fill by health Crosshair color Color stroke by health Stroke Color Shape Options Type - 1 to 16 Inner Space - This only applies to Shape 2 and 3 Size Stroke Weight Movement Keys Display Movement Keys Movement Keys color Size Spacing Velocity Options Display velocity Display Y Axis Velocity Color Download jonfio_Crosshair.lua
  6. Basically it shows you how fast you captured the flag. It should only work while CTF is the active game mode. Some code borrowed from @meowgli teamupdates widget and the default race time widget. MFastCaps.lua
  7. So I just violated the default Crosshairs.lua and made it so I can use sliders to set colour under options. Both for the fill colour and the stroke outline. I didn't bother keeping the cvars. It is all now saved in the config and only(?) customizable with the settings under options/widgets/CrosshairsMu. Colour fill/stroke by health will override the slider settings. Updated 26/11-15 Added ugly hack to get stroke to work on all the default crosshairs. The more complex patterns will not have a uniform outline though. It is basically drawing the crosshair twice in slightly different sizes so the ouline will be either on the inside or outside.
  8. Hey, I made some changes to the original pick up timer from the game. I know that there are quite a few different pick up timers exist right now, but they just don't seem to do it for me, so I decided to tweak the original one a bit, and share it with those who are interested in it. ___________________________________________________________________________________ ItemTimers: Changes: Changed text color to yellow, so it gets more attention – stands out more.Changed "-" to "READY!" when the item has spawned and is ready to be picked up. Mega health's "held" text has been changed to "HELD!".If 10 seconds or less are remaining before the item spawns, then a box next to the item's respawn time gets drawn with the text saying "GET READY!" in yellow to get the player's attention focus on the time and let them to get to the item's location across the map in time."GET READY!" text turns into red from yellow over the last 3 seconds remaining before the item respawns.Screenshots: Bugs: if the timer is placed to the right edge of the screen the "attention boxes" won't be visible. They always show up on the right side of timers. Download ___________________________________________________________________________________ I'll try to commit some time to fix the only "bug" of this widget, and perhaps bring some improvements too. Feedback is highly appreciated! Have a nice day, InstiGibz​
  9. This widget shows how many Bolts to the face you can take before you die. If the answer is one, it will show the text Boltable! TerBoltable.lua Screenshot
  10. Hello everyone, I will use this post to share the widgets that I have created for myself with the world! The repository where I will keep my up to date widgets (and configs) can be found here: Most aspects of my widgets are easily customizable by simply changing the CONSTANTS (denoted by ALL CAPS) at the beginning of the file. All newer widgets will make use of the in game widget options, some of the old ones need to be updated to use the in-game menu. dnl_ItemTimers Right click -> Save as EDIT: In its current implementation, pulsing large icons causes sizeable fps drops for me. If you experience fps drops when pulsing use a smaller icon size for now. A downward growing item timer widget. Features: icon pulsing on item pickup and / or spawn, item icons with shadow and timer text with shadow. In the below screenshot the RA was just picked up, while the YA just spawned. All aspects of the icon pulsing are easily customizable. dnl_SpeedOMeter Right click -> Save as A simple ups (units per second) meter. dnl_JumpSpeeds Right click -> Save as A simple jump speeds display. Displays all jump speeds from the past x jumps or from the past y seconds. dnl_PlayerAngles Right click -> Save as A simple player model angles display. Displays pitch and yaw. dnl_MegaHealthRemaining Right click -> Save as Shows you how much damage you can take before the mega health spawn timer begins if you picked up the mega health. In the below screenshot the spawn timer for the mega health will begin when the player takes 43 points of damage. dnl_SpectatorRadar Right click -> Save as A simple radar for spectators! Shows the player as a white dot, enemies as red dots and allies as green dots. This one comes with an in-game options menu so you can easily change the scale (zoom) of the radar. In the screenshot below, the player you see is the red dot on the radar. Please post any comments, questions, suggestions or requests here and feel free to use and modify these widgets!
  11. I've made a simple radial UPS meter just for fun and scripting practice (since I'm a total nub, even with Lua). It shows your current UPS and temporarily stores your top speed so you can easily see improvement. Download: Screen: