mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Fix bug with positioning in which I hard-coded the positions because....?
This commit is contained in:
parent
374832f3da
commit
cd5a7968c4
@ -11,10 +11,10 @@ type Position struct {
|
||||
|
||||
func NewPosition(top, left, width, height int) Position {
|
||||
pos := Position{
|
||||
top: 0,
|
||||
left: 1,
|
||||
width: 2,
|
||||
height: 3,
|
||||
top: top,
|
||||
left: left,
|
||||
width: width,
|
||||
height: height,
|
||||
}
|
||||
|
||||
return pos
|
||||
|
@ -34,8 +34,8 @@ func NewTextWidget(name string, configKey string, focusable bool) TextWidget {
|
||||
widget.Position = NewPosition(
|
||||
Config.UInt(fmt.Sprintf("wtf.mods.%s.position.top", configKey)),
|
||||
Config.UInt(fmt.Sprintf("wtf.mods.%s.position.left", configKey)),
|
||||
Config.UInt(fmt.Sprintf("wtf.mods.%s.position.height", configKey)),
|
||||
Config.UInt(fmt.Sprintf("wtf.mods.%s.position.width", configKey)),
|
||||
Config.UInt(fmt.Sprintf("wtf.mods.%s.position.height", configKey)),
|
||||
)
|
||||
|
||||
widget.addView()
|
||||
|
Loading…
x
Reference in New Issue
Block a user