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 {
|
func NewPosition(top, left, width, height int) Position {
|
||||||
pos := Position{
|
pos := Position{
|
||||||
top: 0,
|
top: top,
|
||||||
left: 1,
|
left: left,
|
||||||
width: 2,
|
width: width,
|
||||||
height: 3,
|
height: height,
|
||||||
}
|
}
|
||||||
|
|
||||||
return pos
|
return pos
|
||||||
|
@ -34,8 +34,8 @@ func NewTextWidget(name string, configKey string, focusable bool) TextWidget {
|
|||||||
widget.Position = NewPosition(
|
widget.Position = NewPosition(
|
||||||
Config.UInt(fmt.Sprintf("wtf.mods.%s.position.top", configKey)),
|
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.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.width", configKey)),
|
||||||
|
Config.UInt(fmt.Sprintf("wtf.mods.%s.position.height", configKey)),
|
||||||
)
|
)
|
||||||
|
|
||||||
widget.addView()
|
widget.addView()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user