From 1e0d5bcfd71f2a43917cc425bdce41e8fc930e77 Mon Sep 17 00:00:00 2001 From: Tony <1414927+zfbTony@users.noreply.github.com> Date: Sun, 11 Oct 2020 22:09:14 -0400 Subject: [PATCH] Move slider to core and add opacity slider to console gui --- .../game/core/console/guis/console.gui | 23 ++++++++++++++++++ .../ui/art => core/gui/images}/slider.png | Bin .../game/core/gui/scripts/profiles.cs | 10 ++++++++ 3 files changed, 33 insertions(+) rename Templates/BaseGame/game/{data/ui/art => core/gui/images}/slider.png (100%) diff --git a/Templates/BaseGame/game/core/console/guis/console.gui b/Templates/BaseGame/game/core/console/guis/console.gui index c2f21eba9..0024bcac5 100644 --- a/Templates/BaseGame/game/core/console/guis/console.gui +++ b/Templates/BaseGame/game/core/console/guis/console.gui @@ -140,6 +140,29 @@ canSave = "1"; canSaveDynamicFields = "0"; }; + new GuiSliderCtrl(ConsoleDlgBgAlphaSlider) { + range = "0 1"; + ticks = "10"; + snap = "0"; + value = "0.65"; + useFillBar = "0"; + fillBarColor = "255 255 255 255"; + renderTicks = "1"; + position = "361 4"; + extent = "106 14"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiSliderProfile"; + visible = "1"; + active = "1"; + command = "ConsoleDlg::setalpha(ConsoleDlgBgAlphaSlider, ConsoleDlgBgAlphaSlider.value);"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; }; new GuiScrollCtrl() { willFirstRespond = "1"; diff --git a/Templates/BaseGame/game/data/ui/art/slider.png b/Templates/BaseGame/game/core/gui/images/slider.png similarity index 100% rename from Templates/BaseGame/game/data/ui/art/slider.png rename to Templates/BaseGame/game/core/gui/images/slider.png diff --git a/Templates/BaseGame/game/core/gui/scripts/profiles.cs b/Templates/BaseGame/game/core/gui/scripts/profiles.cs index a06ab94da..0c4ff640c 100644 --- a/Templates/BaseGame/game/core/gui/scripts/profiles.cs +++ b/Templates/BaseGame/game/core/gui/scripts/profiles.cs @@ -224,3 +224,13 @@ new GuiControlProfile( GuiButtonProfile ) hasBitmapArray = false; category = "Core"; }; + +// --------------------------------------------------------------------------- +// Slider control +// --------------------------------------------------------------------------- +if( !isObject( GuiSliderProfile ) ) +new GuiControlProfile( GuiSliderProfile ) +{ + bitmap = "core/gui/images/slider"; + category = "Core"; +};