Giter Site home page Giter Site logo

studiowidgets's People

Contributors

alts-alt avatar dougbankspersonal avatar egomoose avatar fieryevent avatar lucaswolschick avatar lukadev-0 avatar quackbox avatar undermywheel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

studiowidgets's Issues

CollapsibleTitledSection Should Collapse / Expand when double-clicked on any position within the TitleBar

The TitledSection element in Studio's Properties panel will collapse / expand when the developer double-clicks any position within the elements title bar. The CollapsibleTitledSection of the StudioWidgets library does not come with this functionality and instead requires developers to accurately click the small arrow icon. Adding this behavior will be a great improvement to the elements usability.

src/labeledcheckbox.lua error when using LabeledMultiChoice.new()

When using the code: LabeledMultiChoice.new("LabeledMultiChoice", "LabeledMultiChoice", {'Labeled', 'Multi', 'Choice'}, 1) I get the error Workspace.SubWidgets.Modules.StudioWidgets.LabeledCheckbox:46: attempt to concatenate local 'nameSuffix' (a nil value). The labelled multi choice does not appear.

Here's the full output:

17:41:23.428 - Workspace.SubWidgets.Modules.StudioWidgets.LabeledCheckbox:46: attempt to concatenate local 'nameSuffix' (a nil value)
17:41:23.428 - Stack Begin
17:41:23.428 - Script 'Workspace.SubWidgets.Modules.StudioWidgets.LabeledCheckbox', Line 46 - field new
17:41:23.429 - Script 'Workspace.SubWidgets.Modules.StudioWidgets.LabeledRadioButton', Line 22 - field new
17:41:23.429 - Script 'Workspace.SubWidgets.Modules.StudioWidgets.LabeledMultiChoice', Line 112 - method _AddRadioButton
17:41:23.430 - Script 'Workspace.SubWidgets.Modules.StudioWidgets.LabeledMultiChoice', Line 102 - method _MakeRadioButtons

LabeledMultiChoice.new won't work properly

I'm trying to get something to work so I can copy the the LabeledMultiChoice from the PluginGuiService, unfortunately, I have no luck. If I try a local plugin in my plugins folder, it prints out 16:40:56.495 - forrobloxosthingy.lua:19: attempt to index nil with 'new' and as a installed published plugin prints out 16:55:02.143 - Plugin_4087104785.Script:19: attempt to index nil with 'new'. If that happens, then it is likely that saving a local plugin not in my plugins folder or pcall(function() won't work too. If you want to download the code, click here.

Thanks.
Plus judging by the attempt to index nil with 'new', it might have been removed.

src/LabeledTextInput.lua Full-width Textbox

With all widgets aiming to replicate the Properties panel, I found the default behavior of LabeledTextInput to be breaking the full-width consistency. I think all developers will benefit from the following change.

Current:

textBoxWrapperFrame.Size = UDim2.new(0, kTextInputWidth, 0.6, 0)
Proposed:
textBoxWrapperFrame.Size = UDim2.new(1,-(GuiUtilities.StandardLineElementLeftMargin+GuiUtilities.StandardLineLabelLeftMargin), 0.6, 0)

Visual result:
image

As this removes the kTextInputWidth variable from the equation, line 10 would become obsolete:

local kTextInputWidth = 100

LabeledSlider UI is glitchy

The LabeledSlider UI is pretty glitchy when you drag the slider around.

Personally, I fixed this by assigning a Heartbeat connection to the element. It's not a great or elegant solution, but it fixed the issue for me. I assume that the sliderValue.Changed method is firing 1 frame after the change is actually being made, thus causing the issue.

For the sake of example, my solution is shown below. Notice that this also includes a new sliderValue.Changed connection that replaces the current one. Again, not a great solution, but it works for my current project:

	
	local lastVal = nil
	
	local function Recalc()
		if (lastVal == self._value) then return end
		lastVal = self._value
		local scale = (lastVal - 1) / (sliderIntervals - 1)
		self._preThumbImage.Size = UDim2.new(scale, 0, 1, 0)
		self._postThumbImage.Size = UDim2.new(1 - scale, 0, 1, 0)
		self._postThumbImage.Position = UDim2.new(scale, 0, 0, 0)
		self._thumb.Position = UDim2.new(scale, 0, 0.5, 0)
	end
	
	local heartbeat = game:GetService("RunService").Heartbeat:Connect(Recalc)
	frame:GetPropertyChangedSignal("Parent"):Connect(function()
		if (not frame.Parent) then
			heartbeat:Disconnect()
		elseif (not heartbeat.Connected) then
			heartbeat = game:GetService("RunService").Heartbeat:Connect(Recalc)
		end
	end)

	sliderValue.Changed:connect(function()
		self._value = sliderValue.Value
		if self._valueChangedFunction then 
			self._valueChangedFunction(self._value)
		end
	end)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.