Skip to content

Commit

Permalink
[Robust] Re-adds ControlLabel (#373)
Browse files Browse the repository at this point in the history
* [Robust] implement UI system and most everything it depends on. (#339)

* Add `set opendream_unimplemented`

* Add weighted pick()

* It's uh, something

* Adds score and medal procs (#331)

Co-authored-by: ike709 <[email protected]>

* Fix PostIncrement/PostDecrement expressions

* Support for for-loops without initializer or incrementor (#332)

* Support for for-loops without initializer or incrementor

* Update OpenDreamRuntime.Tests/UnitTest1.cs

Co-authored-by: wixoa <[email protected]>

Co-authored-by: wixoa <[email protected]>

* Use StateRoot for UI root instead.

* Set control name in UpdateElementDescriptor()

* Fix ControlChild vert/horizontal being swapped

* Implement ControlWindow properly.

* Fix atom transform rendering

* Implemented most matrix operations (#333)

* Implemented most matrix operations

* fixed turn

* Specify startup branding in GameControllerOptions.

* Implement enough UI stuff to show the map.

* Make ControlChild children have expand set so that initial size of the splitter is correct-ish.

* Implement a bunch of stuff like DreamConnection to get stat panels working.

* Fix MsgUpdateStatPanels.ReadFromBuffer error

* Show time in stat panel.

For testing.

* Verbs and output work now.

* Implement alert()

* Implement most of input().

* Implement << output()

* Implement browse_rsc()

* Implement browse_rsc() and browse().

This means ControlBrowser works too now.

* Use a dictionary for MIME type mapping

* Clean up ControlBrowser a bit.

* Implement Topic(), refids.

* Set `net.tickrate` CVar instead of `IGameTiming.TickRate` directly.

This is important so that the config system can replicate the CVar correctly.

* Fix server Update() to only be PreEngine.

So that repeating commands and such don't run twice.

* Implement some more missing functions like oviewers().

* Implement winset().

I didn't test but I assume it works.

* Implement screenshots.

* Open browse() popups later to avoid initial about:blank page navigation.

* Implement JS output.

* Oops

* implement ref()

* Revert resource system back to master.

This fixes resource loading so it works and we can load into TG.

Also some misc fixes.

* Implement IconStates through icon_states (#346)

* Disable net.predict.

* More TestGame stuff I was messing around with.

* path fix for linux (#337)

Co-authored-by: mumencoder <[email protected]>

* Fix how delimiters are parsed within call arguments/switch cases

* Made OpenDreamServer output UTF-8 to the console (#352)

* Implement isicon() (#348)

* Implement isicon()

* Update OpenDreamRuntime/Procs/Native/DreamProcNativeRoot.cs

Co-authored-by: wixoa <[email protected]>

Co-authored-by: wixoa <[email protected]>

* Implement cal()() FFI. (#355)

Man modern C# makes this so damn easy.

* Mentions the new wiki page in the readme (#354)

* Make `spawn()` parantheses optional
Apparently you can use `spawn` without any parentheses

* Add a default stat panel

* Set `usr` when calling `/mob.Login()` or `/mob.Logout()`

* Update submodule

* Associative lists will no longer be allocated for non-associative lists (#343)

* Associative lists will no longer be allocated for non-associative lists

* Update OpenDreamRuntime/Objects/DreamList.cs

Co-authored-by: Pieter-Jan Briers <[email protected]>

* Update OpenDreamRuntime/Objects/DreamList.cs

Co-authored-by: Pieter-Jan Briers <[email protected]>

* Cleanup

* wrapper

Co-authored-by: Pieter-Jan Briers <[email protected]>

* Some work into making the styling better.

* Implement menu bars.

* Fix map viewports missing mouse filter stop.

* Increase resource download timeout, clean code up a little.

CVars have been moved to shared.

* Remove cruft from code.dm

* Remove bad compile directive from .csproj file.

Co-authored-by: wixoaGit <[email protected]>
Co-authored-by: ike709 <[email protected]>
Co-authored-by: ike709 <[email protected]>
Co-authored-by: DamianX <[email protected]>
Co-authored-by: TiviPlus <[email protected]>
Co-authored-by: mumencoder <[email protected]>
Co-authored-by: mumencoder <[email protected]>

* Re-adds ControlLabel

* Update Content.Client/Interface/Controls/ControlLabel.cs

Co-authored-by: Pieter-Jan Briers <[email protected]>
Co-authored-by: wixoaGit <[email protected]>
Co-authored-by: ike709 <[email protected]>
Co-authored-by: DamianX <[email protected]>
Co-authored-by: TiviPlus <[email protected]>
Co-authored-by: mumencoder <[email protected]>
Co-authored-by: mumencoder <[email protected]>
  • Loading branch information
8 people authored Sep 7, 2021
1 parent ac1c2ba commit f344658
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
28 changes: 28 additions & 0 deletions Content.Client/Interface/Controls/ControlLabel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using Content.Shared.Interface;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;

namespace Content.Client.Interface.Controls
{
class ControlLabel : InterfaceControl {
private Label _label;

public ControlLabel(ControlDescriptor controlDescriptor, ControlWindow window) : base(controlDescriptor, window) { }

protected override Control CreateUIElement() {
_label = new Label() {
HorizontalAlignment = Control.HAlignment.Center,
VerticalAlignment = Control.VAlignment.Center,
};

return _label;
}

public override void UpdateElementDescriptor() {
base.UpdateElementDescriptor();

ControlDescriptorLabel controlDescriptor = (ControlDescriptorLabel)_elementDescriptor;
_label.Text = controlDescriptor.Text;
}
}
}
3 changes: 2 additions & 1 deletion Content.Client/Interface/Controls/ControlWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ public void CreateChildControls(DreamInterfaceManager manager)
ControlDescriptorInfo => new ControlInfo(controlDescriptor, this),
ControlDescriptorMap => new ControlMap(controlDescriptor, this),
ControlDescriptorBrowser => new ControlBrowser(controlDescriptor, this),
_ => throw new Exception("Invalid descriptor")
ControlDescriptorLabel => new ControlLabel(controlDescriptor, this),
_ => throw new Exception($"Invalid descriptor {controlDescriptor.GetType()}")
};

ChildControls.Add(control);
Expand Down

0 comments on commit f344658

Please sign in to comment.