Skip to content

Commit

Permalink
Cleanup repo
Browse files Browse the repository at this point in the history
  • Loading branch information
tobspr committed Feb 6, 2016
1 parent 39da558 commit b66d524
Show file tree
Hide file tree
Showing 23 changed files with 10 additions and 53 deletions.
3 changes: 2 additions & 1 deletion Builtin/LUILabel.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class LUILabel(LUIObject):

""" A simple label, displaying text. """

# Default variables which can be overridden by skins
DEFAULT_COLOR = (0.9, 0.9, 0.9, 1)
DEFAULT_USE_SHADOW = True

Expand All @@ -17,7 +18,7 @@ def __init__(self, text=u"Label", shadow=None, font_size=14, font="label", **kwa
LUIObject.__init__(self)
self._text = LUIText(self, unicode(text), font, font_size)
self._text.z_offset = 1
self.color = self.DEFAULT_COLOR
self.color = LUILabel.DEFAULT_COLOR
if shadow is None:
shadow = LUILabel.DEFAULT_USE_SHADOW
self._have_shadow = shadow
Expand Down
37 changes: 7 additions & 30 deletions Builtin/LUILayouts.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,12 @@

from __future__ import print_function, division

from panda3d.lui import *
from panda3d.lui import LUIObject, LUISprite, LUIHorizontalLayout
from direct.directnotify.DirectNotify import DirectNotify

from LUIInitialState import LUIInitialState

__all__ = ["LUIBaseLayout",
"LUICornerLayout", "LUIHorizontalStretchedLayout"]

class LUIBaseLayout(LUIObject):

""" Abstract class to supply a consistent interface for different layouts """

def add(self, *objects):
""" Use to add elements """
raise NotImplementedError()

def remove(self, index):
""" Use to delete cells """
raise NotImplementedError()

def reset(self):
""" Resets the layout, removing all components """
raise NotImplementedError()

def get(self, index):
""" Use to get an element """
raise NotImplementedError()
__all__ = ["LUICornerLayout", "LUIHorizontalStretchedLayout"]

class LUICornerLayout(LUIObject):

Expand Down Expand Up @@ -100,11 +79,11 @@ class LUIHorizontalStretchedLayout(LUIObject):

def __init__(self, parent=None, prefix="ButtonDefault", **kwargs):
LUIObject.__init__(self)
self._sprite_left = LUISprite(self, "blank", "skin")
self._sprite_mid = LUISprite(self, "blank", "skin")
self._sprite_right = LUISprite(self, "blank", "skin")
self._sprite_right.right = 0
self._sprite_mid.left = 0
self._layout = LUIHorizontalLayout(self, spacing=0)
self._layout.width = "100%"
self._sprite_left = LUISprite(self._layout.cell(), "blank", "skin")
self._sprite_mid = LUISprite(self._layout.cell('*'), "blank", "skin")
self._sprite_right = LUISprite(self._layout.cell(), "blank", "skin")
if parent is not None:
self.parent = parent
self.prefix = prefix
Expand All @@ -115,8 +94,6 @@ def set_prefix(self, prefix):
self._sprite_left.set_texture(prefix + "_Left", "skin")
self._sprite_mid.set_texture(prefix, "skin")
self._sprite_right.set_texture(prefix + "_Right", "skin")
self._sprite_mid.margin = (0, self._sprite_right.width, 0, self._sprite_left.width)

self._sprite_mid.width = "100%"
self._prefix = prefix

Expand Down
2 changes: 1 addition & 1 deletion Demos/DemoFramework.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class DemoFramework:

def __init__(self):

if True:
if False:
self._skin = LUIMetroSkin()
base.win.set_clear_color(Vec4(1))
else:
Expand Down
Binary file removed Misc/Button.psd
Binary file not shown.
Binary file removed Misc/Button2.psd
Binary file not shown.
File renamed without changes.
21 changes: 0 additions & 21 deletions Misc/GenerateDemoTextures.py

This file was deleted.

File renamed without changes.
Binary file removed Misc/btn_gray.png
Binary file not shown.
Binary file removed Misc/btn_green.png
Binary file not shown.
Binary file removed Misc/btn_green/ButtonMagic_BL.png
Binary file not shown.
Binary file removed Misc/btn_green/ButtonMagic_BR.png
Binary file not shown.
Binary file removed Misc/btn_green/ButtonMagic_Bottom.png
Binary file not shown.
Binary file removed Misc/btn_green/ButtonMagic_Left.png
Binary file not shown.
Binary file removed Misc/btn_green/ButtonMagic_Mid.png
Binary file not shown.
Binary file removed Misc/btn_green/ButtonMagic_Right.png
Binary file not shown.
Binary file removed Misc/btn_green/ButtonMagic_TL.png
Binary file not shown.
Binary file removed Misc/btn_green/ButtonMagic_TR.png
Binary file not shown.
Binary file removed Misc/btn_green/ButtonMagic_Top.png
Binary file not shown.
Binary file removed Misc/btn_green_focus.png
Binary file not shown.
Binary file removed Misc/popup.png
Binary file not shown.
Binary file removed Misc/sunkenFrame.png
Binary file not shown.
Binary file removed Misc/window_bg.png
Binary file not shown.

0 comments on commit b66d524

Please sign in to comment.